pwncat icon indicating copy to clipboard operation
pwncat copied to clipboard

Add IPv6 support for port forwarding and self-injection

Open oza6ut0ne opened this issue 4 years ago • 0 comments

Add IPv6 support for port forwarding and self-injection

Description / Changes / Goal

Description

Currently only IPv4 address can be specified for port forwarding and self-injection. So added IPv6 support for them like below.

$ pwncat -l 4444 --self-inject /bin/bash:[xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx]:4445
$ pwncat -R [xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx]:4444 10.0.0.1 3306
$ pwncat -L [xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx]:5000 10.0.0.1 3306

Changes

Modified arguments parsing for those options to accept IPv6 address.

Goal

Be able to specify IPv6 address for --self-inject/-R/-L by surrounding the address with [].

PR Checklist

  • [x] GitHub issue linked to this PR?: #88
  • [x] CHANGELOG.md updated?
  • [x] Run make lint?
  • [x] Run make code?

oza6ut0ne avatar Aug 23 '20 10:08 oza6ut0ne