MCPcopy
hub / github.com/lissy93/web-check / urlHaus

Function urlHaus

api/threats.js:34–44  ·  view source on GitHub ↗
(url)

Source from the content-addressed store, hash-verified

32};
33
34const urlHaus = async (url) => {
35 const { hostname } = parseTarget(url);
36 try {
37 const res = await httpPost('https://urlhaus-api.abuse.ch/v1/host/', `host=${hostname}`, {
38 headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
39 });
40 return res.data;
41 } catch (error) {
42 return upstreamError(error, 'URLhaus');
43 }
44};
45
46const phishTank = async (url) => {
47 try {

Callers 1

threatsHandlerFunction · 0.85

Calls 3

parseTargetFunction · 0.90
httpPostFunction · 0.90
upstreamErrorFunction · 0.90

Tested by

no test coverage detected