Ronald Wayne
Ronald Wayne
CC#
Created by Ronald Wayne on 7/29/2024 in #help
✅ attempting to encrypt with ECB
Yeah
91 replies
CC#
Created by Ronald Wayne on 7/29/2024 in #help
✅ attempting to encrypt with ECB
thank you sm and sorry for wasting your time on this lmfao
91 replies
CC#
Created by Ronald Wayne on 7/29/2024 in #help
✅ attempting to encrypt with ECB
getting 376BB7559E97F260B449928CAC9A73B9C73597A4FA55A392D77218F357078073A3CC72635D3D58656203B4DF436B0FE41C8A962418F61E3AB2D9B1179CFF0F727C469775A7E6C17E780AFC9A7AB3EB44 from c# now
91 replies
CC#
Created by Ronald Wayne on 7/29/2024 in #help
✅ attempting to encrypt with ECB
yup that was it
91 replies
CC#
Created by Ronald Wayne on 7/29/2024 in #help
✅ attempting to encrypt with ECB
wait no
91 replies
CC#
Created by Ronald Wayne on 7/29/2024 in #help
✅ attempting to encrypt with ECB
should i be doing BitConverter.ToString(md5.ComputeHash(data_concat)) in the list then?
91 replies
CC#
Created by Ronald Wayne on 7/29/2024 in #help
✅ attempting to encrypt with ECB
91 replies
CC#
Created by Ronald Wayne on 7/29/2024 in #help
✅ attempting to encrypt with ECB
md5originBytes: b'b29da881b5507b49e0d19957805d57ec'
fmtBytes: b'1'
songidBytes: b'3599689'
mediaverBytes: b'7'
data_concat: b'b29da881b5507b49e0d19957805d57ec\xa41\xa43599689\xa47'
md5Hash: b'98ad3bbbbe513c6c350912819a7a6fe4'
data: b'98ad3bbbbe513c6c350912819a7a6fe4\xa4b29da881b5507b49e0d19957805d57ec\xa41\xa43599689\xa47\xa4\x00\x00'
Padded data length: 80
b'376bb7559e97f260b449928cac9a73b9c73597a4fa55a392d77218f357078073a3cc72635d3d58656203b4df436b0fe41c8a962418f61e3ab2d9b1179cff0f727c469775a7e6c17e780afc9a7ab3eb44'
b'376bb7559e97f260b449928cac9a73b9c73597a4fa55a392d77218f357078073a3cc72635d3d58656203b4df436b0fe41c8a962418f61e3ab2d9b1179cff0f727c469775a7e6c17e780afc9a7ab3eb44'
md5originBytes: b'b29da881b5507b49e0d19957805d57ec'
fmtBytes: b'1'
songidBytes: b'3599689'
mediaverBytes: b'7'
data_concat: b'b29da881b5507b49e0d19957805d57ec\xa41\xa43599689\xa47'
md5Hash: b'98ad3bbbbe513c6c350912819a7a6fe4'
data: b'98ad3bbbbe513c6c350912819a7a6fe4\xa4b29da881b5507b49e0d19957805d57ec\xa41\xa43599689\xa47\xa4\x00\x00'
Padded data length: 80
b'376bb7559e97f260b449928cac9a73b9c73597a4fa55a392d77218f357078073a3cc72635d3d58656203b4df436b0fe41c8a962418f61e3ab2d9b1179cff0f727c469775a7e6c17e780afc9a7ab3eb44'
b'376bb7559e97f260b449928cac9a73b9c73597a4fa55a392d77218f357078073a3cc72635d3d58656203b4df436b0fe41c8a962418f61e3ab2d9b1179cff0f727c469775a7e6c17e780afc9a7ab3eb44'
91 replies
CC#
Created by Ronald Wayne on 7/29/2024 in #help
✅ attempting to encrypt with ECB
from Crypto.Hash import MD5
from binascii import a2b_hex, b2a_hex
from Crypto.Cipher import AES
def md5hex(data):
""" return hex string of md5 of the given string """
# type(data): bytes
# returns: bytes
h = MD5.new()
h.update(data)
return b2a_hex(h.digest())
def hexaescrypt(data, key):
c = AES.new(key.encode(), AES.MODE_ECB)
a = b2a_hex(c.encrypt(data))
print(a)
return a
def genurlkey(songid, md5origin, mediaver=4, fmt=1):
data_concat = b'\xa4'.join(_ for _ in [md5origin.encode(),
str(fmt).encode(),
str(songid).encode(),
str(mediaver).encode()])
data = b'\xa4'.join([md5hex(data_concat), data_concat]) + b'\xa4'
if len(data) % 16 != 0:
data += b'\0' * (16 - len(data) % 16)
print("md5originBytes:", md5origin.encode())
print("fmtBytes:", str(fmt).encode())
print("songidBytes:", str(songid).encode())
print("mediaverBytes:", str(mediaver).encode())
print("data_concat:", data_concat)
print("md5Hash:", md5hex(data_concat))
print("data:", data)
print("Padded data length:", len(data))
return hexaescrypt(data, "jo6aey6haid2Teih")


