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
Oh-My-PickleDB is an open source key-value store using Python's json module.

OH-MY-PICKLEDB oh-my-pickleDB is a lightweight, fast, and intuitive data manager written in python 📝 Table of Contents About Getting Started Deployme

Adrián Toral 6 Feb 20, 2022
This repo contains the backend of the KMK project

KMK Backend This repository contains the backend part of the KMK project Demo Watch it on Youtube Getting started Pre-commit hooks After you cloned th

21 Nov 26, 2022
TinyDB is a lightweight document oriented database optimized for your happiness :)

Quick Links Example Code Supported Python Versions Documentation Changelog Extensions Contributing Introduction TinyDB is a lightweight document orien

Markus Siemens 5.6k Dec 30, 2022
A simple GUI that interacts with a database to keep track of a collection of US coins.

CoinCollectorGUI A simple gui designed to interact with a database. The goal of the database is to make keeping track of collected coins simple. The G

Builder212 1 Nov 09, 2021
This project is related to a No-SQL database, whose data are referred to autoctone botanic species

This project is related to a No-SQL database, whose data are referred to autoctone botanic species. The final goal is creating a function that performs the estimation of the ornamental value, given t

Amatofrancesco99 2 Mar 08, 2022
A NoSQL database made in python.

CookieDB A NoSQL database made in python.

cookie 1 Nov 30, 2022
Youtube Kanalinda tanittigim ve Programladigim SQLite3 ile calisan Kütüphane Programi

SQLite3 Kütüphane Uygulamasi SQLite3 ile calisan Kütüphane Arayüzü Yükleme Yerel veritabani olusacaktir. Yaptiginiz islemler kaybolmaz! Temel Gereksin

Mikael Pikulski 6 Aug 13, 2022
A super easy, but really really bad DBMS

Dumb DB Are you looking for a reliable database management system? Then you've come to the wrong place. This is a very small database management syste

Elias Amha 5 Dec 28, 2022
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
A Python wrapper API for operating and working with the Neo4j Graph Data Science (GDS) library

gdsclient This repo hosts the sources for gdsclient, a Python wrapper API for operating and working with the Neo4j Graph Data Science (GDS) library. g

Neo Technology 101 Jan 05, 2023
Tools for analyzing Git history using SQLite

git-history Tools for analyzing Git history using SQLite Installation Install this tool using pip: $ pip install git-history Usage This tool can be r

Simon Willison 128 Jan 02, 2023
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
LightDB is a lightweight JSON Database for Python

LightDB What is this? LightDB is a lightweight JSON Database for Python that allows you to quickly and easily write data to a file Installing pip3 ins

Stanislaw 14 Oct 01, 2022
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
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
Codeqlcompile - 自动反编译闭源应用,创建codeql数据库

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

236 Jan 05, 2023
This is a simple graph database in SQLite, inspired by

This is a simple graph database in SQLite, inspired by "SQLite as a document database".

Denis Papathanasiou 1.2k Jan 03, 2023
Лабораторные работы по Postgresql за 5 семестр

Практикум по Postgresql ERD для заданий 2.x: ERD для заданий 3.x: Их делал вот тут Ниже есть 2 инструкции — по установке postgresql на manjaro и по пе

Danila 10 Oct 31, 2022
Simple embedded in memory json database

dbj dbj is a simple embedded in memory json database. It is easy to use, fast and has a simple query language. The code is fully documented, tested an

Pedro Gonring 25 Aug 12, 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