Codeqlcompile - 自动反编译闭源应用,创建codeql数据库

Related tags

Databasecodeql
Overview

codeql_compile

自动反编译闭源应用,创建codeql数据库

准备

首先下载ecj.jar和idea提供反编译的java-decompiler.jar,将其放置在脚本的相同目录中。

使用方法

1.在windows上使用 2.第二步不是必须项,可以直接执行第一步,然后就可以开始创建数据库 3.最好限制下要分析的包范围,过大反而不利于分析。

1、反编译项目

默认情况下使用java-decompiler.jar进行反编译

参数-a:指定项目源代码

参数-d:指定反编译代码的依赖包路径

python3 codeql_compile.py -a D:\project\java\apps\2\cloud -d D:\project\java\apps\BOOT-INF\lib

执行后会在当前目录生成 [项目名]save[时间戳] 目录,该目录的run.cmd是编译代码的执行文件

2、校验反编译

对java-decompiler反编译的内容先编译一遍确认失败文件,再使用procyon反编译替换失败文件

先下载procyon.jar,将其放置在脚本的相同目录中

参数-o:指定成功反编译代码存放的路径,即先前java-decompiler.jar反编译后的路径

参数-c:启用校验

python3 codeql_compile.py -a D:\project\java\apps\2\cloud -o D:\project\java\apps\BOOT-INF\lib -c

3、使用codeql创建数据库

参数--command:指定生成的run.cmd

D:\codeql.exe database create D:\codeql\databases\demo-database --language="java" --source-root=D:\codeql\demo_save_1641018608 --command="run.cmd"
You might also like...
Comments
  • FileNotFoundError: [WinError 3] 系统找不到指定的路径。

    FileNotFoundError: [WinError 3] 系统找不到指定的路径。

    E:\codeql\codeql_compile
    λ python3 codeql_compile.py -a D:\infiles -o D:\infiles_save_1643827355 -c
    Traceback (most recent call last):
      File "E:\codeql\codeql_compile\codeql_compile.py", line 127, in <module>
        check()
      File "E:\codeql\codeql_compile\codeql_compile.py", line 70, in check
        shutil.rmtree(save_path + "/procyon_class")
      File "E:\Python39\lib\shutil.py", line 737, in rmtree
        return _rmtree_unsafe(path, onerror)
      File "E:\Python39\lib\shutil.py", line 596, in _rmtree_unsafe
        onerror(os.scandir, path, sys.exc_info())
      File "E:\Python39\lib\shutil.py", line 593, in _rmtree_unsafe
        with os.scandir(path) as scandir_it:
    FileNotFoundError: [WinError 3] 系统找不到指定的路径。: 'D:\\infiles_save_1643827355/procyon_class'
    
    opened by maybe-why-not 1
A Modular MWDB Utility to Collect Fresh Malware Samples

MWDB Feeds A Modular MWDB Utility to Collect Fresh Malware Samples This project is FREE as in FREE 🍺 , use it commercially, privately or however you

c3rb3ru5 32 Jul 07, 2022
AWS Tags As A Database is a Python library using AWS Tags as a Key-Value database.

AWS Tags As A Database is a Python library using AWS Tags as a Key-Value database. This database is completely free* 💸

Oren Leung 42 Nov 25, 2022
PathfinderMonsterDatabase - A database of all monsters in Pathfinder 1e, created by parsing aonprd.com

PathfinderMonsterDatabase A database of all monsters in Pathfinder 1e, created by parsing aonprd.com Setup Run the following line to install all requi

Yoni Lerner 11 Jun 12, 2022
A Simple , ☁️ Lightweight , 💪 Efficent JSON based database for 🐍 Python.

A Simple, Lightweight, Efficent JSON based DataBase for Python The current stable version is v1.6.1 pip install pysondb==1.6.1 Support the project her

PysonDB 282 Jan 07, 2023
Migrate data from SQL to NoSQL easily

