added simple ntp query script
This commit is contained in:
10
get_ntp.py
Executable file
10
get_ntp.py
Executable file
@@ -0,0 +1,10 @@
|
||||
#!/usr/bin/env python3
|
||||
import ntplib
|
||||
import sys
|
||||
from time import ctime
|
||||
c = ntplib.NTPClient()
|
||||
try:
|
||||
response = c.request(sys.argv[1])
|
||||
print(ctime(response.tx_time))
|
||||
except:
|
||||
print("ERROR")
|
||||
Reference in New Issue
Block a user