Skip to content

Commit

Permalink
Added updater functions and corrected URLs
Browse files Browse the repository at this point in the history
  • Loading branch information
0xInfection committed Jan 17, 2020
1 parent fe580c3 commit 25ddab6
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions xsrfprobe/core/updater.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,18 @@

import os
from requests import get
from xsrfprobe import __version__
from xsrfprobe.core.colors import *

def updater():
'''
Function to update XSRFProbe seamlessly.
'''
print(GR+'Checking for updates...')
vno = get('https://github.com/raw/0xInfection/XSRFProbe/master/files/VersionNum').text
vno = get('https://github.com/raw/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
Expand Down

0 comments on commit 25ddab6

Please sign in to comment.