Skip to content

Commit 2bb877b

Browse files
author
Altify
authored
Update index.html
1 parent 2353d74 commit 2bb877b

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

index.html

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,13 @@
1919
document.cookie = "test=1;; path=/cookies/test;";
2020
</script>
2121
<script>
22+
setTimeout(data, 100);
2223
$.get('https://api.hackertarget.com/geoip/?q=116.12.250.1', function(data) {
23-
// Convert key-value pairs to JSON
24-
// https://stackoverflow.com/a/39284735/452587
25-
data = data.trim().split('\n').reduce(function(obj, pair) {
24+
data = data.trim().split('\n').reduce(function(obj, pair) {
2625
pair = pair.split(': ');
2726
return obj[pair[0]] = pair[1], obj;
2827
}, {});
2928
console.log(data);
30-
alert(data);
31-
});
3229
document.cookie = 'ip='+data+';
3330
});
3431
</script>

0 commit comments

Comments
 (0)