forked from Hay1tsme/artemis
aimedb: add warning for all-zero access code/idm
This commit is contained in:
parent
02cee4198d
commit
68bbde209a
@ -177,6 +177,7 @@ class AimedbServlette():
|
||||
async def handle_lookup(self, data: bytes, resp_code: int) -> ADBBaseResponse:
|
||||
req = ADBLookupRequest(data)
|
||||
if req.access_code == "00000000000000000000":
|
||||
self.logger.warn(f"All-zero access code from {req.head.keychip_id}")
|
||||
ret = ADBLookupResponse.from_req(req.head, -1)
|
||||
ret.head.status = ADBStatus.BAN_SYS
|
||||
return ret
|
||||
@ -207,6 +208,7 @@ class AimedbServlette():
|
||||
async def handle_lookup_ex(self, data: bytes, resp_code: int) -> ADBBaseResponse:
|
||||
req = ADBLookupRequest(data)
|
||||
if req.access_code == "00000000000000000000":
|
||||
self.logger.warn(f"All-zero access code from {req.head.keychip_id}")
|
||||
ret = ADBLookupExResponse.from_req(req.head, -1)
|
||||
ret.head.status = ADBStatus.BAN_SYS
|
||||
return ret
|
||||
@ -252,6 +254,7 @@ class AimedbServlette():
|
||||
req = ADBFelicaLookupRequest(data)
|
||||
idm = req.idm.zfill(16)
|
||||
if idm == "0000000000000000":
|
||||
self.logger.warn(f"All-zero IDm from {req.head.keychip_id}")
|
||||
ret = ADBFelicaLookupResponse.from_req(req.head, "00000000000000000000")
|
||||
ret.head.status = ADBStatus.BAN_SYS
|
||||
return ret
|
||||
@ -280,6 +283,7 @@ class AimedbServlette():
|
||||
idm = req.idm.zfill(16)
|
||||
|
||||
if idm == "0000000000000000":
|
||||
self.logger.warn(f"All-zero IDm from {req.head.keychip_id}")
|
||||
ret = ADBFelicaLookupResponse.from_req(req.head, "00000000000000000000")
|
||||
ret.head.status = ADBStatus.BAN_SYS
|
||||
return ret
|
||||
@ -319,6 +323,7 @@ class AimedbServlette():
|
||||
idm = req.idm.zfill(16)
|
||||
|
||||
if idm == "0000000000000000":
|
||||
self.logger.warn(f"All-zero IDm from {req.head.keychip_id}")
|
||||
ret = ADBFelicaLookupExResponse.from_req(req.head, -1, "00000000000000000000")
|
||||
ret.head.status = ADBStatus.BAN_SYS
|
||||
return ret
|
||||
@ -377,6 +382,7 @@ class AimedbServlette():
|
||||
user_id = -1
|
||||
|
||||
if req.access_code == "00000000000000000000":
|
||||
self.logger.warn(f"All-zero access code from {req.head.keychip_id}")
|
||||
ret = ADBLookupResponse.from_req(req.head, -1)
|
||||
ret.head.status = ADBStatus.BAN_SYS
|
||||
return ret
|
||||
|
Loading…
Reference in New Issue
Block a user