美文网首页
Frida 安装和使用-05-TypeScript环境

Frida 安装和使用-05-TypeScript环境

作者: 牵手生活 | 来源:发表于2023-03-10 13:43 被阅读0次

使用TypeScript开发的好处

1、代码提示
2、代码检查
3、提示导入库

image.png image.png image.png image.png

如:index_youtube.ts

import { log } from "./logger.js";

const trampoline = Memory.alloc(Process.pageSize);

Memory.patchCode(trampoline,64,code => {
    const cw = new X86Writer(code,{pc:trampoline});

    // cw.putMovRegAddress("xxx",ptr(123));
    cw.putMovRegAddress("eax",ptr(123));


});

typescriptlang typeScript 语言说明

TypeScript语言官网

TypeScript视频

介绍使用TypeScript进行编码的好处
Frida TypeScript demo------youtube
介绍TypeScritpy的基础概念-及一些指点,强类型限制
TypeScript-The Basics--youTube

工具及环境

idea
nodejs


安装typeScript


$ npm install -g typescript
$ tsc -v
Version 4.0.3

创建第一个ts文件 index_hello.ts

console.log("hello world")

const aa = 78788
console.log("hello world", aa)

ts文件不能被运行,需要先进行编译成javaScript后,才能运行

在控制台编译这个ts文件

tsc index_hello.ts

将会生成一个index_hello.js 文件,,js文件可以运行在浏览器、或nodejs。
而frida cli 也提供了对js的支持。

image.png

用node 运行试试效果

node index_hello.js

image.png

ts demo2

编写index_async.ts

async function hello(){
    return
}

转换为js

tsc index_async.ts
image.png

查看tsc的编译选项

tsc -help
image.png image.png

相关文章

网友评论

      本文标题:Frida 安装和使用-05-TypeScript环境

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