4 | 4 |
import platform
|
5 | 5 |
import subprocess
|
6 | 6 |
-import pip
|
|
7 |
import json
|
7 | 8 |
|
8 | 9 |
from utils.logs import getLogger, setUpLogger
|
9 | |
sys.path.insert(0, os.path.dirname(os.path.realpath(__file__)) + '/external_libs/lib/python2.7/dist-packages')
|
10 | |
@@ -188,42 +187,6 @@ def query_user_bool(question, default=Tr
|
|
10 |
@@ -190,42 +189,6 @@ def query_user_bool(question, default=Tr
|
11 | 11 |
"(or 'y' or 'n').\n")
|
12 | 12 |
|
13 | 13 |
|
|
50 | 50 |
|
51 | 51 |
def startProfiler(app, output, depth):
|
52 | 52 |
"""Profiler handler.
|
53 | |
@@ -491,39 +454,6 @@ _/ ____\_____ ____________ __| _/__
|
|
53 |
@@ -493,39 +456,6 @@ _/ ____\_____ ____________ __| _/__
|
54 | 54 |
print(Fore.RESET + Back.RESET + Style.RESET_ALL)
|
55 | 55 |
logger.info("Starting Faraday IDE.")
|
56 | 56 |
|
|
90 | 90 |
|
91 | 91 |
def checkCouchUrl():
|
92 | 92 |
import requests
|
93 | |
@@ -562,20 +492,11 @@ def main():
|
|
93 |
@@ -542,29 +472,7 @@ def checkCouchUrl():
|
|
94 |
# Non fatal error
|
|
95 |
pass
|
|
96 |
|
|
97 |
-def checkVersion():
|
|
98 |
- try:
|
|
99 |
- f = open(CONST_VERSION_FILE)
|
|
100 |
- f_version = f.read().strip()
|
|
101 |
- if not args.update:
|
|
102 |
- if getInstanceConfiguration().getVersion() != None and getInstanceConfiguration().getVersion() != f_version:
|
|
103 |
- logger.warning("You have different version of Faraday since your last run.\nRun ./faraday.py --update to update configuration!")
|
|
104 |
- if query_yes_no('Do you want to close Faraday?', 'yes'):
|
|
105 |
- exit(-1)
|
|
106 |
-
|
|
107 |
- getInstanceConfiguration().setVersion(f_version)
|
|
108 |
- f.close()
|
|
109 |
-
|
|
110 |
- doc = {"ver": getInstanceConfiguration().getVersion()}
|
|
111 |
-
|
|
112 |
- if os.path.isfile(CONST_CONFIG):
|
|
113 |
- os.remove(CONST_CONFIG)
|
|
114 |
- with open(CONST_CONFIG, "w") as doc_file:
|
|
115 |
- json.dump(doc, doc_file)
|
|
116 |
- except Exception as e:
|
|
117 |
- getLogger("launcher").error("It seems that something's wrong with your version\nPlease contact customer support")
|
|
118 |
- exit(-1)
|
|
119 |
-
|
|
120 |
+
|
|
121 |
|
|
122 |
def init():
|
|
123 |
"""Initializes what is needed before starting.
|
|
124 |
@@ -587,21 +495,12 @@ def main():
|
94 | 125 |
"""
|
95 | 126 |
|
96 | 127 |
init()
|
|
102 | 133 |
- checkConfiguration()
|
103 | 134 |
- setConf()
|
104 | 135 |
- checkCouchUrl()
|
|
136 |
- checkVersion()
|
105 | 137 |
- setUpLogger()
|
106 | 138 |
- update()
|
107 | 139 |
- checkUpdates()
|
|
112 | 144 |
+ logger.info("Dependencies met.")
|
113 | 145 |
+ checkConfiguration()
|
114 | 146 |
+ setConf()
|
|
147 |
+ checkCouchUrl()
|
115 | 148 |
+ startFaraday()
|
116 | 149 |
|
117 | 150 |
|