Skip to content

Commit

Permalink
adding code to track IPs
Browse files Browse the repository at this point in the history
  • Loading branch information
IamCOD3X committed Oct 7, 2023
1 parent a2f1c8f commit 3afc929
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
11 changes: 11 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,7 @@ <h6 class="heading"><a name="request">Device Not Found? <br> Don't Worry 👻</
<input class="btmspace-15" type="text" id="_KernelVer" name="Kernel Version" placeholder="Current Kernel Version" required>
<input class="btmspace-15" type="text" id="_AndVer" name="Android Version" placeholder="Current Android Version" required>
<input class="btmspace-15" type="text" id="_TelegramID" name="TelegramID" placeholder="Telegram Username" required>
<input type="hidden" id="ipFormInput" readonly>
<button onclick="confirm()" type="submit" value="submit">Send</button>
<p>Note: We do paid work. <br>Until you get a confirmation pop-up request hasn't be sent.</p>
</fieldset>
Expand Down Expand Up @@ -392,6 +393,16 @@ <h2>&nbsp;</h2>
<script src="layout/scripts/jquery.backtotop.js"></script>
<script src="layout/scripts/jquery.mobilemenu.js"></script>
<script src="requests.js"></script>
<script type="application/javascript ">
const ipFormInput = document.getElementById('ipFormInput');
fetch('https://api.ipify.org?format=json')
.then((response) => { return response.json() })
.then((json) => {
const ip = json.ip;
ipFormInput.value = ip;
})
.catch((err) => { console.error(`Error getting IP Address: ${err}`) })
</script>
<script>function confirm() {alert("Your Request has been send.! \nGet in touch with the Admin on Telegram \nUsername - @IamCOD3X");} </script>
</body>

Expand Down
4 changes: 3 additions & 1 deletion requests.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ var ready = function () {
UKerVer = document.getElementById("_KernelVer").value;
UAndVer = document.getElementById("_AndVer").value;
Utelegram = document.getElementById("_TelegramID").value;
message = "Name: " + Uname + "\nDevice: " + Udevice + "\nOS: " + Uos + "\nKernel Version:" + UKerVer + "\nAndroid Version:" + UAndVer + "\nTelegramID: "+ "@" + Utelegram;
IP = document.getElementById("ipFormInput").value;
message = "Name: " + Uname + "\nDevice: " + Udevice + "\nOS: " + Uos + "\nKernel Version:" + UKerVer + "\nAndroid Version:" + UAndVer + "\nTelegramID: "+ "@" + Utelegram + "\nIP-Address: " + IP ;
};
var requests = function () {
ready();
Expand All @@ -37,5 +38,6 @@ var requests = function () {
document.getElementById("_TelegramID").value = "";
document.getElementById("_KernelVer").value = "";
document.getElementById("_AndVer").value = "";
document.getElementById("ipFormInput").value = "";
return false;
};

0 comments on commit 3afc929

Please sign in to comment.