Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting stuck at the showing results progress #4

Open
Potatowo233 opened this issue Jan 14, 2025 · 2 comments
Open

Getting stuck at the showing results progress #4

Potatowo233 opened this issue Jan 14, 2025 · 2 comments

Comments

@Potatowo233
Copy link

Hello! The QLInspector you provided is extremely useful and has been a great help to me. However, I don't understand why the other four QL files you provided can all display results normally in VSCode, while using QLInspector.ql (not the Old version) gets stuck at the "showing results" progress in VSCode. I even went to sleep and woke up, but it still hadn't loaded.

I wonder if this is related to the complexity of the database I generated? My CodeQL database was generated using another open-source project: https://github.com/waderwu/extractor-java, and the database generation process was also quite slow! If a project uses many dependencies in its pom.xml, I download the dependency code from Maven or GitHub (and if there's no alternative, I decompile the JAR files) to participate in the CodeQL database generation, which makes the database generation process slow as well.

However, apart from this extractor-java tool that can generate a CodeQL database without compilation, I haven't found a better way to generate a complete QL database without encountering errors. If you have any better ideas, I would greatly appreciate your guidance!
image

@Potatowo233
Copy link
Author

Additionally, if you're interested, could you help me analyze this challenge? https://blog.potatowo.top/2025/01/15/SUCTF2024/ez-solon.jar. Recently, I’ve been learning how to use CodeQL to solve a type of Java CTF challenges.THX!:)

@hugo-syn
Copy link
Collaborator

Hi @Potatowo233 that's my fault I forgot to add CodeQL metadata to the query, I've made a new commit you can just git pull and re-run the query.

I'm not sure to understand do you already have a codeql database of your project ? If no there are recent changes with codeql that should allow you to build a database even If you can't build all the components. You first need to decompile your jar (I like to use the decompiler from InteliJ and then run the database creation with --build-mode none:

$ java -jar /opt/idea-.../plugins/java-decompiler/lib/java-decompiler.jar /path/to/compiled-jar /path/to/decompiled/
$ codeql database create /path/to/database --language java -s /path/to/decompiled/ --overwritte --build-mode none

You can paste your commands/errors if you want, I can try to help.

Regarding the CTF challenge could you give more insights on the objectives of the challenge ? :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants