Spaces:
Running
Running
changed
Browse files
account
CHANGED
@@ -1,4 +1,5 @@
|
|
1 |
termai
|
2 |
megawomn
|
3 |
aryhw
|
4 |
-
imagefromai
|
|
|
|
1 |
termai
|
2 |
megawomn
|
3 |
aryhw
|
4 |
+
imagefromai
|
5 |
+
apirfz
|
ip.js
CHANGED
@@ -1,16 +1,20 @@
|
|
1 |
const fs = require("fs")
|
2 |
let accounts = fs.readFileSync('./account', 'utf8').split("\n");
|
3 |
-
|
|
|
|
|
4 |
|
5 |
(async () => {
|
6 |
-
for (let i of
|
7 |
try {
|
8 |
-
const url = `https://${i}-cors.hf.space/proxy?url=${encodeURIComponent('https://
|
9 |
const res = await fetch(url);
|
10 |
if (!res.ok) throw new Error(`Status ${res.status}`);
|
11 |
const json = await res.json();
|
12 |
|
13 |
-
|
|
|
|
|
14 |
} catch (err) {
|
15 |
console.error(`[${i}] Gagal: ${err.message}`);
|
16 |
}
|
|
|
1 |
const fs = require("fs")
|
2 |
let accounts = fs.readFileSync('./account', 'utf8').split("\n");
|
3 |
+
let custom = process.argv.slice(2)
|
4 |
+
let _accounts = custom?.length > 0 ? custom : accounts
|
5 |
+
console.log(_accounts);
|
6 |
|
7 |
(async () => {
|
8 |
+
for (let i of _accounts) {
|
9 |
try {
|
10 |
+
const url = `https://${i}-cors.hf.space/proxy?url=${encodeURIComponent('https://ipwho.is')}`;
|
11 |
const res = await fetch(url);
|
12 |
if (!res.ok) throw new Error(`Status ${res.status}`);
|
13 |
const json = await res.json();
|
14 |
|
15 |
+
if (!json.success) throw new Error(json.message || "Unknown error");
|
16 |
+
|
17 |
+
console.log(`[${i}] IP: ${json.ip} | Lokasi: ${json.city}, ${json.region}, ${json.country}`);
|
18 |
} catch (err) {
|
19 |
console.error(`[${i}] Gagal: ${err.message}`);
|
20 |
}
|