mirror of
https://github.com/dobin/ShellcodeObfuscationLab
synced 2026-06-08 13:53:31 +00:00
19 lines
380 B
Python
19 lines
380 B
Python
#!/usr/bin/env python3
|
|
from base64 import b64encode
|
|
import sys
|
|
|
|
|
|
def base64api(input_file) -> str:
|
|
try:
|
|
plaintext = open(input_file, "rb").read()
|
|
except:
|
|
print("File argument needed! %s <raw payload file>" % sys.argv[0])
|
|
sys.exit()
|
|
|
|
b64 = b64encode(plaintext).decode('utf-8')
|
|
|
|
b64 = 'const char* base64 = "' + b64 + '";\n'
|
|
|
|
return b64
|
|
|