Skip to content

Instantly share code, notes, and snippets.

@TAbdiukov
Created January 20, 2021 08:59
Show Gist options
  • Save TAbdiukov/03c142aeb36a59ee7bfe8071c424cb8e to your computer and use it in GitHub Desktop.
Save TAbdiukov/03c142aeb36a59ee7bfe8071c424cb8e to your computer and use it in GitHub Desktop.
ObexFtp - generate zergrush script attempt
import hashlib
import sha3
def beautify_hash(raw):
buf = raw.encode('utf-8')
buf = sha3.sha3_224(buf).hexdigest()
return buf
if __name__ == '__main__':
prefix = "obexftp -v -i "
s1_lst = ["", "-U FBS ", "-U none ", "-U IRMC ", "-U S45 ", "-U SHARP "]
s2_lst = ["", "-H "]
s3_lst = ["", "-S "]
s4_lst = ['-g "User Data/Java/7496AD5F.JAR" ', '-g "telecom/push.txt" ']
i5_cnt = 3
ret = "@echo off\ncls\n"
cnt = 1
for s1 in s1_lst:
for s2 in s2_lst:
for s3 in s3_lst:
for s4 in s4_lst:
newline = prefix + s1 + s2 + s3 + s4
print(newline)
h = beautify_hash(newline)
ret += "ECHO {0}. Try {1}\n".format(str(cnt).zfill(3), h)
for i5 in range(i5_cnt):
ret += newline + "\n"
cnt += 1
ret += "PAUSE\n"
print("")
h2 = beautify_hash(ret)
fp = open("script.bat", "w", encoding="ASCII")
fp.write(ret)
fp.close()
print("DONE")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment