File: port_forward.py

package info (click to toggle)
pwntools 4.15.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 18,508 kB
  • sloc: python: 59,870; ansic: 48,351; asm: 45,047; sh: 396; makefile: 256
file content (10 lines) | stat: -rw-r--r-- 253 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
"""
A very simple port forwarder using `pwnlib.tubes.tube.connect_both()`.
"""

from pwn import *

while True:
    listen(1337).wait_for_connection().connect_both(remote('google.com', 80))

# now point your browser (or curl(1)) to http://localhost:1337