print(genurlkey("3599689","b29da881b5507b49e0d19957805d57ec",7,1))
from Crypto.Hash import MD5
from binascii import a2b_hex, b2a_hex
from Crypto.Cipher import AES
def md5hex(data):
""" return hex string of md5 of the given string """
# type(data): bytes
# returns: bytes
h = MD5.new()
h.update(data)
return b2a_hex(h.digest())
def hexaescrypt(data, key):
c = AES.new(key.encode(), AES.MODE_ECB)
a = b2a_hex(c.encrypt(data))
print(a)
return a
def genurlkey(songid, md5origin, mediaver=4, fmt=1):
data_concat = b'\xa4'.join(_ for _ in [md5origin.encode(),
str(fmt).encode(),
str(songid).encode(),
str(mediaver).encode()])
data = b'\xa4'.join([md5hex(data_concat), data_concat]) + b'\xa4'
if len(data) % 16 != 0:
data += b'\0' * (16 - len(data) % 16)
print("md5originBytes:", md5origin.encode())
print("fmtBytes:", str(fmt).encode())
print("songidBytes:", str(songid).encode())
print("mediaverBytes:", str(mediaver).encode())
print("data_concat:", data_concat)
print("md5Hash:", md5hex(data_concat))
print("data:", data)
print("Padded data length:", len(data))
return hexaescrypt(data, "jo6aey6haid2Teih")


