imperva / automatic-api-attack-tool

Imperva's customizable API attack tool takes an API specification as an input, generates and runs attacks that are based on it as an output.
MIT License
451 stars 91 forks source link

Error on kali Linux App #2

Closed alishahaan closed 4 years ago

alishahaan commented 4 years ago

I got an error while running this command

api-attack.sh -f swaggerPetStore.json -n myapisite.com -s http -rcn=403

Error: Could not find or load main class com.imperva.apiattacktool.ToolMain Caused by: java.lang.ClassNotFoundException: com.imperva.apiattacktool.ToolMain

thenorthernpole commented 4 years ago

Hi,

Thanks for reaching out.

  1. Please provide the steps you performed before running this command.
  2. Try running: java -jar imperva-api-attack-tool.jar, what does this command output?
alishahaan commented 4 years ago

I have tried these steps on windows cmd step 1 : gradlew build --warning-mode=all result= BUILD SUCCESSFUL step 2 : cd build/libs step2 generates a zip file in libs folder named as: "automatic-api-attack-tool-master.jar" step3 : java-jar automatic-api-attack-tool-master.jar Error: Could not find or load main class com.imperva.apiattacktool.ToolMain Caused by: java.lang.ClassNotFoundException: com.imperva.apiattacktool.ToolMain

thenorthernpole commented 4 years ago

Hi,

I am not sure what you are running here exactly since the outputted jar file name convention is not by what has been defined in build.gradle. Have you changed the file? Which Gradle version are you using?

Thanks!

thenorthernpole commented 4 years ago

@alishahaan you haven't responded. My guessing is that you've found the issue?