mirror of
https://github.com/pezkuwichain/phishing.git
synced 2026-04-22 02:08:00 +00:00
Use CORS request for suspended check
This commit is contained in:
+8
-7
@@ -177,13 +177,14 @@
|
||||
}
|
||||
|
||||
async function isUp (url) {
|
||||
try {
|
||||
await fetchTimeout(url, { mode: 'no-cors' });
|
||||
|
||||
return true;
|
||||
} catch (error) {
|
||||
return false;
|
||||
}
|
||||
return fetchTimeout(url, { method: 'HEAD', mode: 'no-cors' })
|
||||
.then(() =>
|
||||
fetchTimeout(`https://api.allorigins.win/get?url=${encodeURIComponent(url)}`)
|
||||
.then((body) => body.text())
|
||||
.then((body) => !body.includes('has been suspended'))
|
||||
.catch(() => true)
|
||||
)
|
||||
.catch(() => false);
|
||||
}
|
||||
|
||||
async function getBalance (key) {
|
||||
|
||||
Reference in New Issue
Block a user