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

Check localhost instead of my defined hostname #40

Closed
PayamVA opened this issue Jul 21, 2020 · 1 comment
Closed

Check localhost instead of my defined hostname #40

PayamVA opened this issue Jul 21, 2020 · 1 comment

Comments

@PayamVA
Copy link

PayamVA commented Jul 21, 2020

Hi folks,

I used the example you made for the docker:

docker run -ti --rm -v pwd:/data --rm wafbench ftw_compatible_tool -d /data/regression.db -x "load util/regression-test/crs-v3.1/black-box/ | gen | start hostname:port| report | exit"

I changed hostname:port to www.mywebsite.com:443 or www.mywebsite.com:80 but it still check my localhost ( I guess the default value from the regression-test)!

Examples:

docker run -ti --rm -v pwd:/data --rm wafbench ftw_compatible_tool -d /data/regression.db -x "load util/regression-test/crs-v3.1/black-box/ | gen | start www.mywebsite.com:443| report | exit"

OR

docker run -ti --rm -v pwd:/data --rm wafbench ftw_compatible_tool -d /data/regression.db -x "load util/regression-test/crs-v3.1/black-box/ | gen | start www.mywebsite.com:80| report | exit"

Can you please advise what should be done?

Note: I fixed the issue by changing the original files in WAFBench/util/regression-test, I converted all dest_addr and port to my host name and port number.

@Pterosaur
Copy link
Member

Pterosaur commented Aug 20, 2020

Hi Payam,

Sorry for too late response.
Yes, you are right, the hostname:localhost and port:80 were hard coded into the regression-test. Because if the target machine was behind a proxy and we cannot know what is the real hostname. We also need to modify the original files in regression-test in our scenario.
We provided a simple script, https://github.com/microsoft/WAFBench/blob/master/tools/hostname_port_modifier.sh, to do what you want.

But thanks for your issue, I will polish our Readme to make it clearer.

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