1
0
Fork 0
mirror of https://github.com/aclist/dztui.git synced 2025-06-29 04:18:57 +02:00

feat: scan LAN servers

This commit is contained in:
aclist 2024-08-05 06:03:15 +09:00
parent c6a4b419dd
commit e6244370dd
6 changed files with 249 additions and 13 deletions

View file

@ -5,6 +5,14 @@ import json
from a2s import dayzquery
sys.path.append('a2s')
def test_local(ip, qport):
try:
info = a2s.info((ip, int(qport)), 0.5)
name = info.server_name
print(name)
except:
sys.exit(1)
def get_info(ip, qport):
try:
info = a2s.info((ip, int(qport)))
@ -73,3 +81,5 @@ match mode:
get_rules(ip, qport)
case "names":
get_names(ip, qport)
case "test":
test_local(ip, qport)