mirror of
https://github.com/pezkuwichain/phishing.git
synced 2026-06-14 19:01:02 +00:00
New address checks (#67)
This commit is contained in:
@@ -17,6 +17,11 @@
|
|||||||
"polkadot-airdrop.org": [
|
"polkadot-airdrop.org": [
|
||||||
"14BFcanA3zYTpbCmzKGXVEnFe9WoBCq3JdPQdnsiEgEhXSA2"
|
"14BFcanA3zYTpbCmzKGXVEnFe9WoBCq3JdPQdnsiEgEhXSA2"
|
||||||
],
|
],
|
||||||
|
"polkadot-event.com": [
|
||||||
|
"124QZBBTZtPDGPS4GqK6w8y5rPUC7EydLka9Gk3qCTDemGTN",
|
||||||
|
"13DW6RWgjUPcZ9mwwEMcb8qBcakQyzpxNw8ic32QXAEfGLxW",
|
||||||
|
"15GhxqrycWiRe9PePtN5CppTk8g63dXgM5vm9a9gwRMbPjRZ"
|
||||||
|
],
|
||||||
"polkadot.center": [
|
"polkadot.center": [
|
||||||
"12nNSFLEJU2HiuSidgd3c1bzSNn82SNpobnGso5GXF43eme6",
|
"12nNSFLEJU2HiuSidgd3c1bzSNn82SNpobnGso5GXF43eme6",
|
||||||
"12sGH82aAENExuio8BpNqXGxaXgrxMS88Qm9bfSJrav9Nito",
|
"12sGH82aAENExuio8BpNqXGxaXgrxMS88Qm9bfSJrav9Nito",
|
||||||
|
|||||||
@@ -24,6 +24,33 @@ function delayLoop (): Promise<void> {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// shared between polkadot.center & polkadot-event.com (addresses are also the same on first run)
|
||||||
|
async function checkGetWallet (ours: Record<string, string[]>, site: string): Promise<void> {
|
||||||
|
const all = Object.values(ours).reduce((all: string[], addrs: string[]): string[] => {
|
||||||
|
all.push(...addrs);
|
||||||
|
|
||||||
|
return all;
|
||||||
|
}, []);
|
||||||
|
const found: string[] = [];
|
||||||
|
|
||||||
|
for (let i = 0; i < 25; i++) {
|
||||||
|
const result = await (await fetch(`https://${site}/get_wallet.php`)).json() as Record<string, string>;
|
||||||
|
const wallet = result.wallet.replace('\r', '');
|
||||||
|
|
||||||
|
if (!found.includes(wallet)) {
|
||||||
|
found.push(wallet);
|
||||||
|
}
|
||||||
|
|
||||||
|
await delayLoop();
|
||||||
|
}
|
||||||
|
|
||||||
|
console.log(site, JSON.stringify(found));
|
||||||
|
|
||||||
|
const missing = found.filter((a) => !all.includes(a));
|
||||||
|
|
||||||
|
assertAndLog(missing.length === 0, `Missing entries found for ${site}: ${JSON.stringify(missing)}`);
|
||||||
|
}
|
||||||
|
|
||||||
describe('addrcheck', (): void => {
|
describe('addrcheck', (): void => {
|
||||||
let ours: Record<string, string[]>;
|
let ours: Record<string, string[]>;
|
||||||
|
|
||||||
@@ -33,23 +60,10 @@ describe('addrcheck', (): void => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('has all entries from polkadot.center', async (): Promise<void> => {
|
it('has all entries from polkadot.center', async (): Promise<void> => {
|
||||||
const found: string[] = [];
|
await checkGetWallet(ours, 'polkadot.center');
|
||||||
|
});
|
||||||
|
|
||||||
for (let i = 0; i < 25; i++) {
|
it('has all entries from polkadot-event.com', async (): Promise<void> => {
|
||||||
const result = await (await fetch('https://polkadot.center/get_wallet.php')).json() as Record<string, string>;
|
await checkGetWallet(ours, 'polkadot-event.com');
|
||||||
const wallet = result.wallet.replace('\r', '');
|
|
||||||
|
|
||||||
if (!found.includes(wallet)) {
|
|
||||||
found.push(wallet);
|
|
||||||
}
|
|
||||||
|
|
||||||
await delayLoop();
|
|
||||||
}
|
|
||||||
|
|
||||||
console.log('polkadot.center', JSON.stringify(found));
|
|
||||||
|
|
||||||
const missing = found.filter((a) => !ours['polkadot.center'].includes(a));
|
|
||||||
|
|
||||||
assertAndLog(missing.length === 0, `Missing entries found for polkadot.center: ${JSON.stringify(missing)}`);
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user