Migrate data from SQL to NoSQL easily Installation 💯 pip install sql2nosql --upgrade Dependencies 📢 For the package to work, it first needs "clients

Facundo Padilla 43 Mar 26, 2022
ChaozzDBPy - A python implementation based on the original ChaozzDB from Chaozznl with some new features

ChaozzDBPy About ChaozzDBPy is a python implementation based on the original Cha

Igor Iglesias 1 May 25, 2022
Codeqlcompile - 自动反编译闭源应用,创建codeql数据库

codeql_compile 自动反编译闭源应用,创建codeql数据库 准备 首先下载ecj.jar和idea提供反编译的java-decompiler.ja

236 Jan 05, 2023
TelegramDB - A library which uses your telegram account as a database for your projects

TelegramDB A library which uses your telegram account as a database for your projects. Basic Usage from pyrogram import Client from telegram import Te

Kaizoku 79 Nov 22, 2022
A Persistent Embedded Graph Database for Python

Cog - Embedded Graph Database for Python cogdb.io New release: 2.0.5! Installing Cog pip install cogdb Cog is a persistent embedded graph database im

Arun Mahendra 214 Dec 30, 2022
ClutterDB - Extremely simple JSON database made for infrequent changes which behaves like a dict

extremely simple JSON database made for infrequent changes which behaves like a dict this was made for ClutterBot

Clutter Development 1 Jan 12, 2022
Elara DB is an easy to use, lightweight NoSQL database that can also be used as a fast in-memory cache.

Elara DB is an easy to use, lightweight NoSQL database written for python that can also be used as a fast in-memory cache for JSON-serializable data. Includes various methods and features to manipula

Saurabh Pujari 101 Jan 04, 2023
Makes google's political ad database actually useful

Making Google's political ad transparency library suck less This is a series of scripts that takes Google's political ad transparency data and makes t

The Guardian 7 Apr 28, 2022
Given a metadata file with relevant schema, an SQL Engine can be run for a subset of SQL queries.

Mini-SQL-Engine Given a metadata file with relevant schema, an SQL Engine can be run for a subset of SQL queries. The query engine supports Project, A

Prashant Raj 1 Dec 03, 2021
Code for a db backend that relies on bash tools (grep, cat, echo, etc)

Simple-nosql-db is a python backend for a database that relies on unix tools such as cat, echo and grep. Funny enough I got the idea from this discuss

Sebastian Alonso 10 Aug 13, 2019
Monty, Mongo tinified. MongoDB implemented in Python !

Monty, Mongo tinified. MongoDB implemented in Python ! Was inspired by TinyDB and it's extension TinyMongo

David Lai 523 Jan 02, 2023
EmployeeDB - Advanced Redis search functionalities on Python applied on an Employee management backend app

EmployeeDB - Advanced Redis search functionalities on Python applied on an Employee management backend app

Ahmad Bazzi 58 Oct 10, 2022
Decentralised graph database management system

Decentralised graph database management system To get started clone the repo, and run the command below. python3 database.py Now, create a new termina

Omkar Patil 2 Apr 18, 2022
LaikaDB, banco de dados para projetos simples.

LaikaDB LaikaDB é um banco de dados noSQL para uso local e simples, onde você pode realizar gravações e leituras de forma eficiente e simples. Todos o

Jaedson Silva 0 Jun 24, 2022
Metrics-advisor - Analyze reshaped metrics from TiDB cluster Prometheus and give some advice about anomalies and correlation.

metrics-advisor Analyze reshaped metrics from TiDB cluster Prometheus and give some advice about anomalies and correlation. Team freedeaths mashenjun

3 Jan 07, 2022
Turn SELECT queries returned by a query into links to execute them

datasette-query-links Turn SELECT queries returned by a query into links to execute them Installation Install this plugin in the same environment as D

Simon Willison 5 Apr 27, 2022