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

go 1.16.6 net/http breaks HellPot #2

Closed
yunginnanet opened this issue Sep 15, 2021 · 3 comments
Closed

go 1.16.6 net/http breaks HellPot #2

yunginnanet opened this issue Sep 15, 2021 · 3 comments
Labels
bug Something isn't working

Comments

@yunginnanet
Copy link
Owner

go1.16.6 and higher breaks HellPot with its changes to net/http

HellPot takes its buffer and begins writing it straight to the http ResponseWriter, but now that ResponseWriter asserts reading the length of the source before it will write the header to our client.

breaking commit: golang/go@cb4cd9e

I am working on rewriting HellPot to use a custom HTTP server that uses raw net.Conn handling, if anyone has a better solution let me know.

@yunginnanet yunginnanet added the bug Something isn't working label Sep 15, 2021
@yunginnanet
Copy link
Owner Author

Exploring fasthttp as a solution.

See development branch.

@yunginnanet
Copy link
Owner Author

yunginnanet commented Sep 15, 2021

As of this commit; HellPot is now using fasthttp. From my (albeit very crude) benchmarks, it's faster, too.

╭─ ⸸kayos⸸  3s1x ~
╰ for run in {1..10}; do rm new.hellpot; rm old.hellpot; curl --silent 127.0.0.1:8080/wp-login>new.hellpot& sleep 3; killall curl; ls -lah new.hellpot && curl --silent 127.0.0.1:8081/wp-login>old.hellpot& sleep 3; killall curl; ls -lah old.hellpot; done
[...]
0644  204M kayos 15 Sep 10:25   new.hellpot
0644  168M kayos 15 Sep 10:25   old.hellpot
[...]
0644  203M kayos 15 Sep 10:25   new.hellpot
0644  170M kayos 15 Sep 10:25   old.hellpot
[...]
0644  206M kayos 15 Sep 10:25   new.hellpot
0644  172M kayos 15 Sep 10:25   old.hellpot
[...]
0644  202M kayos 15 Sep 10:25   new.hellpot
0644  170M kayos 15 Sep 10:25   old.hellpot
[...]
0644  204M kayos 15 Sep 10:25   new.hellpot
0644  172M kayos 15 Sep 10:25   old.hellpot
[...]
0644  194M kayos 15 Sep 10:26   new.hellpot
0644  147M kayos 15 Sep 10:26   old.hellpot
[...]
0644  199M kayos 15 Sep 10:26   new.hellpot
0644  161M kayos 15 Sep 10:26   old.hellpot
[...]
0644  201M kayos 15 Sep 10:26   new.hellpot
0644  161M kayos 15 Sep 10:26   old.hellpot
[...]
0644  191M kayos 15 Sep 10:26   new.hellpot
0644  163M kayos 15 Sep 10:26   old.hellpot
[...]
0644  191M kayos 15 Sep 10:26   new.hellpot
0644  156M kayos 15 Sep 10:26   old.hellpot

@yunginnanet
Copy link
Owner Author

yunginnanet commented Sep 15, 2021

╭─ ⸸kayos⸸  3s1x ~
╰ export _sleep=5; export _ip="192.168.69.5"; for run in {1..10}; do rm new.hellpot; rm old.hellpot; curl --silent $_ip:8080/wp-login>new.hellpot& sleep $_sleep; killall curl; ls -lah new.hellpot && curl --silent $_ip:8081/wp-login>old.hellpot& sleep $_sleep; killall curl; ls -lah old.hellpot; done | grep ".hellpot"

0644  334M kayos 15 Sep 12:46   new.hellpot
0644  281M kayos 15 Sep 12:46   old.hellpot

0644  334M kayos 15 Sep 12:47   new.hellpot
0644  267M kayos 15 Sep 12:47   old.hellpot

0644  326M kayos 15 Sep 12:47   new.hellpot
0644  258M kayos 15 Sep 12:47   old.hellpot

0644  320M kayos 15 Sep 12:47   new.hellpot
0644  275M kayos 15 Sep 12:47   old.hellpot

0644  338M kayos 15 Sep 12:47   new.hellpot
0644  273M kayos 15 Sep 12:47   old.hellpot

0644  324M kayos 15 Sep 12:47   new.hellpot
0644  275M kayos 15 Sep 12:47   old.hellpot

0644  329M kayos 15 Sep 12:47   new.hellpot
0644  277M kayos 15 Sep 12:47   old.hellpot

0644  330M kayos 15 Sep 12:48   new.hellpot
0644  245M kayos 15 Sep 12:48   old.hellpot

0644  331M kayos 15 Sep 12:48   new.hellpot
0644  272M kayos 15 Sep 12:48   old.hellpot

0644  318M kayos 15 Sep 12:48   new.hellpot
0644  272M kayos 15 Sep 12:48   old.hellpot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant