Skip to content

Instantly share code, notes, and snippets.

@Ayrx
Created April 23, 2020 04:30
Show Gist options
  • Save Ayrx/64c7da9925bd708b4efb2c9b2843dd5c to your computer and use it in GitHub Desktop.
Save Ayrx/64c7da9925bd708b4efb2c9b2843dd5c to your computer and use it in GitHub Desktop.

Revisions

  1. Ayrx created this gist Apr 23, 2020.
    15 changes: 15 additions & 0 deletions repro.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,15 @@
    var m = "python2.7";
    var ex = "PyTraceBack_Type";

    var module = Process.getModuleByName(m)
    console.log(JSON.stringify(module));

    for (var e of module.enumerateExports()) {
    if (e.name == ex) {
    console.log(JSON.stringify(e));
    }
    }

    console.log("A: " + module.findExportByName(ex));
    console.log("B: " + Module.findExportByName(m, ex));
    console.log("C: " + Module.findExportByName(null, ex));