diff --git a/package-lock.json b/package-lock.json index 321c36e3..90fb4674 100644 Binary files a/package-lock.json and b/package-lock.json differ diff --git a/package.json b/package.json index aead4876..e66a588c 100644 --- a/package.json +++ b/package.json @@ -68,7 +68,7 @@ "@types/node-fetch": "^2.5.7", "@zerollup/ts-transform-paths": "^1.7.18", "0x": "^4.10.2", - "ipdata": "^1.1.2", + "ipdata": "^1.1.3", "jest": "^26.6.3", "node-fetch": "^2.6.1", "ts-node": "^9.1.1", diff --git a/src/util/ipAddress.ts b/src/util/ipAddress.ts index b736c0e9..74090d61 100644 --- a/src/util/ipAddress.ts +++ b/src/util/ipAddress.ts @@ -75,6 +75,7 @@ export async function IPAnalysis(ip: string): Promise { } export function isProxy(data: LookupResponse) { + if (!data || !data.asn || !data.threat) return false; if (data.asn.type !== "isp") return true; if (Object.values(data.threat).some((x) => x)) return true;