Manipulating network stream with netsed

Netsed page

Netsed is a network packet stream editor.

On a Linux gateway, let’s set a silent redirect to the port netsed will be listening on:

iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-ports 1080

Then start netsed:

netsed tcp 1080 0 80 's/string%20A/string%20B/'

Any “string A” in a web page will be replaced by “string B”.

In the output you would see this:

[+] Caught server -> client packet.
    Applying rule s/string%20A/string%20B...
	[*] Done 1 replacements, forwarding packet of size 1453 (orig 1452).

Thanks for reading this post!

Did you find an issue in this article?

- click on the following Github link
- log into Github with your account
- click on the line number containing the error
- click on the "..." button
- choose "Reference in new issue"
- add a title and your comment
- click "Submit new issue"

Your feedback is much appreciated! πŸ€œπŸΌπŸ€›πŸΌ

You can also drop me a line below!