Inspect payment to paid Wi-Fi handoff without personal data
This commit is contained in:
1 parent
9165731fec
commit
a4e3d1ff56
1 file changed
+3
-5
@@ -25,8 +25,6 @@ try {
|
||||
console.log('TEMP-RECORDS',JSON.stringify((db.tempAccess||[]).map(t=>({device:hash(t.mac),createdAt:t.createdAt,expiresAt:t.expiresAt,revoked:t.revoked}))));
|
||||
} catch(e){console.log('DB-ERROR',redact(e.message));}
|
||||
|
||||
const active=(await rosCommand(['/ip/hotspot/active/print'])).map(object).find(a=>hash(a['mac-address'])==='f38116d39a');
|
||||
if(active){
|
||||
const cs=(await rosCommand(['/ip/firewall/connection/print'])).map(object).filter(c=>(c['src-address']||'').split(':')[0]===active.address);
|
||||
console.log('CONNECTION-DETAIL',redact(JSON.stringify(cs.map(c=>({destination:c['dst-address'],reply:c['reply-src-address'],state:c['tcp-state'],protocol:c.protocol,replied:c['seen-reply'],originalPackets:c['orig-packets'],replyPackets:c['repl-packets'],dstnat:c.dstnat})))));
|
||||
}
|
||||
const db=JSON.parse(fs.readFileSync(config.dataDir+'/db.json','utf8'));
|
||||
console.log('PAYMENT-HANDOFF',JSON.stringify(db.payments.slice(-8).map(p=>({id:hash(p.id),status:p.status,device:p.mac?hash(p.mac):null,hasVoucher:!!p.voucher,paidAt:p.paidAt,connection:p.connection||null}))));
|
||||
console.log('ACCESS-CONFIG',JSON.stringify({seconds:config.freeAccessSeconds,cooldown:config.freeAccessCooldownSeconds}));
|
||||
Reference in new issue
Block a user