{"id":16712866,"url":"https://github.com/hugsy/windbg_js_scripts","last_synced_at":"2025-04-07T11:08:18.103Z","repository":{"id":44569147,"uuid":"158127278","full_name":"hugsy/windbg_js_scripts","owner":"hugsy","description":"Toy scripts for playing with WinDbg JS API","archived":false,"fork":false,"pushed_at":"2024-07-08T16:32:27.000Z","size":356,"stargazers_count":219,"open_issues_count":0,"forks_count":40,"subscribers_count":10,"default_branch":"main","last_synced_at":"2024-10-13T20:44:21.588Z","etag":null,"topics":["debugging","javascript","windbg","windbg-preview","windbg-scripts"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hugsy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-11-18T21:10:44.000Z","updated_at":"2024-09-24T14:15:55.000Z","dependencies_parsed_at":"2024-05-17T19:45:49.458Z","dependency_job_id":"2ba117be-5169-4e8c-8931-baa70c5cf52b","html_url":"https://github.com/hugsy/windbg_js_scripts","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hugsy%2Fwindbg_js_scripts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hugsy%2Fwindbg_js_scripts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hugsy%2Fwindbg_js_scripts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hugsy%2Fwindbg_js_scripts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hugsy","download_url":"https://codeload.github.com/hugsy/windbg_js_scripts/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247640464,"owners_count":20971557,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["debugging","javascript","windbg","windbg-preview","windbg-scripts"],"created_at":"2024-10-12T20:44:21.937Z","updated_at":"2025-04-07T11:08:18.086Z","avatar_url":"https://github.com/hugsy.png","language":"JavaScript","readme":"# WinDbg JavaScript Scripts\r\n\r\n\r\n## Install as a WinDbg gallery\r\n\r\n - Clone the repository\r\n\r\n```bash\r\ngit clone https://github.com/hugsy/windbg_js_scripts\r\n```\r\n\r\n - In `windbg_js_scripts\\config.xml`, edit the lines `Setting Name=\"LocalCacheRootFolder\"` to reflect the local path of the repository.\r\n\r\n - In WinDbg, load the `config.xml` file and save the settings:\r\n\r\n```text\r\nwindbg\u003e .settings load \\path\\to\\windbg_js_scripts\\config.xml\r\n[...]\\windbg_js_scripts\\config.xml has been loaded successfully.\r\nwindbg\u003e .settings save\r\nSettings have been saved.\r\n```\r\n\r\nEvery time WinDbg loads, the galleries will be loaded under `Debugger.State.ExtensionGallery.ExtensionRepositories`:\r\n\r\n```text\r\nkd\u003e dx -r1 Debugger.State.ExtensionGallery.ExtensionRepositories\r\nDebugger.State.ExtensionGallery.ExtensionRepositories\r\n    [0x0]            : UserExtensions\r\n    [0x1]            : hugsysgallery\r\n    [0x2]            : overgallery\r\n    [0x3]            : LocalInstalled\r\n```\r\n\r\nAnd the scripts available for the current session can be listed too:\r\n\r\n```text\r\nkd\u003e dx -r1 Debugger.State.ExtensionGallery.ExtensionRepositories.Where( x =\u003e x.Name == \"hugsysgallery\" ).First().Packages\r\nDebugger.State.ExtensionGallery.ExtensionRepositories.Where( x =\u003e x.Name == \"hugsysgallery\" ).First().Packages\r\n    [0x0]            : EnumCallbacks\r\n    [0x1]            : GetIdtGdt\r\n    [0x2]            : BreakOnProcessCreate\r\n    [0x3]            : DumpLookasides\r\n    [0x4]            : GetSsdtTable\r\n    [0x5]            : BigPool\r\n    [0x6]            : PageExplorer\r\n    [0x7]            : VadExplorer\r\n    [0x8]            : ObjectExplorer\r\n    [0x9]            : RegistryExplorer\r\n    [0xa]            : GetSiloMonitors\r\n    [0xb]            : EnumApc\r\n    [0xc]            : EnvVars\r\n    [0xd]            : EnumImages\r\n    [0xe]            : CallGraph\r\n    [0xf]            : TraceFunctions\r\n    [0x10]           : CyclicPattern\r\n```\r\n\r\n\r\n## Related links\r\n\r\n - https://github.com/hugsy/defcon_27_windbg_workshop/blob/master/windbg_cheatsheet.md\r\n - https://doar-e.github.io/blog/2017/12/01/debugger-data-model\r\n - https://docs.microsoft.com/en-us/windows-hardware/drivers/debugger/javascript-debugger-example-scripts\r\n - https://docs.microsoft.com/en-us/windows-hardware/drivers/debugger/native-objects-in-javascript-extensions\r\n - https://twitter.com/windbgtips\r\n - https://medium.com/@yardenshafir2/windbg-the-fun-way-part-1-2e4978791f9b\r\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhugsy%2Fwindbg_js_scripts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhugsy%2Fwindbg_js_scripts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhugsy%2Fwindbg_js_scripts/lists"}