Created
October 7, 2015 12:42
-
-
Save KINGSABRI/5c3b0f0273f717bddb1e to your computer and use it in GitHub Desktop.
ssh forward tunnel
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/evn ruby | |
| require 'net/ssh' | |
| Net::SSH.start("127.0.0.1", 'fish', :password => 'fisheye', :verbose => :debug) do |ssh| | |
| # Forward connections coming on port 3333 to port 3389 of attacker.zone | |
| ssh.forward.local('0.0.0.0', 3333, "172.16.16.136", 80) | |
| puts "[+] Starting SSH port forward tunnel" | |
| ssh.loop { true } | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment