convert nord.sh to nord-checker.py
This commit is contained in:
@@ -33,13 +33,21 @@ try:
|
||||
|
||||
# Read the file line by line
|
||||
with open('vpnlist.txt', 'r') as f:
|
||||
for line in f:
|
||||
for line_number, line in enumerate(f, start=1):
|
||||
if line.startswith('#'):
|
||||
continue
|
||||
|
||||
parts = line.strip().split(' # ')
|
||||
exit_ip = parts[0]
|
||||
file_name = parts[1].strip()
|
||||
if ' # ' not in line:
|
||||
print(f"Skipping invalid line {line_number}: {line}")
|
||||
continue
|
||||
|
||||
try:
|
||||
parts = line.strip().split(' # ')
|
||||
exit_ip = parts[0]
|
||||
file_name = parts[1].strip()
|
||||
except IndexError:
|
||||
print(f"Error parsing line {line_number}: {line}")
|
||||
continue
|
||||
|
||||
total_processed += 1
|
||||
|
||||
|
||||
Reference in New Issue
Block a user