Skip to content

Commit

Permalink
update readme.
Browse files Browse the repository at this point in the history
  • Loading branch information
hac425xxx committed Nov 7, 2024
1 parent ddad178 commit 12e5bec
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
将 IDA Hexrays 语法书导出并转换为 codeql 的数据库

```
ida2codeql.bat 二进制文件目录 保存数据库的目录
```

bat 的内容

```
@echo off
set bat_dir=%~dp0
set codeql_home=%bat_dir%\codeql
set extractor_path=%bat_dir%\ida-extractor.exe
set ida_path=%bat_dir%\IDA_PRO_7.7\ida.exe
cd /d "%~dp0"
if defined CODEQL_HOME (
set codeql_home=%CODEQL_HOME%
) else (
echo "使用目录下的 codeql"
)
set codeql_path=%codeql_home%\codeql.exe
set scheme_path=%codeql_home%\go\go.dbscheme
set binary_path=%1
set ast_path=%binary_path%\out
set db_path=%2
python ida-extractor.py "%ida_path%" "%binary_path%"
python ida2codeql.py "%codeql_path%" "%scheme_path%" "%extractor_path%" "%db_path%" "%ast_path%"
```



生成数据库后需要使用 vscode-codeql 的 go 语法写规则.

0 comments on commit 12e5bec

Please sign in to comment.