Acce Posted August 16, 2020 Posted August 16, 2020 Im trying to generate a signature, Here is the javascript code that generates the code _generateRequestPayloadSignature: function(a) { return Ea.substr(sQ.encode(this._hash + "A3s8Y8368IWD+LhkP9atK/hZkfb0U2RarDNBZhGjh0gz0KQ8usvHyZkah2j4mcfTVaDEZVmuf2ZRoyt91a295g==" + a), 0, 10) } To be honest I dont understand how this work , but is it possible to make the same code for autoit getting the same result here is the string i want to generate a signature from json?h=riwaZCRx9wdmkZ6Mey1yRmkf any help would be much appreciated
Danyfirex Posted August 16, 2020 Posted August 16, 2020 Hello. It's hard to know what you want to do without see more code. we don't know what "sQ.encode" is and "Ea." or the parameter passed. I'm almost sure It's possible but you need to share a code we can run for testing. Saludos Danysys.com AutoIt... UDFs: VirusTotal API 2.0 UDF - libZPlay UDF - Apps: Guitar Tab Tester - VirusTotal Hash Checker Examples: Text-to-Speech ISpVoice Interface - Get installed applications - Enable/Disable Network connection PrintHookProc - WINTRUST - Mute Microphone Level - Get Connected NetWorks - Create NetWork Connection ShortCut
Danyfirex Posted August 16, 2020 Posted August 16, 2020 Hello. It's hard to know what you want to do without see more code. we don't know what "sQ.encode" is and "Ea." or the parameter passed. I'm almost sure It's possible but you need to share a code we can run for testing. Saludos Danysys.com AutoIt... UDFs: VirusTotal API 2.0 UDF - libZPlay UDF - Apps: Guitar Tab Tester - VirusTotal Hash Checker Examples: Text-to-Speech ISpVoice Interface - Get installed applications - Enable/Disable Network connection PrintHookProc - WINTRUST - Mute Microphone Level - Get Connected NetWorks - Create NetWork Connection ShortCut
Acce Posted August 16, 2020 Author Posted August 16, 2020 Hi thanks for your reply . and I see your point the data was scattered all around the site im working with . I dont understand how I was able to solve this but somehow I managed the code I ended up with looks like this , probably can be prettier but it works Func _generateRequestPayloadSignature() ;testbelow global $User_Key = "0vj5guG531i-_hEBdPobPCq8" global $payload = '[{"__class__":"ServerRequest","requestData":[],"requestClass":"StartupService","requestMethod":"getData","requestId":1}]' global $data = $User_Key & "A3s8Y8368IWD+LhkP9atK/hZkfb0U2RarDNBZhGjh0gz0KQ8usvHyZkah2j4mcfTVaDEZVmuf2ZRoyt91a295g==" & $payload $signature = "this._hash" + "A3s8Y8368IWD+LhkP9atK/hZkfb0U2RarDNBZhGjh0gz0KQ8usvHyZkah2j4mcfTVaDEZVmuf2ZRoyt91a295g==" + "a" $signature = _Crypt_HashData($data, $CALG_MD5) ; Create a hash of the text entered. $signature = StringTrimLeft ($signature,2) $signature = StringTrimright($signature, StringLen($signature) - 10) $signature = StringLower($signature) ConsoleWrite($signature & @lf) EndFunc
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now