KissPeter / APIFuzzer

Fuzz test your application using your OpenAPI or Swagger API definition without coding
GNU General Public License v3.0
416 stars 65 forks source link

Space char at the headers argument #64

Open jotapikie opened 1 year ago

jotapikie commented 1 year ago

When I add a header that contains a space character I get an error regarding JSON breaking the content after the space.

usage: APIFuzzer [-h] [-s SRC_FILE] [--src_url SRC_URL] [-r REPORT_DIR] [--level LEVEL] [-u ALTERNATE_URL] [-t TEST_RESULT_DST] [--log {critical,fatal,error,warn,warning,info,debug,notset}] [--basic_output BASIC_OUTPUT] [--headers HEADERS] [-v] APIFuzzer: error: argument --headers: ('%s is not JSON', '[{"Authorization":"Basic')

Is there any way to fix this?

jotapikie commented 1 year ago

The problem is just happens when using the docker version. Fixed it

jotapikie commented 1 year ago

Ok I installed it by default using pip3 install -r "requirements.txt" and "pip3 install ." When I run the command I don't get any output. Any help?

APIFuzzer --src_url https://link.pt/rest/API/swagger.json --url https://link/rest/ --headers '[{"Authorization":"Basic basic64Token"}]' --log debug

mayzhou0401 commented 1 year ago

“The problem is just happens when using the docker version” +1

So I have to run the docker with --entrypoint bash, and then run APIIFuzzer with headers inside container, it works for me now.

KissPeter commented 7 months ago

“The problem is just happens when using the docker version” +1

So I have to run the docker with --entrypoint bash, and then run APIIFuzzer with headers inside container, it works for me now.

@jotapikie Are you using kisspeter/apifuzzer:latest docker, or other from this list? https://hub.docker.com/search?q=apifuzzer