Codebase list python-faraday / 8257db8
Refresh patch remove-unwanted-checks Sophie Brun 8 years ago
2 changed file(s) with 46 addition(s) and 37 deletion(s). Raw diff Collapse all Expand all
00 python-faraday (1.0.17-0kali1) kali-dev; urgency=medium
11
22 * Import new upstream release
3 * Refresh patch remove-unwanted-checks
34
45 -- Sophie Brun <[email protected]> Thu, 03 Mar 2016 11:41:10 +0100
56
00 --- a/faraday.py
11 +++ b/faraday.py
2 @@ -17,7 +17,6 @@ import shutil
3 import argparse
4 import platform
5 import subprocess
6 -import pip
7 import json
2 @@ -132,10 +132,6 @@ def getParserArgs():
3 default=False,
4 help="Ignore python dependencies resolution.")
85
9 from utils.logs import getLogger, setUpLogger
10 @@ -199,42 +198,6 @@ def query_user_bool(question, default=Tr
6 - parser.add_argument('--update', action="store_true", dest="update",
7 - default=False,
8 - help="Update Faraday IDE.")
9 -
10 parser.add_argument('--cert', action="store", dest="cert_path",
11 default=None,
12 help="Path to the valid CouchDB certificate")
13 @@ -192,45 +188,6 @@ def query_user_bool(question, default=Tr
1114 "(or 'y' or 'n').\n")
1215
1316
2023 - """
2124 -
2225 - if not args.ignore_deps:
26 - try:
27 - import pip
28 - modules = []
29 - f = open(CONST_REQUIREMENTS_FILE)
30 - for line in f:
31 - if not line.find('#'):
32 - break
33 - else:
34 - modules.append([line[:line.index('=')], (line[line.index('=')+2:]).strip()])
35 - f.close()
36 - pip_dist = [dist.project_name.lower() for dist in pip.get_installed_distributions()]
2337 -
24 - modules = []
25 - f = open(CONST_REQUIREMENTS_FILE)
26 - for line in f:
27 - if not line.find('#'):
28 - break
29 - else:
30 - modules.append([line[:line.index('=')], (line[line.index('=')+2:]).strip()])
31 - f.close()
38 - for module in modules:
39 - if module[0].lower() not in pip_dist:
40 - try:
41 - __import__(module[0])
42 - except ImportError:
43 - if query_user_bool("Missing module %s."
44 - " Do you wish to install it?" % module[0]):
45 - pip.main(['install', "%s==%s" %
46 - (module[0], module[1]), '--user'])
3247 -
33 - pip_dist = [dist.project_name.lower() for dist in pip.get_installed_distributions()]
34 -
35 - for module in modules:
36 - if module[0].lower() not in pip_dist:
37 - try:
38 - __import__(module[0])
39 - except ImportError:
40 - if query_user_bool("Missing module %s."
41 - " Do you wish to install it?" % module[0]):
42 - pip.main(['install', "%s==%s" %
43 - (module[0], module[1]), '--user'])
44 -
45 - else:
46 - return False
48 - else:
49 - return False
50 - except ImportError:
51 - pass
4752 -
4853 - return True
4954 -
50
55 -
5156 def startProfiler(app, output, depth):
5257 """Profiler handler.
53 @@ -525,39 +488,6 @@ _/ ____\_____ ____________ __| _/__
58
59 @@ -518,40 +475,6 @@ _/ ____\_____ ____________ __| _/__
5460 logger.info("Starting Faraday IDE.")
5561
5662
7783 - getInstanceConfiguration().setAppname("Faraday - Penetration Test IDE Community")
7884 - parameter = {"version": getInstanceConfiguration().getVersion()}
7985 -
80 - f.close
86 - f.close()
8187 - resp = requests.get(uri, params=parameter, timeout=1, verify=True)
8288 - resp = resp.text.strip()
8389 - except Exception as e:
8793 - else:
8894 - logger.info("No updates available, enjoy Faraday")
8995 -
90
96 -
9197 def checkCouchUrl():
9298 import requests
93 @@ -574,29 +504,6 @@ def checkCouchUrl():
99 try:
100 @@ -567,30 +490,6 @@ def checkCouchUrl():
94101 # Non fatal error
95102 pass
96103
117124 - getLogger("launcher").error("It seems that something's wrong with your version\nPlease contact customer support")
118125 - exit(-1)
119126 -
120
127 -
121128 def init():
122129 """Initializes what is needed before starting.
123 @@ -623,20 +530,12 @@ def main():
130
131 @@ -616,20 +515,12 @@ def main():
124132 """
125133
126134 init()