scripts/Defaults.js
// Scans for patterns in specific modules code section.
Scans for patterns in specific modules code section.
Scans for patterns in specific modules code section .
function scan(name, sig) {
    if (sig == undefined) {
        sig = name;
        name = 'client.exe';
    }
    sig = fixSig(sig);
    var ranges = Module.enumerateRangesSync(name, 'r-x');
    var address = NULL;
    for (var i = 0; i < ranges.length; ++i) {
        var range = ranges[i];
        var results = Memory.scanSync(range.base, range.size, sig);
        if (results.length > 0) {
            if (results.length > 1) {
                dmsg("More than 1 result for: " + sig);
            }
            address = results[0].address;
            break;
        }
    }
    dmsg(address);
    if (address.isNull()) {
        dmsg("No results for: " + sig);
    }
    else if (debug) {
        send({script: scriptName, signature: sig, address: address});
    }
    return address;
}
function scan ( name , sig ) { if ( sig == undefined ) { sig = name ; name = 'client.exe' ; } sig = fixSig ( sig ) ; var ranges = Module . enumerateRangesSync ( name , 'r-x' ) ; var address = NULL ; for ( var i = 0 ; i < ranges . length ; ++ i ) { var range = ranges [ i ] ; var results = Memory . scanSync ( range . base , range . size , sig ) ; if ( results . length > 0 ) { if ( results . length > 1 ) { dmsg ( "More than 1 result for: " + sig ) ; } address = results [ 0 ] . address ; break ; } } dmsg ( address ) ; if ( address . isNull ( ) ) { dmsg ( "No results for: " + sig ) ; } else if ( debug ) { send ( { script : scriptName , signature : sig , address : address } ) ; } return address ; }
Scans for patterns in specific modules code section.
Scans for patterns in specific modules code section .
// Send the results of the scan back to kanan.py