feat: scan LAN servers

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

No files matched your search

+10
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)