mirror of
https://git.photon.obnh.io/AXSY/whois.git
synced 2026-03-12 18:01:32 +00:00
Initial commit: mwhois with SCION AS support and decimal AS conversion
Based on mwhois by Antonios A. Chariton Modifications for SCION AS support by Olaf Baumert, Axpo Systems AG
This commit is contained in:
34
add-isd
Executable file
34
add-isd
Executable file
@@ -0,0 +1,34 @@
|
||||
#!/usr/bin/python
|
||||
|
||||
# Use this file to add SCION ISD entries to the whois database
|
||||
|
||||
import os
|
||||
|
||||
# Ensure the ISD database directory exists
|
||||
os.system("mkdir -p db/isd")
|
||||
|
||||
isd = input("Enter ISD number: ")
|
||||
|
||||
# Validate ISD number
|
||||
if not isd.isdigit():
|
||||
print("Invalid ISD number. Expected a numeric value.")
|
||||
exit(1)
|
||||
|
||||
# Get ISD details
|
||||
name = input("Enter ISD Name: ")
|
||||
comment = input("Enter Comment: ")
|
||||
trc_bundle = input("Enter TRC Bundle: ")
|
||||
|
||||
# Prepare ISD data
|
||||
n = "\r\n"
|
||||
body = "% SCION ISD WHOIS Information" + n + n
|
||||
body += "ISD: " + isd + n
|
||||
body += "Name: " + name + n
|
||||
body += "Comment: " + comment + n
|
||||
body += "TRC Bundle: " + trc_bundle + n
|
||||
|
||||
# Save to file
|
||||
d = open("db/isd/" + isd, "w+")
|
||||
d.write(body)
|
||||
d.close()
|
||||
print("Done! SCION ISD record added successfully.")
|
||||
Reference in New Issue
Block a user