diff --git a/src/routes/api/banme.js b/src/routes/api/banme.js index f335152..78e4286 100644 --- a/src/routes/api/banme.js +++ b/src/routes/api/banme.js @@ -12,6 +12,15 @@ async function banme(req, res) { if (code === '1') { reason = 'Userscript Bot'; } else if (code === '2') { + const ua = req.headers['user-agent']; + if (ua && ua.includes('OPR/') + && (ua.includes('Android') || ua.includes('iPhone')) + ) { + res.json({ + status: 'nope', + }); + return; + } reason = 'Captcha Solving Script'; } const ip = getIPFromRequest(req); diff --git a/src/utils/whois.js b/src/utils/whois.js index 37ef260..46844c0 100644 --- a/src/utils/whois.js +++ b/src/utils/whois.js @@ -151,6 +151,9 @@ function singleWhoisQuery( query, host, ) { + if (host.endsWith(':4321')) { + throw new Error('no rwhois support'); + } return new Promise((resolve, reject) => { let data = ''; const socket = net.createConnection({