mirror of
https://github.com/Ekultek/Zeus-Scanner.git
synced 2026-03-11 08:55:51 +00:00
had some time so making some compatibility updates (issue #7). Also edited the auto issue, you'll have your own unique ID number now
This commit is contained in:
parent
02a9f54544
commit
a1426ea0a1
3 changed files with 21 additions and 5 deletions
|
|
@ -2,7 +2,10 @@ import os
|
|||
import platform
|
||||
import subprocess
|
||||
import tarfile
|
||||
import ConfigParser
|
||||
try:
|
||||
import ConfigParser # python 2
|
||||
except ImportError:
|
||||
import configparser as ConfigParser # python 3
|
||||
|
||||
import whichcraft
|
||||
|
||||
|
|
|
|||
|
|
@ -6,9 +6,13 @@ import glob
|
|||
import time
|
||||
import difflib
|
||||
import logging
|
||||
import string
|
||||
import random
|
||||
import subprocess
|
||||
import ConfigParser
|
||||
try:
|
||||
import ConfigParser # python 2
|
||||
except ImportError:
|
||||
import configparser as ConfigParser # python 3
|
||||
|
||||
import psutil
|
||||
import requests
|
||||
|
|
@ -24,7 +28,7 @@ except NameError:
|
|||
# clone link
|
||||
CLONE = "https://github.com/ekultek/zeus-scanner.git"
|
||||
# current version <major.minor.commit.patch ID>
|
||||
VERSION = "1.0.55"
|
||||
VERSION = "1.0.56"
|
||||
# colors to output depending on the version
|
||||
VERSION_TYPE_COLORS = {"dev": 33, "stable": 92, "other": 30}
|
||||
# version string formatting
|
||||
|
|
@ -498,3 +502,10 @@ def get_md5sum(url="https://raw.githubusercontent.com/Ekultek/Zeus-Scanner/maste
|
|||
posted_checksum = requests.get(url).content
|
||||
if current_checksum == posted_checksum:
|
||||
return True
|
||||
|
||||
|
||||
def create_identifier(chars=string.ascii_letters):
|
||||
retval = []
|
||||
for _ in range(0, 7):
|
||||
retval.append(random.choice(chars))
|
||||
return "".join(retval)
|
||||
|
|
|
|||
|
|
@ -79,7 +79,8 @@ def request_issue_creation():
|
|||
|
||||
current_log_file = lib.core.settings.get_latest_log_file(lib.core.settings.CURRENT_LOG_FILE_PATH)
|
||||
stacktrace = __extract_stacktrace(current_log_file)
|
||||
issue_title = stacktrace.split("\n")[-2]
|
||||
identifier = lib.core.settings.create_identifier()
|
||||
issue_title = "{} ({})".format(stacktrace.split("\n")[-2], identifier)
|
||||
ff_version = lib.core.settings.get_browser_version()
|
||||
|
||||
issue_data = {
|
||||
|
|
@ -112,7 +113,8 @@ def request_issue_creation():
|
|||
)
|
||||
urllib2.urlopen(req, timeout=10).read()
|
||||
lib.core.settings.logger.info(lib.core.settings.set_color(
|
||||
"issue has been created successfully with the following name '{}'...".format(issue_title)
|
||||
"issue has been created successfully with the following name '{}', your unique identifier "
|
||||
"for this issue is '{}'...".format(issue_title, identifier)
|
||||
))
|
||||
except Exception as e:
|
||||
lib.core.settings.logger.exception(lib.core.settings.set_color(
|
||||
|
|
|
|||
Loading…
Reference in a new issue