Codebase list python-faraday / e407ea7
Add a patch to change the default ports of server Sophie Brun 7 years ago
5 changed file(s) with 89 addition(s) and 22 deletion(s). Raw diff Collapse all Expand all
22 * Import new upstream release
33 * Upstream didn't support qt3 anymore: update debian/rules (no more external
44 library to download)
5 * Add a patch to change the default ports of server
56
67 -- Sophie Brun <[email protected]> Thu, 18 Aug 2016 09:45:14 +0200
78
0 Description: Change the initial configuration of server
1 Use the default port of couchdb: port is 5984 and ssl_port is 6984.
2 Author: Sophie Brun <[email protected]>
3 Last-Update: 2016-08-18
4 ---
5 This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
6 --- a/server/default.ini
7 +++ b/server/default.ini
8 @@ -1,17 +1,17 @@
9 [faraday_server]
10 -port=5984
11 +port=5985
12 bind_address=localhost
13
14 [ssl]
15 -port=6984
16 +port=6985
17 certificate=
18 keyfile=
19 ;keyfile_pwd=''
20
21 [couchdb]
22 host=localhost
23 -port=5985
24 -ssl_port=6985
25 +port=5984
26 +ssl_port=6984
27 user=faraday
28 password=changeme
29 protocol=http
0 Description: <short description, required>
1 <long description that can span multiple lines, optional>
2 Author: <name and email of author, optional>
3 Origin: <upstream|backport|vendor|other>, <URL, required except if Author is present>
4 Bug: <URL to the upstream bug report if any, implies patch has been forwarded, optional>
5 Bug-<Vendor>: <URL to the vendor bug report if any, optional>
6 Forwarded: <URL|no|not-needed, useless if you have a Bug field, optional>
7 Applied-Upstream: <version|URL|commit, identifies patches merged upstream, optional>
8 Reviewed-by: <name and email of a reviewer, optional>
9 Last-Update: <YYYY-MM-DD, last update of the meta-information, optional>
0 Description: Copy the images repository in .faraday/
1 Author: Sophie Brun <[email protected]>
2 Bug-kali: https://bugs.kali.org/view.php?id=3429
3 Last-Update: 2016-08-18
104 ---
115 This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
126 --- a/faraday.py
0 Description: Remove unwanted checks
1 We don't want that user updates with update option: no need to check the
2 version and to propose updates. We don't need to check if dependencies are
3 installed: apt does that at the installation.
4 Author: Sophie Brun <[email protected]>
5 Last-Update: 2016-08-18
6 ---
7 This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
08 --- a/faraday.py
19 +++ b/faraday.py
2 @@ -131,10 +131,6 @@ def getParserArgs():
10 @@ -126,10 +126,6 @@ def getParserArgs():
311 default=False,
412 help="Ignore python dependencies resolution.")
513
1018 parser.add_argument('--cert', action="store", dest="cert_path",
1119 default=None,
1220 help="Path to the valid CouchDB certificate")
13 @@ -204,44 +200,6 @@ def query_user_bool(question, default=Tr
21 @@ -199,44 +195,6 @@ def query_user_bool(question, default=Tr
1422 "(or 'y' or 'n').\n")
1523
1624
5563 def startProfiler(app, output, depth):
5664 """Profiler handler.
5765
58 @@ -522,40 +480,6 @@ _/ ____\_____ ____________ __| _/__
66 @@ -458,40 +416,6 @@ _/ ____\_____ ____________ __| _/__
5967 logger.info("Starting Faraday IDE.")
6068
6169
9098 - if not resp == u'OK':
9199 - logger.info("You have available updates. Run ./faraday.py --update to catchup!")
92100 - else:
93 - logger.info("No updates available, enjoy Faraday")
101 - logger.info("No updates available, enjoy Faraday.")
94102 -
95103 -
96104 def checkCouchUrl():
97105 import requests
98106 try:
99 @@ -571,30 +495,6 @@ def checkCouchUrl():
107 @@ -507,24 +431,6 @@ def checkCouchUrl():
100108 # Non fatal error
101109 pass
102110
113121 - getInstanceConfiguration().setVersion(f_version)
114122 - f.close()
115123 -
116 - doc = {"ver": getInstanceConfiguration().getVersion()}
117 -
118 - if os.path.isfile(FARADAY_CONFIG):
119 - os.remove(FARADAY_CONFIG)
120 - with open(FARADAY_CONFIG, "w") as doc_file:
121 - json.dump(doc, doc_file)
122124 - except Exception as e:
123125 - getLogger("launcher").error("It seems that something's wrong with your version\nPlease contact customer support")
124126 - sys.exit(-1)
127129 def init():
128130 """Initializes what is needed before starting.
129131
130 @@ -621,20 +521,12 @@ def main():
132 @@ -551,20 +457,12 @@ def main():
131133 os.chdir(FARADAY_BASE)
132134
133135 init()
154156
155157
156158 if __name__ == '__main__':
159 --- a/faraday-server.py
160 +++ b/faraday-server.py
161 @@ -54,36 +54,8 @@ def setup_environment(cli_arguments):
162 if cli_arguments.debug:
163 set_logging_level(server.config.DEBUG)
164
165 - missing_packages = check_dependencies()
166 -
167 - if len(missing_packages) > 0:
168 - answer = ask_to_install(missing_packages)
169 - if answer:
170 - logger.info(
171 - "Dependencies installed. Please launch Faraday Server again")
172 - sys.exit(0)
173 - else:
174 - logger.error("Dependencies not met")
175 - sys.exit(1)
176 -
177 server.config.gen_web_config()
178
179 -def check_dependencies():
180 - checker = DependencyChecker(server.config.REQUIREMENTS_FILE)
181 - missing = checker.check_dependencies()
182 - return missing
183 -
184 -def ask_to_install(missing_packages):
185 - logger = get_logger(__name__)
186 - logger.warning("The following packages are not installed:")
187 - for package in missing_packages:
188 - logger.warning("%s" % package)
189 - res = query_yes_no("Do you want to install them?", default="no")
190 - if res:
191 - checker = DependencyChecker(server.config.REQUIREMENTS_FILE)
192 - checker.install_packages(missing_packages)
193 - return res
194 -
195 def setup_and_run_server(cli_arguments):
196 import server.web
197 import server.database
00 remove-unwanted-checks.diff
11 copy-images-directory.patch
2 change-default-ports-for-server.patch