Skip to content

Commit

Permalink
Fixed the version updater
Browse files Browse the repository at this point in the history
  • Loading branch information
Alfredredbird committed Dec 2, 2024
1 parent abbe338 commit 8de2f13
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 6 deletions.
8 changes: 4 additions & 4 deletions config/config.ini
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
[main]
checkforupdates = yes
defaultdlpath = ./downloadedSites/
browser = Edge
firstlaunch = no
browser = Not Checked
firstlaunch = yes
language = en
defaultcapturepath = ./captured/
prerelease = no
updaterver = 2
discordwebhookurl = none
pluginfolder = plugins
whatarethekeysfor = the privatekey and syscrypt are keys that will store system data in a string that can be sent to A tookie-osint Developer to help diagnose problems. They reset after every launch
privatekey = b'RYm1esHOCpNLOhWJfRjjITW4PMMbhuMlbDX6cBXJH1w='
syscrypt = b'gAAAAABm11cpxonw6TYThPIpjqeCHV55dQ2h3Le1TOtwEY6t1LAer81hjs-g3xhyD72QHgQDflWqpstR0oJqnqYCiULRDBi_Dfgs-QUjVWz8iy9sLecSwGEbVu8ID7MA5FYclNKI0pOxRZSmJWBe40pIDpqJpic0yQ=='
privatekey = b''
syscrypt = b''
userandomuseragents = no

[Links]
Expand Down
2 changes: 1 addition & 1 deletion config/version.cfg
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v2.8(a)
v2.8(b)
22 changes: 21 additions & 1 deletion modules/configcheck.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

import requests
from colorama import *
import urllib

from lang.en import *
from modules.lang import *
Expand Down Expand Up @@ -118,7 +119,26 @@ def ask_update_check(config, colorScheme, language_module):
try:
cfu = input(language_module.config4)
if cfu.lower() in ("y", "yes"):
exec(open("./update.py").read())
with open("config/version.cfg", "r") as f:
url = "https://raw.githubusercontent.com/Alfredredbird/tookie-osint/refs/heads/main/config/version.cfg"

response = requests.get(url)
if response.status_code == 200:
data = response.text.strip() # Remove any extra whitespace or newline characters
currentver = f.readline().strip() # Read the first line and strip it too
print("")
print(f"Current version: {currentver}")
print(f"Remote version: {data}")

if currentver != data:
print("Download new version at https://github.com/Alfredredbird/tookie-osint")
print("")
else:
print("Latest version installed!")
print("")
else:
print(f"Failed to fetch new version data. Status code: {response.status_code}")
print("")
elif cfu.lower() in ("n", "no"):
print(language_module.prompt5)
print_separator()
Expand Down

0 comments on commit 8de2f13

Please sign in to comment.