-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun.py
38 lines (30 loc) · 945 Bytes
/
run.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
import honeypot
import argparse
from ssh import ssht
parser = argparse.ArgumentParser(description="Python3 honeypot")
parser.add_argument(
"ip",
metavar="<IP_Address>",
type=str,
default="127.0.0.1",
help="IP on which Honeypot would be running usually localhost",
)
parser.add_argument("sshport", metavar="<Ports>", type=int, help="Ports On which ssh honepot would be running.")
parser.add_argument("ports", metavar="<Ports>", type=int, nargs="+", help="Ports On which honepot would be running.")
parser.add_argument(
"log",
metavar="<Log_file>",
type=str,
default="connections.log",
help="The File on which Honeypot would be logging any connections",
)
args = parser.parse_args()
ip = args.ip
logfile = args.log
sshport = [args.sshport]
port = args.ports
print(ip, logfile, port)
hon = honeypot.honey(ip, port, logfile)
ssh_run = ssht.sshtp(ip, sshport, logfile, logfile)
hon.run()
ssh_run.run()