wallarm / gotestwaf

An open-source project in Golang to asess different API Security tools and WAF for detection logic and bypasses

Home Page:https://lab.wallarm.com/test-your-waf-before-hackers/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unable to send report to email

drey143 opened this issue · comments

commented

Hello I'm wondering why the report is unable to be sent to my email. any help will be appreciated.thanks

ERRO[0500] caught error in main function                 error="couldn't send report by email: couldn't marshal report data into JSON format: json: unsupported value: NaN"

Hi!

Thanks for the report! This looks like a bug. I added a check for NaN floating point values to prevent this behavior.

commented

Hi @svkirillov thanks for your quick response. I just tried it now and still getting same error message

Could you please provide full command with url option?

commented

I'm testing this with a simple "Nginx" server to test WAF rule. below is a screenshot of what the test returns.

here is a complete url : go run ./cmd --url=http://nginx-server-test-loadbalancer-614402827.us-east-1.elb.amazonaws.com --blockStatusCode 200

Screen Shot 2022-11-29 at 6 36 14 AM

commented

it's strange everything is 0.00% or n/a. because the default_action in place for the WAF right now is "count". the nginx server has nothing install on it, just the default page for nginx

blockStatusCode is equal to 20. Is it ok?

commented

that was a typo..its 200

Fixed some calculations in #173. Could you check if it works properly for you?

commented

@svkirillov .its working now. thank you