On Sun, 18 Jul 2021 22:36:47 -0000
Martin Gregorie <mar...@mydomain.invalid> wrote:
> On Sun, 18 Jul 2021 21:49:12 +0000, Spiros Bousbouras wrote:
> > The other will store in a file the HTTP requests and responses between
> > any router and the browser and hopefully by studying those the user will
> > learn how to reproduce programmatically the requests which modify the
> > settings as they want them. Even the utility specific to my router is
> > not that specialised because the router was provided by Virginmedia
> > which is one of the most popular U.K. ISPs and I posted to uk* groups.
> >
> What does this offer that Wireshark doesn't do? Apart, that is, from only
> looking at HTTP and HTTPS traffic?
Possibly nothing. I don't remember if I had heard of wireshark before your
post. Before I wrote my code I was guessing that probably tools existed which
would provide the functionality I wanted but that they would be general
purpose and complicated. So , since I had never used such a tool , I figured
it would be simpler to build something small myself and add further
functionality as needed rather than start with something preexisting but big
and try to figure out how to make it do what I wanted.
In any case , how complicated would it be to do with wireshark the
following :
* Make it listen for connections on port 8080.
* Drop non local connections so that only the browser running on the same
computer can connect.
* Forward everything it gets to the router , then forward any replies from
the router back to the browser and continue like this back and forth until
terminated. With each side it must reproduce exactly what happened with the
other. So for example , if a router sends a response and then terminates the
connection then wireshark must forward the response to the browser and also
terminate the connection ; but if the router sent a response and did not
terminate the connection then wireshark must forward the response to the
browser and not close the connection. It must also store all the exchanges
in a file.
There were a couple of other things I thought that I might have needed to do
but in the end weren't necessary. Using my utility as an intermediary between
the browser and the router , the browser was adding the following 2 lines in
the header :
Host: localhost:8080
Referer:
http://localhost:8080/
I was concerned that the router may modify its behaviour based on the
existence of those lines. If this had happened , my utility would have needed
to eliminate the Referer: line , change the Host: line so that it had
the address of the router and otherwise preserve the header and body as it
received them from the browser. Can wireshark do this ?
> Wireshark is my current go-to tool whenever I need to understand network,
> i.e. TCP/IP, traffic in any detail.
--
Am I *no one* ? Are you *no one* ? Because that's all we can ever have of each
other: an imitation, a Copy. All we can ever know about are the portraits of
each other inside our own skulls.
"A kidnapping" by Greg Egan