Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/waderwu/extractor-java
CodeQL extractor for java, which don't need to compile java source
https://github.com/waderwu/extractor-java
Last synced: about 1 month ago
JSON representation
CodeQL extractor for java, which don't need to compile java source
- Host: GitHub
- URL: https://github.com/waderwu/extractor-java
- Owner: waderwu
- Created: 2022-04-12T07:59:38.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2022-11-25T08:08:51.000Z (about 2 years ago)
- Last Synced: 2024-08-02T15:34:51.492Z (4 months ago)
- Language: Python
- Size: 464 KB
- Stars: 310
- Watchers: 4
- Forks: 32
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-hacking-lists - waderwu/extractor-java - CodeQL extractor for java, which don't need to compile java source (Python)
README
# Extractor-java
Create CodeQL database directly from Java source code without compiling
## Require
1. Installed CodeQL
2. Linux / MacosOtherwise you need to manually specify the value of variables such as codeql_home,codeql_java_home
## Usage
If there is only jar, you need to decompile it to get the java source code
```bash
unzip your.jar
python3 class2java.py dir
```generate database for java source code
```text
usage: run.py [-h] [-l [LIB ...]] [-ld [LIBDIR ...]] db srcrootCodeQL java extractor.
positional arguments:
db codeql database name
srcroot java source code diroptional arguments:
-h, --help show this help message and exit
-l [LIB ...], --lib [LIB ...]
lib path
-ld [LIBDIR ...], --libdir [LIBDIR ...]
lib dir
```example
```bash
python3 run.py dbname srcroot
python3 run.py dbname srcroot -l lib1.jar lib2.jar
python3 run.py dbname srcroot -ld libdir1 libdir2
```