summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author5epi0l <91630053+5epi0l@users.noreply.github.com>2025-11-16 06:20:14 +0530
committerGitHub <noreply@github.com>2025-11-16 06:20:14 +0530
commite75365333217e3ec928cbcb59721231244fae224 (patch)
tree4b825dc642cb6eb9a060e54bf8d69288fbee4904
parent993a971b5569fb11708d557cdc8ecda1cc44277c (diff)
Delete TimeFix/fixtime.py
-rw-r--r--TimeFix/fixtime.py46
1 files changed, 0 insertions, 46 deletions
diff --git a/TimeFix/fixtime.py b/TimeFix/fixtime.py
deleted file mode 100644
index a9f2235..0000000
--- a/TimeFix/fixtime.py
+++ /dev/null
@@ -1,46 +0,0 @@
-# Clock_skew.py
-# Author: 5epi0l
-# Date: 16/11/2025
-# License: MIT
-# Description:
-
-
-
-import requests
-import os
-import argparse
-
-parser = argparse.ArgumentParser()
-parser.add_argument("--url", help="Target URL", required=True)
-
-args = parser.parse_args()
-
-
-
-
-def get_date():
- print("[*] Fetching time")
- try:
- r = requests.get(args.url + "/:5985/WSMAN")
- date_header = r.headers.get("Date")
- time = date_header.split()[4]
- if time:
- print("[*] time fetched: ", time)
- return time
- else:
- print("[-] Could not get remote time")
- except Exception as e:
- print("[*] An error has occured: ", e)
-
-def set_date():
- time = get_date()
- try:
- print("[*] Syncing time")
- os.system("sudo timedatectl set-ntp off")
- os.system(f"sudo date -u --set {time}")
- print("[*] time Synced")
- except Exception as e:
- print("[-] An error has occured: ", e)
-
-
-set_date()