1、创建第一个main.c文件
#include "stdio.h"
int main(int args[]){
int a = 0;
int b = 2;
int c = a + b;
printf("%d", c);
}
2、分析C/C++源代码生成cpg文件,主要通过
# 查看参数详情
.\c2cpg.bat --help
# 输入源代码,生成cpg
.\c2cpg.bat C:/Users/zuk/Desktop/joern/c2c_sources --output C:/Users/visio/Desktop/joern/c2c_sources/cpg.bin
3、 导入cpg进行分析
4、 querydb使用