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
Python object-oriented database

ZODB, a Python object-oriented database ZODB provides an object-oriented database for Python that provides a high-degree of transparency. ZODB runs on

Zope 574 Dec 31, 2022
HTTP graph database built in Python 3

KiwiDB HTTP graph database built in Python 3. Reference Format References are strings in the format: { JanCraft 1 Dec 17, 2021

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
securedb is a fast and lightweight Python framework to easily interact with JSON-based encrypted databases.

securedb securedb is a Python framework that lets you work with encrypted JSON databases. Features: newkey() to generate an encryption key write(key,

Filippo Romani 2 Nov 23, 2022
pickleDB is an open source key-value store using Python's json module.

pickleDB pickleDB is lightweight, fast, and simple database based on the json module. And it's BSD licensed! pickleDB is Fun import pickledb

Harrison Erd 738 Jan 04, 2023
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
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
Tiny local JSON database for Python.

Pylowdb Simple to use local JSON database 🦉 # This is pure python, not specific to pylowdb ;) db.data['posts'] = ({ 'id': 1, 'title': 'pylowdb is awe

Hussein Sarea 3 Jan 26, 2022
Лабораторные работы по Postgresql за 5 семестр

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

Danila 10 Oct 31, 2022
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
Enfilade: Tool to Detect Infections in MongoDB Instances

Enfilade: Tool to Detect Infections in MongoDB Instances

Aditya K Sood 7 Feb 21, 2022
Shelf DB is a tiny document database for Python to stores documents or JSON-like data

Shelf DB Introduction Shelf DB is a tiny document database for Python to stores documents or JSON-like data. Get it $ pip install shelfdb shelfquery S

Um Nontasuwan 35 Nov 03, 2022
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
A very simple document database

DockieDb A simple in-memory document database. Installation Build the Wheel Fork or clone this repository and run python setup.py bdist_wheel in the r

1 Jan 16, 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
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
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
Codeqlcompile - 自动反编译闭源应用,创建codeql数据库

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

236 Jan 05, 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
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