-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathnjupload.py
More file actions
executable file
·33 lines (30 loc) · 1.88 KB
/
njupload.py
File metadata and controls
executable file
·33 lines (30 loc) · 1.88 KB
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
#!/usr/bin/env python3
import argparse
import asyncio
from NJUploadHandler import NJUploadHandler, NJ_064_UploadHandler, NJ_07d_UploadHandler, NJ_07dg_UploadHandler
from NJController import NJController
if __name__ == "__main__":
parser = argparse.ArgumentParser(prog="njchat.py")
parser.add_argument("host", type=str, help="The IP/Domain of the njrat C2.")
parser.add_argument("port", type=int, help="The port the njrat C2 is listening on.")
parser.add_argument("-y", "--ver", default="0.7d", type=str, choices=["0.6.4", "0.7d", "0.7dg"], help="Version of NJRat Server. 0.6.4, 0.7d, 0.7dg.")
parser.add_argument("-D", "--delimiter", type=str, help="Used to set a custom delimiter, useful for modded njrat
versions.")
parser.add_argument("-u", "--upload-file", type=str, help="File to upload")
parser.add_argument("-i", "--identifier", type=str, help="The full identifier used on initial callback for the C2 to identify which client the chat session is associated with")
parser.add_argument("-r", "--reported-ip", type=str, help="The IP reported on initial callback for the C2 to identify which client the chat session is associated with")
parser.add_argument("-p", "--reported-port", type=str, help="The port reported on initial callback for the C2 to identify which client the chat session is associated with")
parser.add_argument("--version", action='version', version='%(prog)s 1.0')
args = vars(parser.parse_args())
if args["ver"] == "0.6.4":
controller = NJController(NJ_064_UploadHandler, args, c=None)
if args["ver"] == "0.7d":
controller = NJController(NJ_07d_UploadHandler, args, c=None)
if args["ver"] == "0.7dg":
controller = NJController(NJ_07dg_UploadHandler, args, c=None)
try:
controller.start()
controller._thread.join()
except KeyboardInterrupt:
print("\nGoodbye!")
#print(error)