From 25ddab6a4c4dc614a8448c21eaa10a04a6195f4f Mon Sep 17 00:00:00 2001 From: 0xInfection Date: Fri, 17 Jan 2020 20:39:41 +0530 Subject: [PATCH] Added updater functions and corrected URLs --- xsrfprobe/core/updater.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/xsrfprobe/core/updater.py b/xsrfprobe/core/updater.py index c2a4b4e..c8679cd 100644 --- a/xsrfprobe/core/updater.py +++ b/xsrfprobe/core/updater.py @@ -11,6 +11,7 @@ import os from requests import get +from xsrfprobe import __version__ from xsrfprobe.core.colors import * def updater(): @@ -18,10 +19,10 @@ def updater(): Function to update XSRFProbe seamlessly. ''' print(GR+'Checking for updates...') - vno = get('https://raw.githubusercontent.com/0xInfection/XSRFProbe/master/files/VersionNum').text + vno = get('https://raw.githubusercontent.com/0xInfection/XSRFProbe/master/xsrfprobe/files/VersionNum').text print(GR+'Version on GitHub: '+color.CYAN+vno.strip()) - print(GR+'Version You Have : '+color.CYAN+open('files/VersionNum').read()) - if vno != open('files/VersionNum').read(): + print(GR+'Version You Have : '+color.CYAN+__version__) + if vno != __version__: print(G+'A new version of XSRFProbe is available!') current_path = os.getcwd().split('/') # if you know it, you know it folder = current_path[-1] # current directory name