-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Massive refactoring #79
Conversation
This PR fails to compile atm:
|
@eur0pa because you need to change |
Tested this PR for a few days; it still hangs from time to time but, worst, it will still sometime quit inexplicably after a few hundred requests |
I'm currently working on a big refactor so I hope this error is also fixed (stumbled across it also multiple times) |
@eur0pa I pushed a new commit and did a lot of refactoring. Can you please try the new version and see if the unexpected quit errors are now fixed? |
Seems to be working well for now, except when using extensions: the status progress won't take them into account, as it only counts the number of lines in the wordlist and not the amount of requests-to-be |
thx fixed it to now be a request counter instead of a line counter |
@firefart I believe this breaks because both
|
@anshumanbh it looks like your code uses the "real" libgobuster from current master (that's not going to work). I added some test instructions at the end of the PR description to get it up and running. Which Docker image are you trying to build? |
@firefart Doesn't the status branch of your forked repo also use the real libgobuster. I have a Dockerfile that looks like this:
And, I am using |
no the import statement only says to use libgobuster (in this case the local one). If it's not found locally it will use the one from github (which is bad). Just add the buildsteps from above to your Dockerfile and it should build correctly |
There seems to be a problem with the http library, no matter how you shuffle this code, it won't reuse connections:
This was with 50 threads. I tried implementing a simpler bruteforcer in go and still go the same behavior, no matter how many tricks I try:
Also reading / discarding body doesn't change this behavior, neither in my tool nor gobuster. Any ideas? edit: "fixed" it with
edit 2: apparently, I didn't fix anything. It's a Go long-standing bug: not only all connections will linger in TIME_WAIT, but once the host runs out of filedescriptors, the Go resolver will also fail silently and the requests dropped. That's why dirsearch and gobuster always yield different results when used on a long list of hosts: golang/go#18588 |
@eur0pa I think TIME_WAIT is not directly related to connection reuse, it's a socket thing. Try watching the requests in Wireshark and have a look at the source ports from your machine. If they stay the same, connections are reused. That's how I checked it after implementing it. |
@firefart yeah I went the sysctl way to solve TIME_WAIT both for gobuster and other tools. What really boggles my mind though, is how bad the Go resolver really is. Even in gobuster, any request will also open a socket to to a random resolver picked from
You'll see that everything will start to fail pretty soon. Even by lowering the jobs amount down to 1 or 2 will eventually see it fail. This doesn't happen in Python, and seems to be a long-standing issue with Go (golang/go#18588). Really no idea how to solve this, even in gobuster. |
What's the current state of this PR in general? I'm thinking of starting to write a new PR, but unsure if I should base it on the refactored code in this branch, or the current master. Sorry for the static! |
The status is that this PR is a monster that includes a lot more than a
code refactor. It's taking a lot of time for me to go through it. Time is
something in particularly short on at the moment.
I would hold off submitting anything until this is out of the way. Sorry
mate.
…On Sun., 12 Aug. 2018, 06:40 Joona Hoikkala, ***@***.***> wrote:
What's the current state of this PR in general? I'm thinking of starting
to write a new PR, but unsure if I should base it on the refactored code in
this branch, or the current master. Sorry for the static!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#79 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AABw4K0nGz2Fl1WNjGscXW2bWzu3apW3ks5uP0EvgaJpZM4T9JYk>
.
|
Changes
-to
parameter to specify request timeout (default 10s)gobuster version
is set on every request (old:Go-http-client/1.1
, changeable with command line option)403
to the default status list-
to use STDINgo doc
to check)Memory usage comparison
current master
HTOP
ps
this pr
HTOP
ps
Example runs
during execution
finished
Test instructions
go get -u github.com/OJ/gobuster
cd $GOPATH/src/github.com/OJ/gobuster
git remote add firefart https://github.com/FireFart/gobuster.git
git fetch firefart
git checkout -b status firefart/status
go build