美文网首页
Error: access violation accessin

Error: access violation accessin

作者: 还是那个没头脑 | 来源:发表于2021-03-06 16:01 被阅读0次

frida 执行读写操作

function writeSomething(path, contents) {
    var fopen_addr = Module.findExportByName("libc.so", "fopen");
    var fputs_addr = Module.findExportByName("libc.so", "fputs");
    var fclose_addr = Module.findExportByName("libc.so", "fclose");

    // console.log("fopen=>",fopen_addr,"  fputs=>",fputs_addr,"  fclose=>",fclose_addr);

    var fopen = new NativeFunction(fopen_addr, "pointer", ["pointer", "pointer"]);
    var fputs = new NativeFunction(fputs_addr, "int", ["pointer", "pointer"]);
    var fclose = new NativeFunction(fclose_addr, "int", ["pointer"]);

    //console.log(path,contents)

    var fileName = Memory.allocUtf8String(path);
    
    var mode = Memory.allocUtf8String("a+");

    var fp = fopen(fileName, mode);

    var buffer = Memory.allocUtf8String(contents);

    var retval = fputs(buffer,fp)
    console.log("fputs:", retval);
    fclose(fp);
}

表示 写入手机的路径 没有读写权限

相关文章

网友评论

      本文标题:Error: access violation accessin

      本文链接:https://www.haomeiwen.com/subject/ypqsqltx.html