print(genurlkey("3599689","b29da881b5507b49e0d19957805d57ec",7,1))
this outputs
91 replies
CC#
Created by Ronald Wayne on 7/29/2024 in #help
✅ attempting to encrypt with ECB
ok
91 replies
CC#
Created by Ronald Wayne on 7/29/2024 in #help
✅ attempting to encrypt with ECB
ok ill just share my functions and their results just straight up gimme a sec
91 replies
CC#
Created by Ronald Wayne on 7/29/2024 in #help
✅ attempting to encrypt with ECB
thats from the str(...).encode
91 replies
CC#
Created by Ronald Wayne on 7/29/2024 in #help
✅ attempting to encrypt with ECB
[un@archlinux Debug]$ mono app.exe
md5originBytes: 62-32-39-64-61-38-38-31-62-35-35-30-37-62-34-39-65-30-64-31-39-39-35-37-38-30-35-64-35-37-65-63
fmtBytes: 31
songidBytes: 33-35-39-39-36-38-39
mediaverBytes: 37
data_concat: 62-32-39-64-61-38-38-31-62-35-35-30-37-62-34-39-65-30-64-31-39-39-35-37-38-30-35-64-35-37-65-63-A4-31-A4-33-35-39-39-36-38-39-A4-37
md5Hash: 98-AD-3B-BB-BE-51-3C-6C-35-09-12-81-9A-7A-6F-E4
data: 98-AD-3B-BB-BE-51-3C-6C-35-09-12-81-9A-7A-6F-E4-A4-62-32-39-64-61-38-38-31-62-35-35-30-37-62-34-39-65-30-64-31-39-39-35-37-38-30-35-64-35-37-65-63-A4-31-A4-33-35-39-39-36-38-39-A4-37
append: 98-AD-3B-BB-BE-51-3C-6C-35-09-12-81-9A-7A-6F-E4-A4-62-32-39-64-61-38-38-31-62-35-35-30-37-62-34-39-65-30-64-31-39-39-35-37-38-30-35-64-35-37-65-63-A4-31-A4-33-35-39-39-36-38-39-A4-37-A4
paddedData: 98-AD-3B-BB-BE-51-3C-6C-35-09-12-81-9A-7A-6F-E4-A4-62-32-39-64-61-38-38-31-62-35-35-30-37-62-34-39-65-30-64-31-39-39-35-37-38-30-35-64-35-37-65-63-A4-31-A4-33-35-39-39-36-38-39-A4-37-A4-00-00
Length: 64
Final Data:
0x98 0xad 0x3b 0xbb 0xbe 0x51 0x3c 0x6c 0x35 0x09 0x12 0x81 0x9a 0x7a 0x6f 0xe4 0xa4 0x62 0x32 0x39 0x64 0x61 0x38 0x38 0x31 0x62 0x35 0x35 0x30 0x37 0x62 0x34 0x39 0x65 0x30 0x64 0x31 0x39 0x39 0x35 0x37 0x38 0x30 0x35 0x64 0x35 0x37 0x65 0x63 0xa4 0x31 0xa4 0x33 0x35 0x39 0x39 0x36 0x38 0x39 0xa4 0x37 0xa4 0x00 0x00
64
AS COMBINED
98AD3BBBBE513C6C350912819A7A6FE4A46232396461383831623535303762343965306431393935373830356435376563A431A433353939363839A437A40000
encrypting
B9161861D4B8C6BFFCF574172E570426A3CC72635D3D58656203B4DF436B0FE41C8A962418F61E3AB2D9B1179CFF0F727C469775A7E6C17E780AFC9A7AB3EB44
[un@archlinux Debug]$ mono app.exe
md5originBytes: 62-32-39-64-61-38-38-31-62-35-35-30-37-62-34-39-65-30-64-31-39-39-35-37-38-30-35-64-35-37-65-63
fmtBytes: 31
songidBytes: 33-35-39-39-36-38-39
mediaverBytes: 37
data_concat: 62-32-39-64-61-38-38-31-62-35-35-30-37-62-34-39-65-30-64-31-39-39-35-37-38-30-35-64-35-37-65-63-A4-31-A4-33-35-39-39-36-38-39-A4-37
md5Hash: 98-AD-3B-BB-BE-51-3C-6C-35-09-12-81-9A-7A-6F-E4
data: 98-AD-3B-BB-BE-51-3C-6C-35-09-12-81-9A-7A-6F-E4-A4-62-32-39-64-61-38-38-31-62-35-35-30-37-62-34-39-65-30-64-31-39-39-35-37-38-30-35-64-35-37-65-63-A4-31-A4-33-35-39-39-36-38-39-A4-37
append: 98-AD-3B-BB-BE-51-3C-6C-35-09-12-81-9A-7A-6F-E4-A4-62-32-39-64-61-38-38-31-62-35-35-30-37-62-34-39-65-30-64-31-39-39-35-37-38-30-35-64-35-37-65-63-A4-31-A4-33-35-39-39-36-38-39-A4-37-A4
paddedData: 98-AD-3B-BB-BE-51-3C-6C-35-09-12-81-9A-7A-6F-E4-A4-62-32-39-64-61-38-38-31-62-35-35-30-37-62-34-39-65-30-64-31-39-39-35-37-38-30-35-64-35-37-65-63-A4-31-A4-33-35-39-39-36-38-39-A4-37-A4-00-00
Length: 64
Final Data:
0x98 0xad 0x3b 0xbb 0xbe 0x51 0x3c 0x6c 0x35 0x09 0x12 0x81 0x9a 0x7a 0x6f 0xe4 0xa4 0x62 0x32 0x39 0x64 0x61 0x38 0x38 0x31 0x62 0x35 0x35 0x30 0x37 0x62 0x34 0x39 0x65 0x30 0x64 0x31 0x39 0x39 0x35 0x37 0x38 0x30 0x35 0x64 0x35 0x37 0x65 0x63 0xa4 0x31 0xa4 0x33 0x35 0x39 0x39 0x36 0x38 0x39 0xa4 0x37 0xa4 0x00 0x00
64
AS COMBINED
98AD3BBBBE513C6C350912819A7A6FE4A46232396461383831623535303762343965306431393935373830356435376563A431A433353939363839A437A40000
encrypting
B9161861D4B8C6BFFCF574172E570426A3CC72635D3D58656203B4DF436B0FE41C8A962418F61E3AB2D9B1179CFF0F727C469775A7E6C17E780AFC9A7AB3EB44
91 replies
CC#
Created by Ronald Wayne on 7/29/2024 in #help
✅ attempting to encrypt with ECB
huh
91 replies
CC#
Created by Ronald Wayne on 7/29/2024 in #help
✅ attempting to encrypt with ECB
md5originBytes: b'b29da881b5507b49e0d19957805d57ec'
fmtBytes: b'1'
songidBytes: b'3599689'
mediaverBytes: b'7'
data_concat: b"b'b29da881b5507b49e0d19957805d57ec\\xa41\\xa43599689\\xa47'"
md5Hash: b"b'98ad3bbbbe513c6c350912819a7a6fe4'"
data: b"b'98ad3bbbbe513c6c350912819a7a6fe4\\xa4b29da881b5507b49e0d19957805d57ec\\xa41\\xa43599689\\xa47\\xa4\\x00\\x00'"
Padded data length: 80
b'376bb7559e97f260b449928cac9a73b9c73597a4fa55a392d77218f357078073a3cc72635d3d58656203b4df436b0fe41c8a962418f61e3ab2d9b1179cff0f727c469775a7e6c17e780afc9a7ab3eb44'
md5originBytes: b'b29da881b5507b49e0d19957805d57ec'
fmtBytes: b'1'
songidBytes: b'3599689'
mediaverBytes: b'7'
data_concat: b"b'b29da881b5507b49e0d19957805d57ec\\xa41\\xa43599689\\xa47'"
md5Hash: b"b'98ad3bbbbe513c6c350912819a7a6fe4'"
data: b"b'98ad3bbbbe513c6c350912819a7a6fe4\\xa4b29da881b5507b49e0d19957805d57ec\\xa41\\xa43599689\\xa47\\xa4\\x00\\x00'"
Padded data length: 80
b'376bb7559e97f260b449928cac9a73b9c73597a4fa55a392d77218f357078073a3cc72635d3d58656203b4df436b0fe41c8a962418f61e3ab2d9b1179cff0f727c469775a7e6c17e780afc9a7ab3eb44'
91 replies
CC#
Created by Ronald Wayne on 7/29/2024 in #help
✅ attempting to encrypt with ECB
lemme make them all str.encode and rerun it
91 replies
CC#
Created by Ronald Wayne on 7/29/2024 in #help
✅ attempting to encrypt with ECB
Console.WriteLine("md5originBytes: " + BitConverter.ToString(md5originBytes));
Console.WriteLine("fmtBytes: " + BitConverter.ToString(fmtBytes));
Console.WriteLine("songidBytes: " + BitConverter.ToString(songidBytes));
Console.WriteLine("mediaverBytes: " + BitConverter.ToString(mediaverBytes));
Console.WriteLine("data_concat: " + BitConverter.ToString(data_concat));
Console.WriteLine("md5Hash: " + BitConverter.ToString(md5.ComputeHash(data_concat)));
Console.WriteLine("data: " + BitConverter.ToString(data));
Console.WriteLine("append: " + BitConverter.ToString(append));
Console.WriteLine("paddedData: " + BitConverter.ToString(paddedData));
Console.WriteLine("Length: " + paddedData.Length);
Console.WriteLine("md5originBytes: " + BitConverter.ToString(md5originBytes));
Console.WriteLine("fmtBytes: " + BitConverter.ToString(fmtBytes));
Console.WriteLine("songidBytes: " + BitConverter.ToString(songidBytes));
Console.WriteLine("mediaverBytes: " + BitConverter.ToString(mediaverBytes));
Console.WriteLine("data_concat: " + BitConverter.ToString(data_concat));
Console.WriteLine("md5Hash: " + BitConverter.ToString(md5.ComputeHash(data_concat)));
Console.WriteLine("data: " + BitConverter.ToString(data));
Console.WriteLine("append: " + BitConverter.ToString(append));
Console.WriteLine("paddedData: " + BitConverter.ToString(paddedData));
Console.WriteLine("Length: " + paddedData.Length);
print("md5originBytes:", md5origin.encode())
print("fmtBytes:", str(fmt).encode())
print("songidBytes:", str(songid).encode())
print("mediaverBytes:", str(mediaver).encode())
print("data_concat:", data_concat)
print("md5Hash:", md5hex(data_concat))
print("data:", data)
print("Padded data length:", len(data))
print("md5originBytes:", md5origin.encode())
print("fmtBytes:", str(fmt).encode())
print("songidBytes:", str(songid).encode())
print("mediaverBytes:", str(mediaver).encode())
print("data_concat:", data_concat)
print("md5Hash:", md5hex(data_concat))
print("data:", data)
print("Padded data length:", len(data))
91 replies
CC#
Created by Ronald Wayne on 7/29/2024 in #help
✅ attempting to encrypt with ECB
For python im just printing all variables with .encode and c# bitconverter.tostring
91 replies
CC#
Created by Ronald Wayne on 7/29/2024 in #help
✅ attempting to encrypt with ECB
top is py bottom is c#
91 replies
CC#
Created by Ronald Wayne on 7/29/2024 in #help
✅ attempting to encrypt with ECB
No description
91 replies