Last active
May 16, 2025 13:15
-
-
Save necdetuygur/9018e1c3ba5df1723c91424599b5d8d4 to your computer and use it in GitHub Desktop.
GT: XHR Get Code
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function (send) { | |
let viewed = false; | |
XMLHttpRequest.prototype.send = function (data) { | |
if (!viewed) { | |
prompt( | |
"GT Uygulamasına bu kodu kopyalayıp yapıştırın.", | |
btoa( | |
JSON.stringify( | |
data | |
.split("&") | |
.filter((item) => | |
item.match( | |
/MsgType|CustomerNo|Username|Password|SessionKey|SourceID|ClientIP|Version|P|Language|ngsw-bypass|sso|AccountID|ClOrdID|ExchangeID|Action|HardwareID|ETX/gi, | |
), | |
) | |
.map((item) => { | |
let obj = {}; | |
const sp = item.split("="); | |
obj[sp[0]] = sp[1]; | |
return obj; | |
}) | |
.reduce((r, c) => Object.assign(r, c), {}), | |
), | |
), | |
); | |
} | |
viewed = true; | |
send.call(this, data); | |
}; | |
})(XMLHttpRequest.prototype.send); | |
const xp = (path) => { | |
return document.evaluate( | |
path, | |
document, | |
null, | |
XPathResult.FIRST_ORDERED_NODE_TYPE, | |
null, | |
).singleNodeValue; | |
}; | |
xp( | |
"/html/body/app-root/app-main/div/div[3]/app-footer/div/div[1]/div[4]/button", | |
).click(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment