Update packaging for new release
Upstream refactors the project
Sophie Brun
4 years ago
0 | From Faraday version 2.0.0, Faraday is composed of Faraday Server and Faraday Client. | |
1 | Since version 3.0 couchdb has been replaced by PostgreSQL | |
0 | Faraday Server and Faraday Client are included in python-faraday package. | |
2 | 1 | |
3 | The new PostgreSQL database is created when python-faraday is run for the | |
4 | first time, with a default user: | |
5 | - username: faraday | |
6 | - password: automatically generated, it can be found in the config file | |
7 | ~/.faraday/config/user.xml (field api_user) | |
2 | To use Faraday on Kali just type "faraday" in a terminal click or | |
3 | Faraday icon in the menu: | |
4 | - it starts the faraday server with starting the Kali python-faraday | |
5 | service (and the first time it initializes the PostgreSQL database) | |
6 | - the first time it asks you a new password for the username "faraday" | |
7 | - and then it starts the faraday client | |
8 | 8 | |
9 | For an update from version 2.* to version 3.* | |
10 | You can import your old couchDB database: | |
11 | - run "python-faraday" a first time (to create new DB) | |
12 | - run "systemctl start couchdb" (install package couchdb if missing) | |
13 | - "cd /usr/share/python-faraday" | |
14 | - "python manage.py import_from_couchdb" | |
9 | The python-faraday service is stopped after the closure of faraday-client. | |
15 | 10 | |
16 | More information here: | |
17 | https://github.com/infobyte/faraday/wiki/Installation-Community | |
11 | ||
12 | You can also use the separate scripts / service : | |
13 | - python-faraday.service starts and stops the server in Kali: it | |
14 | handles the postgresql startup if needed and creates the database if | |
15 | it does not exist yet | |
16 | - faraday-server | |
17 | - faraday-client | |
18 | - fplugin | |
19 | - faraday-manage | |
20 | ||
21 | More information in the manpages and | |
22 | https://github.com/infobyte/faraday/wiki/Installation-Guide |
0 | Remove couchdb and erlang17 after january 2019. | |
1 | They are no longer required by any package. We just keep them for a few | |
2 | months to make the DB import easier in Faraday. | |
3 |
0 | python-faraday (3.8.0-0kali1) kali-dev; urgency=medium | |
1 | ||
2 | [ Raphaƫl Hertzog ] | |
3 | * Update Vcs-* fields for the move to gitlab.com | |
4 | ||
5 | [ Sophie Brun ] | |
6 | * New upstream version 3.8.0 | |
7 | * Update all debian/* files for new version | |
8 | * Add manpages for new usptream's scripts | |
9 | ||
10 | -- Sophie Brun <[email protected]> Fri, 07 Jun 2019 14:39:43 +0200 | |
11 | ||
0 | 12 | python-faraday (3.7.0-0kali1) kali-dev; urgency=medium |
1 | 13 | |
2 | 14 | * New upstream version 3.7.0 |
2 | 2 | Priority: optional |
3 | 3 | Maintainer: Kali Developers <[email protected]> |
4 | 4 | Uploaders: Sophie Brun <[email protected]> |
5 | Build-Depends: debhelper-compat (= 12), dh-python, python | |
5 | Build-Depends: debhelper-compat (= 12), | |
6 | dh-python, | |
7 | python, | |
8 | python-factory-boy, | |
9 | python-filedepot, | |
10 | python-filteralchemy, | |
11 | python-flask, | |
12 | python-flask-classful, | |
13 | python-flask-principal, | |
14 | python-flask-restless, | |
15 | python-flask-security, | |
16 | python-flask-session, | |
17 | python-marshmallow, | |
18 | python-marshmallow-sqlalchemy, | |
19 | python-mock, | |
20 | python-mockito, | |
21 | python-nplusone, | |
22 | python-pil, | |
23 | python-pytest, | |
24 | python-pytest-runner, | |
25 | python-requests, | |
26 | python-responses, | |
27 | python-setuptools, | |
28 | python-sphinx, | |
29 | python-sqlalchemy, | |
30 | python-sqlalchemy-schemadisplay, | |
31 | python-tornado, | |
32 | python-tz, | |
33 | python-webargs | |
6 | 34 | Standards-Version: 4.3.0 |
7 | 35 | Homepage: http://faradaysec.com |
8 | 36 | Vcs-Git: https://gitlab.com/kalilinux/packages/python-faraday.git |
13 | 41 | Depends: curl, |
14 | 42 | gir1.2-gtk-3.0, |
15 | 43 | gir1.2-vte-2.91, |
16 | postgresql, | |
17 | python-alembic, | |
18 | python-attr, | |
19 | python-autobahn, | |
20 | python-bcrypt, | |
21 | python-click, | |
22 | python-colorama, | |
23 | python-dateutil, | |
24 | python-deprecation, | |
25 | python-filedepot, | |
26 | python-filteralchemy, | |
27 | python-flask (>= 1.0), | |
28 | python-flask-classful, | |
29 | python-flask-restless, | |
30 | python-flask-security (>= 3.0.0), | |
31 | python-flask-session, | |
32 | python-flask-sqlalchemy, | |
33 | python-future, | |
44 | postgresql, | |
34 | 45 | python-gobject, |
35 | python-ipy, | |
36 | python-marshmallow, | |
37 | python-marshmallow-sqlalchemy, | |
38 | python-mockito, | |
39 | python-nplusone, | |
40 | python-openssl, | |
41 | python-pil, | |
42 | python-pip, | |
43 | python-psycopg2, | |
44 | python-pyasn1-modules, | |
45 | python-requests, | |
46 | python-service-identity, | |
47 | python-simplejson, | |
48 | python-slugify, | |
49 | python-sqlalchemy, | |
50 | python-sqlalchemy-schemadisplay, | |
51 | 46 | python-tornado, |
52 | python-tqdm, | |
53 | python-twisted (>= 18.7.0), | |
54 | python-webargs (>= 4.4.1), | |
55 | python-websocket (>= 0.53.0), | |
56 | python-whoosh, | |
57 | sudo, | |
47 | sudo, | |
58 | 48 | zsh | zsh-beta, |
59 | 49 | ${misc:Depends}, |
60 | 50 | ${python:Depends}, |
61 | 51 | ${shlibs:Depends} |
62 | Recommends: python-bs4, python-selenium, ruby | ruby-interpreter | |
52 | Recommends: fonts-font-awesome, | |
53 | fonts-glyphicons-halflings, | |
54 | python-bs4, | |
55 | python-selenium, | |
56 | ruby | ruby-interpreter | |
63 | 57 | Description: Collaborative Penetration Test IDE |
64 | 58 | Faraday introduces a new concept (IPE) Integrated Penetration-Test Environment |
65 | 59 | a multiuser Penetration test IDE. Designed for distribution, indexation and |
5 | 5 | Copyright: 2013-2018 Infobyte LLC (http://www.infobytesec.com/) |
6 | 6 | License: GPL-3 |
7 | 7 | |
8 | Files: server/www/script/jquery.ui.tabs.min.js | |
9 | server/www/script/jquery.js server/www/script/jquery-1.11.2.js | |
10 | server/www/script/jquery-1.9.1.js | |
11 | persistence/server/docs/_build/html/_static/jquery.js | |
12 | persistence/server/docs/_build/html/_static/jquery-3.1.0.js | |
13 | persistence/server/docs/_build/html/_static/jquery-1.11.1.js | |
8 | Files: faraday/server/www/script/jquery.ui.tabs.min.js | |
9 | faraday/server/www/script/jquery.js faraday/server/www/script/jquery-1.11.2.js | |
10 | faraday/server/www/script/jquery-1.9.1.js | |
11 | faraday/client/persistence/server/docs/_build/html/_static/jquery.js | |
12 | faraday/client/persistence/server/docs/_build/html/_static/jquery-3.1.0.js | |
13 | faraday/client/persistence/server/docs/_build/html/_static/jquery-1.11.1.js | |
14 | 14 | Copyright: 2005, 2014 jQuery Foundation, Inc. and other contributors |
15 | 15 | License: MIT |
16 | 16 | |
17 | Files: server/www/script/angular.min.js | |
18 | server/www/script/angular-ui-notification.min.js | |
19 | server/www/script/angular-cookies.js | |
20 | server/www/script/angular-mocks.js | |
21 | server/www/script/angular-route.js | |
22 | server/www/script/angular.js | |
23 | Copyright: 2010-2015 Google, Inc. http://angularjs.org | |
24 | License: MIT | |
25 | ||
26 | Files: server/www/script/angular-moment.js | |
17 | Files: faraday/server/www/script/angular*.js | |
18 | Copyright: 2010-2017 Google, Inc. http://angularjs.org | |
19 | License: MIT | |
20 | ||
21 | Files: faraday/server/www/script/angular-moment.js | |
27 | 22 | Copyright: 2013, 2014, 2015 Uri Shaked |
28 | 23 | License: MIT |
29 | 24 | |
30 | Files: server/www/script/angular-hotkeys.js | |
25 | Files: faraday/server/www/script/angular-selection-model.js | |
26 | Copyright: 2014 Justin Russel | |
27 | License: MIT | |
28 | ||
29 | Files: faraday/server/www/script/angular-hotkeys.js | |
31 | 30 | Copyright: 2014 Wes Cruver |
32 | 31 | License: MIT |
33 | 32 | |
34 | Files: plugins/repo/sshdefaultscan/plugin.py | |
35 | plugins/repo/peepingtom/plugin.py | |
33 | Files: faraday/client/plugins/repo/sshdefaultscan/plugin.py | |
34 | faraday/client/plugins/repo/peepingtom/plugin.py | |
36 | 35 | Copyright: 2015 Andres Tarantini <[email protected]> |
37 | 36 | License: MIT |
38 | 37 | |
39 | Files: server/www/script/cryptojs-sha1.js | |
38 | Files: faraday/server/www/script/cryptojs-sha1.js | |
40 | 39 | Copyright: 2009-2013 by Jeff Mott |
41 | 40 | License: BSD-3-clause |
42 | 41 | |
43 | Files: plugins/repo/nessus/dotnessus_v2.py plugins/repo/nessus/pynessus.py | |
42 | Files: faraday/client/plugins/repo/nessus/dotnessus_v2.py faraday/client/plugins/repo/nessus/pynessus.py | |
44 | 43 | Copyright: 2010 Dustin Seibel |
45 | 44 | License: GPL-2+ |
46 | 45 | |
48 | 47 | Copyright: Blake Cornell, CTO, Integris Security LLC |
49 | 48 | License: GPL-2 |
50 | 49 | |
51 | Files: server/www/script/Chart.js | |
50 | Files: faraday/server/www/script/Chart.js | |
52 | 51 | Copyright: 2014 Nick Downie |
53 | 52 | License: MIT |
54 | 53 | |
55 | Files: plugins/repo/fruitywifi/fruitywifi.py | |
54 | Files: faraday/client/plugins/repo/fruitywifi/fruitywifi.py | |
56 | 55 | Copyright: 2016 xtr4nge [email protected] |
57 | 56 | License: GPL-3+ |
58 | 57 | |
59 | Files: server/www/script/anguilar-ui-notification.min.css | |
60 | server/www/script/angular-ui-notification.min.js | |
58 | Files: faraday/server/www/script/angular-ui-notification.min.js | |
61 | 59 | Copyright: 2014 Alexey Avramchik |
62 | 60 | License: MIT |
63 | 61 | |
64 | Files: plugins/repo/zap/java/Configuration.java | |
65 | plugins/repo/zap/java/FaradayExtension.java | |
62 | Files: faraday/client/plugins/repo/zap/java/Configuration.java | |
63 | faraday/client/plugins/repo/zap/java/FaradayExtension.java | |
66 | 64 | Copyright: 2018 The ZAP Development Team |
67 | 65 | License: Apache-2.0 |
68 | 66 | |
69 | 67 | Files: debian/* |
70 | Copyright: 2014-2018 Sophie Brun <[email protected]> | |
68 | Copyright: 2014-2019 Sophie Brun <[email protected]> | |
71 | 69 | License: GPL-3 |
72 | 70 | |
73 | 71 | License: GPL-3 |
0 | #!/bin/sh | |
1 | ||
2 | aux_file_path="$HOME/.faraday/password_changed.txt" | |
3 | ||
4 | systemctl start python-faraday | |
5 | sleep 3 | |
6 | if [ ! -f $aux_file_path ]; then | |
7 | touch $aux_file_path | |
8 | echo "Please, set a new password for the Faraday's default user 'faraday'" | |
9 | faraday-manage change-password | |
10 | faraday-client --login | |
11 | else | |
12 | faraday-client "$@" | |
13 | fi | |
14 | systemctl stop python-faraday |
0 | #!/bin/sh | |
1 | ||
2 | aux_file_path="$HOME/.faraday/password_changed.txt" | |
3 | ||
4 | systemctl start python-faraday | |
5 | sleep 3 | |
6 | if [ ! -f $aux_file_path ]; then | |
7 | touch $aux_file_path | |
8 | cd /usr/share/python-faraday | |
9 | echo "Please, set a new password for the Faraday's default user 'faraday'" | |
10 | ./manage.py change-password | |
11 | ./faraday.py --login | |
12 | else | |
13 | cd /usr/share/python-faraday && ./faraday.py "$@" | |
14 | fi | |
15 | systemctl stop python-faraday |
0 | .TH FARADAY-CLIENT "1" "June 2019" "Faraday Client v3.8.0" "User Commands" | |
1 | .SH NAME | |
2 | Faraday-Client \- Faraday's launcher parser | |
3 | .SH SYNOPSIS | |
4 | faraday\-client [\-h] [\-n HOST] [\-px PORT_XMLRPC] [\-pr PORT_REST] | |
5 | [\-\-disable\-excepthook] [\-\-login] [\-\-dev\-mode] | |
6 | [\-\-cert CERT_PATH] [\-\-gui GUI] [\-\-cli] [\-w WORKSPACE] | |
7 | [\-r FILENAME] [\-d] [\-\-creds\-file CREDS_FILE] | |
8 | [\-\-keep\-old] [\-\-keep\-new] [\-v] | |
9 | .SH DESCRIPTION | |
10 | .PP | |
11 | Faraday's launcher parser. | |
12 | .SH OPTIONS | |
13 | .TP | |
14 | \fB\-h\fR, \fB\-\-help\fR | |
15 | show this help message and exit | |
16 | .TP | |
17 | \fB\-\-disable\-excepthook\fR | |
18 | Disable the application exception hook that allows to | |
19 | send error reports to developers. | |
20 | .TP | |
21 | \fB\-\-login\fR | |
22 | Enable prompt for authentication Database credentials | |
23 | .TP | |
24 | \fB\-\-dev\-mode\fR | |
25 | Enable dev mode. This will use the user config and | |
26 | plugin folder. | |
27 | .TP | |
28 | \fB\-\-cert\fR CERT_PATH | |
29 | Path to the valid Faraday server certificate | |
30 | .TP | |
31 | \fB\-\-gui\fR GUI | |
32 | Select interface to start Faraday. Supported values | |
33 | are 'gtk' and 'no' (no GUI at all). Defaults to GTK | |
34 | .TP | |
35 | \fB\-\-cli\fR | |
36 | Set this flag to avoid GUI and use Faraday as a CLI. | |
37 | .TP | |
38 | \fB\-w\fR WORKSPACE, \fB\-\-workspace\fR WORKSPACE | |
39 | Workspace to be opened | |
40 | .TP | |
41 | \fB\-r\fR FILENAME, \fB\-\-report\fR FILENAME | |
42 | Report to be parsed by the CLI | |
43 | .TP | |
44 | \fB\-d\fR, \fB\-\-debug\fR | |
45 | Enables debug mode. Default = disabled | |
46 | .TP | |
47 | \fB\-\-creds\-file\fR CREDS_FILE | |
48 | File containing user's credentials to be used in CLI | |
49 | mode | |
50 | .TP | |
51 | \fB\-\-keep\-old\fR | |
52 | Keep old object in CLI mode if Faraday find a conflict | |
53 | .TP | |
54 | \fB\-\-keep\-new\fR | |
55 | Keep new object in CLI mode if Faraday find a conflict | |
56 | (DEFAULT ACTION) | |
57 | .TP | |
58 | \fB\-v\fR, \fB\-\-version\fR | |
59 | show program's version number and exit | |
60 | .SS "connection:" | |
61 | .TP | |
62 | \fB\-n\fR HOST, \fB\-\-hostname\fR HOST | |
63 | The hostname where both server APIs will listen | |
64 | (XMLRPC and RESTful). Default = localhost | |
65 | .TP | |
66 | \fB\-px\fR PORT_XMLRPC, \fB\-\-port\-xmlrpc\fR PORT_XMLRPC | |
67 | Sets the port where the API XMLRPC Server will listen. | |
68 | Default = 9876 | |
69 | .TP | |
70 | \fB\-pr\fR PORT_REST, \fB\-\-port\-rest\fR PORT_REST | |
71 | Sets the port where the API RESTful Server will | |
72 | listen. Default = 9977 | |
73 | .SH "SEE ALSO" | |
74 | /usr/share/doc/python-faraday/README.Debian |
0 | .TH FARADAY-MANAGE "1" "june 2019" "Faraday v3.8.0" "User Commands" | |
1 | .SH NAME | |
2 | faraday-manage \- Helper to manage Faraday's database, users... | |
3 | .SH SYNOPSIS | |
4 | faraday\-manage [\fI\,OPTIONS\/\fR] \fI\,COMMAND \/\fR[\fI\,ARGS\/\fR]... | |
5 | .SH OPTIONS | |
6 | .TP | |
7 | \fB\-h\fR, \fB\-\-help\fR | |
8 | show this help message and exit. | |
9 | .SH COMMANDS | |
10 | .TP | |
11 | add\-custom\-field | |
12 | Custom field wizard | |
13 | .TP | |
14 | change\-password | |
15 | Changes the password of a user | |
16 | .TP | |
17 | create\-superuser | |
18 | Create ADMIN user for Faraday application | |
19 | .TP | |
20 | create\-tables | |
21 | Create database tables. | |
22 | .TP | |
23 | database\-schema | |
24 | Create a PNG image with Faraday model object | |
25 | .TP | |
26 | delete\-custom\-field | |
27 | Custom fiel delete wizard | |
28 | .TP | |
29 | import\-from\-couchdb | |
30 | Import all your data from Couchdb Faraday databases | |
31 | .TP | |
32 | initdb | |
33 | Create Faraday DB in Postgresql, alos tables and... | |
34 | .TP | |
35 | list\-plugins | |
36 | List Available Plugins | |
37 | .TP | |
38 | migrate | |
39 | Migrates database schema. | |
40 | .TP | |
41 | process\-reports | |
42 | Enable importations of plugins reports in ~/.faraday | |
43 | .TP | |
44 | show\-urls | |
45 | Show all URLs in Faraday Server API | |
46 | .TP | |
47 | status\-check | |
48 | Checks configuration and faraday status. | |
49 | .TP | |
50 | support | |
51 | Generates a .zip file with technical information | |
52 | .SH "SEE ALSO" | |
53 | /usr/share/doc/python-faraday/README.Debian |
0 | .TH FARADAY-SERVER "1" "june 2019" "Faraday v3.8.0" "User Commands" | |
1 | .SH NAME | |
2 | faraday-server \- Faraday server's launcher | |
3 | .SH SYNOPSIS | |
4 | faraday\-server [\-h] [\-\-ssl] [\-\-debug] [\-\-start] [\-\-stop] | |
5 | [\-\-restart] [\-\-nodeps] [\-\-port PORT] [\-\-websocket_port | |
6 | WEBSOCKET_PORT] [\-\-ind_address BIND_ADDRESS] [\-v] | |
7 | .SH OPTIONS | |
8 | .TP | |
9 | \fB\-h\fR, \fB\-\-help\fR | |
10 | show this help message and exit | |
11 | .TP | |
12 | \fB\-\-ssl\fR | |
13 | enable HTTPS | |
14 | .TP | |
15 | \fB\-\-debug\fR | |
16 | run Faraday Server in debug mode | |
17 | .TP | |
18 | \fB\-\-start\fR | |
19 | run Faraday Server in background | |
20 | .TP | |
21 | \fB\-\-stop\fR | |
22 | stop Faraday Server | |
23 | .TP | |
24 | \fB\-\-restart\fR | |
25 | Restart Faraday Server | |
26 | .TP | |
27 | \fB\-\-nodeps\fR | |
28 | Skip dependency check | |
29 | .TP | |
30 | \fB\-\-port\fR PORT | |
31 | Overrides server.ini port configuration | |
32 | .TP | |
33 | \fB\-\-websocket_port\fR WEBSOCKET_PORT | |
34 | Overrides server.ini websocket port configuration | |
35 | .TP | |
36 | \fB\-\-bind_address\fR BIND_ADDRESS | |
37 | Overrides server.ini bind_address configuration | |
38 | .TP | |
39 | \fB\-v\fR, \fB\-\-version\fR | |
40 | show program's version number and exit | |
41 | .SH "SEE ALSO" | |
42 | /usr/share/doc/python-faraday/README.Debian |
0 | .TH FPLUGIN "1" "June 2019" "User Commands" | |
1 | .SH NAME | |
2 | fplugin \- for faraday | |
3 | .SH SYNOPSIS | |
4 | fplugin [\-h] [\-i] [\-w WORKSPACE] [\-u URL] \fB\-\-username\fR USERNAME | |
5 | \fB\-\-password\fR PASSWORD | |
6 | [command] | |
7 | .SH DESCRIPTION | |
8 | Using our plugin you can do different actions in the command line | |
9 | and interact with Faraday. Faraday comes with some presets for bulk | |
10 | actions such as object removal, get object information, etc. | |
11 | Any parameter not recognized by fplugin, or everything after \fB\-\-\fR will be passed on | |
12 | to the called script. | |
13 | .SH OPTIONS | |
14 | .TP | |
15 | \fB\-h\fR, \fB\-\-help\fR | |
16 | show this help message and exit | |
17 | .TP | |
18 | \fB\-i\fR, \fB\-\-interactive\fR | |
19 | Run in interactive mode (default: False) | |
20 | .TP | |
21 | \fB\-w\fR WORKSPACE, \fB\-\-workspace\fR WORKSPACE | |
22 | Workspace to use (default: untitled) | |
23 | .TP | |
24 | \fB\-u\fR URL, \fB\-\-url\fR URL | |
25 | Faraday Server URL. Example: http://localhost:5985 | |
26 | (default: http://localhost:5985) | |
27 | .HP | |
28 | \fB\-\-username\fR USERNAME | |
29 | .HP | |
30 | \fB\-\-password\fR PASSWORD | |
31 | .SH AVAILABLE SCRIPTS | |
32 | .TP | |
33 | \- autoclose_vulns: Closes vulns from the current workspace if a certain time has passed | |
34 | .TP | |
35 | \- change_vuln_status: Changes Vulns Status (to closed) | |
36 | .TP | |
37 | \- create_cred: Creates new credentials | |
38 | .TP | |
39 | \- create_host: Creates a new host in current workspace | |
40 | .TP | |
41 | \- create_service: Creates a new service in a specified interface | |
42 | .TP | |
43 | \- create_vuln: Creates a new vulnerability | |
44 | .TP | |
45 | \- create_vulnweb: Creates a new website vulnerability in a specified service | |
46 | .TP | |
47 | \- del_all_hosts: Deletes all stored hosts | |
48 | .TP | |
49 | \- del_all_services_closed: Deletes all services with a non open port | |
50 | .TP | |
51 | \- del_all_vulns_with: Delete all vulnerabilities matched with regex | |
52 | .TP | |
53 | \- fbruteforce_services: Script to perform a brute force attack on different services in a workspace | |
54 | .TP | |
55 | \- filter_services: Filter services by port or service name | |
56 | .TP | |
57 | \- get_all_ips: Get all scanned interfaces | |
58 | .TP | |
59 | \- get_severitiy_by_cwe: Get Vulns filtered by Severity and change Severity based in CWE | |
60 | .TP | |
61 | \- import_csv: Import Faraday objects from CSV file | |
62 | .TP | |
63 | \- import_pcap: Import every host found in a PCAP file for further scanning | |
64 | .TP | |
65 | \- list_creds: Get all stored credentials | |
66 | .TP | |
67 | \- list_hosts: List hosts | |
68 | .TP | |
69 | \- list_ips: List all scanned IPs | |
70 | .TP | |
71 | \- list_os: Lists all scanned OSs | |
72 | .TP | |
73 | \- screenshot_server: Takes a Screenshot of the ip:ports of a given protocol | |
74 | .SH "SEE ALSO" | |
75 | /usr/share/doc/python-faraday/README.Debian |
3 | 3 | |
4 | 4 | migrate() { |
5 | 5 | if su postgres -c "psql -lqt" | cut -d \| -f 1 | grep -qw faraday; then |
6 | cd /usr/share/python-faraday | |
7 | python manage.py migrate | |
6 | faraday-manage migrate | |
8 | 7 | fi |
9 | 8 | } |
10 | 9 |
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 | |
4 | --- | |
5 | This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ | |
6 | --- a/faraday.py | |
7 | +++ b/faraday.py | |
8 | @@ -331,6 +331,10 @@ def setupXMLConfig(): | |
9 | if not os.path.isfile(FARADAY_USER_CONFIG_XML): | |
10 | logger.info("Copying default configuration from project.") | |
11 | shutil.copy(FARADAY_BASE_CONFIG_XML, FARADAY_USER_CONFIG_XML) | |
12 | + imgdir = os.path.join(FARADAY_USER_HOME, 'images') | |
13 | + if os.path.isdir(imgdir): | |
14 | + shutil.rmtree(imgdir) | |
15 | + shutil.copytree(FARADAY_BASE_IMAGES, imgdir) | |
16 | else: | |
17 | logger.info("Using custom user configuration.") | |
18 |
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 | Forwarded: not-needed | |
6 | Last-Update: 2019-06-11 | |
7 | --- | |
8 | This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ | |
9 | --- a/faraday/client/start_client.py | |
10 | +++ b/faraday/client/start_client.py | |
11 | @@ -169,9 +169,9 @@ def getParserArgs(): | |
12 | default=None, | |
13 | help="File containing user's credentials to be used in CLI mode") | |
14 | ||
15 | - parser.add_argument('--nodeps', | |
16 | - action="store_true", | |
17 | - help='Skip dependency check') | |
18 | +# parser.add_argument('--nodeps', | |
19 | +# action="store_true", | |
20 | +# help='Skip dependency check') | |
21 | parser.add_argument('--keep-old', action='store_true', help='Keep old object in CLI mode if Faraday find a conflict') | |
22 | parser.add_argument('--keep-new', action='store_true', help='Keep new object in CLI mode if Faraday find a conflict (DEFAULT ACTION)') | |
23 | ||
24 | @@ -181,33 +181,33 @@ def getParserArgs(): | |
25 | return parser.parse_args() | |
26 | ||
27 | ||
28 | -def check_dependencies_or_exit(): | |
29 | - """ | |
30 | - Dependency resolver based on a previously specified CONST_REQUIREMENTS_FILE. | |
31 | - Currently checks a list of dependencies from a file and exits if they are not met. | |
32 | - """ | |
33 | +#def check_dependencies_or_exit(): | |
34 | +# """ | |
35 | +# Dependency resolver based on a previously specified CONST_REQUIREMENTS_FILE. | |
36 | +# Currently checks a list of dependencies from a file and exits if they are not met. | |
37 | +# """ | |
38 | ||
39 | - installed_deps, missing_deps, conflict_deps = dependencies.check_dependencies(requirements_file=FARADAY_REQUIREMENTS_FILE) | |
40 | +# installed_deps, missing_deps, conflict_deps = dependencies.check_dependencies(requirements_file=FARADAY_REQUIREMENTS_FILE) | |
41 | ||
42 | - logger.info("Checking dependencies...") | |
43 | +# logger.info("Checking dependencies...") | |
44 | ||
45 | - if conflict_deps: | |
46 | - logger.info("Some dependencies are old. Update them with \"pip install -r requirements_server.txt -U\"") | |
47 | +# if conflict_deps: | |
48 | +# logger.info("Some dependencies are old. Update them with \"pip install -r requirements_server.txt -U\"") | |
49 | ||
50 | - if missing_deps: | |
51 | +# if missing_deps: | |
52 | ||
53 | - install_deps = query_yes_no("Do you want to install them?", default="no") | |
54 | +# install_deps = query_yes_no("Do you want to install them?", default="no") | |
55 | ||
56 | - if install_deps: | |
57 | - dependencies.install_packages(missing_deps) | |
58 | - logger.info("Dependencies installed. Please launch Faraday Server again.") | |
59 | - sys.exit(0) | |
60 | - else: | |
61 | - logger.error("Dependencies not met. Please refer to the documentation in order to install them. [%s]", | |
62 | - ", ".join(missing_deps)) | |
63 | - sys.exit(1) | |
64 | +# if install_deps: | |
65 | +# dependencies.install_packages(missing_deps) | |
66 | +# logger.info("Dependencies installed. Please launch Faraday Server again.") | |
67 | +# sys.exit(0) | |
68 | +# else: | |
69 | +# logger.error("Dependencies not met. Please refer to the documentation in order to install them. [%s]", | |
70 | +# ", ".join(missing_deps)) | |
71 | +# sys.exit(1) | |
72 | ||
73 | - logger.info("Dependencies met") | |
74 | +# logger.info("Dependencies met") | |
75 | ||
76 | def setConf(): | |
77 | """ | |
78 | --- a/faraday/manage.py | |
79 | +++ b/faraday/manage.py | |
80 | @@ -124,9 +124,9 @@ def sql_shell(): | |
81 | @click.command(help='Checks configuration and faraday status.') | |
82 | @click.option('--check_postgresql', default=False, is_flag=True) | |
83 | @click.option('--check_faraday', default=False, is_flag=True) | |
84 | [email protected]('--check_dependencies', default=False, is_flag=True) | |
85 | +#@click.option('--check_dependencies', default=False, is_flag=True) | |
86 | @click.option('--check_config', default=False, is_flag=True) | |
87 | -def status_check(check_postgresql, check_faraday, check_dependencies, check_config): | |
88 | +def status_check(check_postgresql, check_faraday, check_config): | |
89 | ||
90 | selected = False | |
91 | exit_code = 0 | |
92 | @@ -140,9 +140,9 @@ def status_check(check_postgresql, check | |
93 | status_check_functions.print_faraday_status() | |
94 | selected = True | |
95 | ||
96 | - if check_dependencies: | |
97 | - status_check_functions.print_depencencies_status() | |
98 | - selected = True | |
99 | + # if check_dependencies: | |
100 | + # status_check_functions.print_depencencies_status() | |
101 | + # selected = True | |
102 | ||
103 | if check_config: | |
104 | status_check_functions.print_config_status() | |
105 | --- a/faraday/server/commands/status_check.py | |
106 | +++ b/faraday/server/commands/status_check.py | |
107 | @@ -20,7 +20,7 @@ from faraday.server.web import app | |
108 | from faraday.server.models import db | |
109 | from faraday.server.config import FARADAY_BASE | |
110 | from faraday.server.utils.daemonize import is_server_running | |
111 | -from faraday.utils import dependencies | |
112 | +#from faraday.utils import dependencies | |
113 | ||
114 | ||
115 | CONF = getInstanceConfiguration() | |
116 | @@ -117,39 +117,39 @@ def check_client(): | |
117 | return False | |
118 | ||
119 | ||
120 | -def check_server_dependencies(): | |
121 | - | |
122 | - requirements_file=os.path.join(FARADAY_BASE,'requirements_server.txt') | |
123 | - installed_deps, missing_deps, conflict_deps = dependencies.check_dependencies( | |
124 | - requirements_file=requirements_file) | |
125 | - | |
126 | - if conflict_deps: | |
127 | - return True, conflict_deps | |
128 | +#def check_server_dependencies(): | |
129 | +# | |
130 | +# requirements_file=os.path.join(FARADAY_BASE,'requirements_server.txt') | |
131 | +# installed_deps, missing_deps, conflict_deps = dependencies.check_dependencies( | |
132 | +# requirements_file=requirements_file) | |
133 | +# | |
134 | +# if conflict_deps: | |
135 | +# return True, conflict_deps | |
136 | +# | |
137 | +# if missing_deps: | |
138 | +# return 0, missing_deps | |
139 | +# | |
140 | +# if not conflict_deps and not missing_deps: | |
141 | +# return None, None | |
142 | + | |
143 | + | |
144 | +#def check_client_dependencies(): | |
145 | + | |
146 | +# requirements_file=os.path.join(FARADAY_BASE,'requirements.txt') | |
147 | +# installed_deps, missing_deps, conflict_deps = dependencies.check_dependencies( | |
148 | +# requirements_file=requirements_file) | |
149 | +# | |
150 | +# if 'argparse' in conflict_deps: | |
151 | +# conflict_deps.remove('argparse') | |
152 | +# | |
153 | +# if conflict_deps: | |
154 | +# return True, conflict_deps | |
155 | ||
156 | - if missing_deps: | |
157 | - return 0, missing_deps | |
158 | - | |
159 | - if not conflict_deps and not missing_deps: | |
160 | - return None, None | |
161 | - | |
162 | +# if missing_deps: | |
163 | +# return 0, missing_deps | |
164 | ||
165 | -def check_client_dependencies(): | |
166 | - | |
167 | - requirements_file=os.path.join(FARADAY_BASE,'requirements.txt') | |
168 | - installed_deps, missing_deps, conflict_deps = dependencies.check_dependencies( | |
169 | - requirements_file=requirements_file) | |
170 | - | |
171 | - if 'argparse' in conflict_deps: | |
172 | - conflict_deps.remove('argparse') | |
173 | - | |
174 | - if conflict_deps: | |
175 | - return True, conflict_deps | |
176 | - | |
177 | - if missing_deps: | |
178 | - return 0, missing_deps | |
179 | - | |
180 | - if not conflict_deps and not missing_deps: | |
181 | - return None, None | |
182 | +# if not conflict_deps and not missing_deps: | |
183 | +# return None, None | |
184 | ||
185 | ||
186 | def check_credentials(): | |
187 | @@ -255,34 +255,34 @@ def print_faraday_status(): | |
188 | .format(yellow=Fore.YELLOW, white=Fore.WHITE)) | |
189 | ||
190 | ||
191 | -def print_depencencies_status(): | |
192 | - """Prints Status of the dependencies using check_server_dependencies() and check_client_dependencies()""" | |
193 | - | |
194 | - status, server_dep = check_server_dependencies() | |
195 | - if status == True: | |
196 | - print('[{red}-{white}] Some server dependencies are old: [' + ', '.join(server_dep) + ']. Update them with \"pip install -r requirements_server.txt -U\"') \ | |
197 | - .format(red=Fore.RED, white=Fore.WHITE) | |
198 | - | |
199 | - elif status == 0: | |
200 | - print('[{red}-{white}] Client dependencies not met: [' + ', '.join(server_dep) + '] Install them with \"pip install -r requirements_server.txt -U\"')\ | |
201 | - .format(red=Fore.RED, white=Fore.WHITE) | |
202 | - | |
203 | - else: | |
204 | - print('[{green}+{white}] Server dependencies met' \ | |
205 | - .format(green=Fore.GREEN, white=Fore.WHITE)) | |
206 | - | |
207 | - status, client_dep = check_client_dependencies() | |
208 | - if status == True: | |
209 | - print('[{red}-{white}] Some client dependencies are old: [' + ', '.join(client_dep) + ']. Update them with \"pip install -r requirements.txt -U\"') \ | |
210 | - .format(red=Fore.RED, white=Fore.WHITE) | |
211 | - | |
212 | - elif status == 0: | |
213 | - print('[{red}-{white}] Client dependencies not met: [' + ', '.join(client_dep) + ']. Install them with \"pip install -r requirements.txt -U\"')\ | |
214 | - .format(red=Fore.RED, white=Fore.WHITE) | |
215 | +#def print_depencencies_status(): | |
216 | +# """Prints Status of the dependencies using check_server_dependencies() and check_client_dependencies()""" | |
217 | +# | |
218 | +# status, server_dep = check_server_dependencies() | |
219 | +# if status == True: | |
220 | +# print('[{red}-{white}] Some server dependencies are old: [' + ', '.join(server_dep) + ']. Update them with \"pip install -r requirements_server.txt -U\"') \ | |
221 | +# .format(red=Fore.RED, white=Fore.WHITE) | |
222 | +# | |
223 | +# elif status == 0: | |
224 | +# print('[{red}-{white}] Client dependencies not met: [' + ', '.join(server_dep) + '] Install them with \"pip install -r requirements_server.txt -U\"')\ | |
225 | +# .format(red=Fore.RED, white=Fore.WHITE) | |
226 | +# | |
227 | +# else: | |
228 | +# print('[{green}+{white}] Server dependencies met' \ | |
229 | +# .format(green=Fore.GREEN, white=Fore.WHITE)) | |
230 | +# | |
231 | +# status, client_dep = check_client_dependencies() | |
232 | +# if status == True: | |
233 | +# print('[{red}-{white}] Some client dependencies are old: [' + ', '.join(client_dep) + ']. Update them with \"pip install -r requirements.txt -U\"') \ | |
234 | +# .format(red=Fore.RED, white=Fore.WHITE) | |
235 | +# | |
236 | +# elif status == 0: | |
237 | +# print('[{red}-{white}] Client dependencies not met: [' + ', '.join(client_dep) + ']. Install them with \"pip install -r requirements.txt -U\"')\ | |
238 | +# .format(red=Fore.RED, white=Fore.WHITE) | |
239 | ||
240 | - else: | |
241 | - print('[{green}+{white}] Client dependencies met'\ | |
242 | - .format(green=Fore.GREEN, white=Fore.WHITE)) | |
243 | +# else: | |
244 | +# print('[{green}+{white}] Client dependencies met'\ | |
245 | +# .format(green=Fore.GREEN, white=Fore.WHITE)) | |
246 | ||
247 | ||
248 | def print_config_status(): |
0 | Description: don't use pip | |
1 | Don't use pip: we use apt for dependencies management | |
2 | Author: Sophie Brun <[email protected]> | |
3 | Last-Update: 2019-06-12 | |
4 | --- | |
5 | This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ | |
6 | --- a/faraday/server/commands/support.py | |
7 | +++ b/faraday/server/commands/support.py | |
8 | @@ -6,10 +6,10 @@ from tqdm import tqdm | |
9 | from colorama import init | |
10 | from colorama import Fore, Style | |
11 | ||
12 | -try: | |
13 | - from pip._internal.operations import freeze | |
14 | -except ImportError: # pip < 10.0 | |
15 | - from pip.operations import freeze | |
16 | +#try: | |
17 | +# from pip._internal.operations import freeze | |
18 | +#except ImportError: # pip < 10.0 | |
19 | +# from pip.operations import freeze | |
20 | ||
21 | import faraday.config.constant as constants | |
22 | from faraday.server.commands import status_check | |
23 | @@ -33,14 +33,14 @@ def get_status_check(path): | |
24 | sys.stdout = original_stdout | |
25 | ||
26 | ||
27 | -def get_pip_freeze(path): | |
28 | +#def get_pip_freeze(path): | |
29 | #Executes pip freeze internally and saves the info a pip_freeze.txt file | |
30 | - pip_freeze = freeze.freeze() | |
31 | - pip_file = open(path + '/pip_freeze.txt', 'a') | |
32 | - for line in pip_freeze: | |
33 | - pip_file.write(line) | |
34 | - pip_file.write('\n') | |
35 | - pip_file.close() | |
36 | +# pip_freeze = freeze.freeze() | |
37 | +# pip_file = open(path + '/pip_freeze.txt', 'a') | |
38 | +# for line in pip_freeze: | |
39 | +# pip_file.write(line) | |
40 | +# pip_file.write('\n') | |
41 | +# pip_file.close() | |
42 | ||
43 | def get_logs(path): | |
44 | #Copies the logs using the logs path saved on constants | |
45 | @@ -61,7 +61,7 @@ def all_for_support(): | |
46 | pbar.update(1) | |
47 | get_logs(path) | |
48 | pbar.update(1) | |
49 | - get_pip_freeze(path) | |
50 | +# get_pip_freeze(path) | |
51 | pbar.update(1) | |
52 | make_zip(path) | |
53 | pbar.update(1) | |
54 | @@ -69,4 +69,4 @@ def all_for_support(): | |
55 | pbar.update(1) | |
56 | ||
57 | print('[{green}+{white}] Process Completed. A {bright}faraday_support.zip{normal} was generated' | |
58 | - .format(green=Fore.GREEN, white=Fore.WHITE, bright=Style.BRIGHT, normal=Style.NORMAL)) | |
59 | \ No newline at end of file | |
60 | + .format(green=Fore.GREEN, white=Fore.WHITE, bright=Style.BRIGHT, normal=Style.NORMAL)) | |
61 | --- a/faraday/utils/dependencies.py | |
62 | +++ b/faraday/utils/dependencies.py | |
63 | @@ -5,11 +5,11 @@ See the file 'doc/LICENSE' for the licen | |
64 | ||
65 | ''' | |
66 | import sys | |
67 | -try: | |
68 | - from pip import main | |
69 | -except ImportError: | |
70 | - # pip 10 compat | |
71 | - from pip._internal import main | |
72 | +#try: | |
73 | +# from pip import main | |
74 | +#except ImportError: | |
75 | +# # pip 10 compat | |
76 | +# from pip._internal import main | |
77 | import pkg_resources | |
78 | ||
79 | ||
80 | @@ -36,9 +36,9 @@ def check_dependencies(requirements_file | |
81 | return installed, missing, conflict | |
82 | ||
83 | ||
84 | -def install_packages(packages): | |
85 | - for package in packages: | |
86 | - pip_cmd = ['install', package, '-U'] | |
87 | - if not hasattr(sys, 'real_prefix'): | |
88 | - pip_cmd.append('--user') | |
89 | - main(pip_cmd) | |
90 | +#def install_packages(packages): | |
91 | +# for package in packages: | |
92 | +# pip_cmd = ['install', package, '-U'] | |
93 | +# if not hasattr(sys, 'real_prefix'): | |
94 | +# pip_cmd.append('--user') | |
95 | +# main(pip_cmd) |
0 | Description: Use correct path to VERSION in Kali | |
1 | Last-Update: 2018-08-28 | |
2 | --- | |
3 | This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ | |
4 | --- a/server/api/modules/info.py | |
5 | +++ b/server/api/modules/info.py | |
6 | @@ -14,7 +14,7 @@ info_api = Blueprint('info_api', __name_ | |
7 | def show_info(): | |
8 | faraday_directory = os.path.dirname(os.path.realpath('faraday.py')) | |
9 | ||
10 | - file_path = os.path.join(faraday_directory, 'VERSION') | |
11 | + file_path = '/usr/share/python-faraday/VERSION' | |
12 | ||
13 | with open(file_path, 'r') as version_file: | |
14 | version = version_file.read().strip() |
0 | Description: Fix a syntax error | |
1 | Author: Sophie Brun <[email protected]> | |
2 | Last-Update: 2017-02-09 | |
3 | --- | |
4 | This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ | |
5 | --- a/helpers/plugins/canvas/faraday_report/faraday_report.py | |
6 | +++ b/helpers/plugins/canvas/faraday_report/faraday_report.py | |
7 | @@ -162,7 +162,7 @@ class ParsingCanvas(): | |
8 | interface_id, | |
9 | str(int(float(port))), | |
10 | 'tcp?', | |
11 | - [int(float(port)]) | |
12 | + [int(float(port))] | |
13 | ) | |
14 | ||
15 | host.addService(ip, port, service_id) |
0 | Description: Keep using filteralchemy name | |
1 | We packaged filteralchemy found here: | |
2 | https://github.com/infobyte/filteralchemy with name filteralchemy. | |
3 | Now upstream rename it filteralchemy_fork. As we just use filteralchemy | |
4 | for python-faraday and there is only one different commit from the | |
5 | official and unmaintained filteralchemy, we keep this name. | |
6 | Author: Sophie Brun <[email protected]> | |
7 | Forwarded: not-needed | |
8 | Last-Update: 2019-06-12 | |
9 | --- | |
10 | This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ | |
11 | --- a/requirements_server.txt | |
12 | +++ b/requirements_server.txt | |
13 | @@ -26,7 +26,7 @@ tqdm>=4.15.0 | |
14 | twisted>=18.7.0 | |
15 | webargs>=5.1.0 | |
16 | marshmallow-sqlalchemy==0.15.0 | |
17 | -filteralchemy-fork | |
18 | +filteralchemy | |
19 | filedepot>=0.5.0 | |
20 | nplusone>=0.8.1 | |
21 | deprecation>=1.0.1 |
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: 2018-07-11 | |
6 | --- | |
7 | This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ | |
8 | --- a/faraday-server.py | |
9 | +++ b/faraday-server.py | |
10 | @@ -17,7 +17,7 @@ try: | |
11 | from server.models import db, Workspace | |
12 | from server.utils import daemonize | |
13 | from server.web import app | |
14 | - from utils import dependencies | |
15 | +# from utils import dependencies | |
16 | from utils.user_input import query_yes_no | |
17 | from faraday import FARADAY_BASE | |
18 | from utils.logs import setUpLogger | |
19 | @@ -36,31 +36,31 @@ def setup_environment(check_deps=False): | |
20 | # Configuration files generation | |
21 | server.config.copy_default_config_to_local() | |
22 | ||
23 | - if check_deps: | |
24 | +# if check_deps: | |
25 | ||
26 | # Check dependencies | |
27 | - installed_deps, missing_deps, conflict_deps = dependencies.check_dependencies( | |
28 | - requirements_file=server.config.REQUIREMENTS_FILE) | |
29 | +# installed_deps, missing_deps, conflict_deps = dependencies.check_dependencies( | |
30 | +# requirements_file=server.config.REQUIREMENTS_FILE) | |
31 | ||
32 | - logger.info("Checking dependencies...") | |
33 | +# logger.info("Checking dependencies...") | |
34 | ||
35 | - if conflict_deps: | |
36 | - logger.info("Some dependencies are old. Update them with \"pip install -r requirements_server.txt -U\"") | |
37 | - | |
38 | - if missing_deps: | |
39 | - | |
40 | - install_deps = query_yes_no("Do you want to install them?", default="no") | |
41 | - | |
42 | - if install_deps: | |
43 | - dependencies.install_packages(missing_deps) | |
44 | - logger.info("Dependencies installed. Please launch Faraday Server again.") | |
45 | - sys.exit(0) | |
46 | - else: | |
47 | - logger.error("Dependencies not met. Please refer to the documentation in order to install them. [%s]", | |
48 | - ", ".join(missing_deps)) | |
49 | - | |
50 | - logger.info("Dependencies met") | |
51 | +# if conflict_deps: | |
52 | +# logger.info("Some dependencies are old. Update them with \"pip install -r requirements_server.txt -U\"") | |
53 | ||
54 | +# if missing_deps: | |
55 | + | |
56 | +# install_deps = query_yes_no("Do you want to install them?", default="no") | |
57 | + | |
58 | +# if install_deps: | |
59 | +# dependencies.install_packages(missing_deps) | |
60 | +# logger.info("Dependencies installed. Please launch Faraday Server again.") | |
61 | +# sys.exit(0) | |
62 | +# else: | |
63 | +# logger.error("Dependencies not met. Please refer to the documentation in order to install them. [%s]", | |
64 | +# ", ".join(missing_deps)) | |
65 | +# | |
66 | +# logger.info("Dependencies met") | |
67 | +# | |
68 | # Web configuration file generation | |
69 | server.config.gen_web_config() | |
70 | ||
71 | @@ -153,7 +153,7 @@ def main(): | |
72 | parser.add_argument('--start', action='store_true', help='run Faraday Server in background') | |
73 | parser.add_argument('--stop', action='store_true', help='stop Faraday Server') | |
74 | parser.add_argument('--restart', action='store_true', help='Restart Faraday Server') | |
75 | - parser.add_argument('--nodeps', action='store_true', help='Skip dependency check') | |
76 | +# parser.add_argument('--nodeps', action='store_true', help='Skip dependency check') | |
77 | parser.add_argument('--no-setup', action='store_true', help=argparse.SUPPRESS) | |
78 | parser.add_argument('--port', help='Overides server.ini port configuration') | |
79 | parser.add_argument('--websocket_port', help='Overides server.ini websocket port configuration') | |
80 | @@ -207,7 +207,7 @@ def main(): | |
81 | server.config.ssl.enabled = 'true' | |
82 | ||
83 | if not args.no_setup: | |
84 | - setup_environment(not args.nodeps) | |
85 | + setup_environment() | |
86 | ||
87 | if args.port: | |
88 | server.config.faraday_server.port = args.port | |
89 | --- a/faraday.py | |
90 | +++ b/faraday.py | |
91 | @@ -29,7 +29,7 @@ from config.constant import ( | |
92 | CONST_REQUIREMENTS_FILE, | |
93 | CONST_FARADAY_FOLDER_LIST, | |
94 | ) | |
95 | -from utils import dependencies | |
96 | +#from utils import dependencies | |
97 | from utils.logs import getLogger, setUpLogger | |
98 | from utils.user_input import query_yes_no | |
99 | ||
100 | @@ -165,9 +165,9 @@ def getParserArgs(): | |
101 | default=None, | |
102 | help="File containing user's credentials to be used in CLI mode") | |
103 | ||
104 | - parser.add_argument('--nodeps', | |
105 | - action="store_true", | |
106 | - help='Skip dependency check') | |
107 | +# parser.add_argument('--nodeps', | |
108 | +# action="store_true", | |
109 | +# help='Skip dependency check') | |
110 | parser.add_argument('--keep-old', action='store_true', help='Keep old object in CLI mode if Faraday find a conflict') | |
111 | parser.add_argument('--keep-new', action='store_true', help='Keep new object in CLI mode if Faraday find a conflict (DEFAULT ACTION)') | |
112 | ||
113 | @@ -180,33 +180,33 @@ def getParserArgs(): | |
114 | return parser.parse_args() | |
115 | ||
116 | ||
117 | -def check_dependencies_or_exit(): | |
118 | - """ | |
119 | - Dependency resolver based on a previously specified CONST_REQUIREMENTS_FILE. | |
120 | - Currently checks a list of dependencies from a file and exits if they are not met. | |
121 | - """ | |
122 | - | |
123 | - installed_deps, missing_deps, conflict_deps = dependencies.check_dependencies(requirements_file=FARADAY_REQUIREMENTS_FILE) | |
124 | - | |
125 | - logger.info("Checking dependencies...") | |
126 | - | |
127 | - if conflict_deps: | |
128 | - logger.info("Some dependencies are old. Update them with \"pip install -r requirements_server.txt -U\"") | |
129 | - | |
130 | - if missing_deps: | |
131 | - | |
132 | - install_deps = query_yes_no("Do you want to install them?", default="no") | |
133 | - | |
134 | - if install_deps: | |
135 | - dependencies.install_packages(missing_deps) | |
136 | - logger.info("Dependencies installed. Please launch Faraday Server again.") | |
137 | - sys.exit(0) | |
138 | - else: | |
139 | - logger.error("Dependencies not met. Please refer to the documentation in order to install them. [%s]", | |
140 | - ", ".join(missing_deps)) | |
141 | - sys.exit(1) | |
142 | - | |
143 | - logger.info("Dependencies met") | |
144 | +#def check_dependencies_or_exit(): | |
145 | +# """ | |
146 | +# Dependency resolver based on a previously specified CONST_REQUIREMENTS_FILE. | |
147 | +# Currently checks a list of dependencies from a file and exits if they are not met. | |
148 | +# """ | |
149 | +# | |
150 | +# installed_deps, missing_deps, conflict_deps = dependencies.check_dependencies(requirements_file=FARADAY_REQUIREMENTS_FILE) | |
151 | +# | |
152 | +# logger.info("Checking dependencies...") | |
153 | +# | |
154 | +# if conflict_deps: | |
155 | +# logger.info("Some dependencies are old. Update them with \"pip install -r requirements_server.txt -U\"") | |
156 | +# | |
157 | +# if missing_deps: | |
158 | +# | |
159 | +# install_deps = query_yes_no("Do you want to install them?", default="no") | |
160 | +# | |
161 | +# if install_deps: | |
162 | +# dependencies.install_packages(missing_deps) | |
163 | +# logger.info("Dependencies installed. Please launch Faraday Server again.") | |
164 | +# sys.exit(0) | |
165 | +# else: | |
166 | +# logger.error("Dependencies not met. Please refer to the documentation in order to install them. [%s]", | |
167 | +# ", ".join(missing_deps)) | |
168 | +# sys.exit(1) | |
169 | +# | |
170 | +# logger.info("Dependencies met") | |
171 | ||
172 | def setConf(): | |
173 | """ | |
174 | @@ -404,29 +404,29 @@ _/ ____\_____ ____________ __| _/__ | |
175 | logger.info("Starting Faraday IDE.") | |
176 | ||
177 | ||
178 | -def checkUpdates(): | |
179 | - import requests | |
180 | - uri = getInstanceConfiguration().getUpdatesUri() | |
181 | - resp = u"OK" | |
182 | - try: | |
183 | - f = open(FARADAY_VERSION_FILE) | |
184 | - | |
185 | - getInstanceConfiguration().setVersion(f.read().strip()) | |
186 | - getInstanceConfiguration().setAppname("Faraday - Penetration Test IDE Community") | |
187 | - parameter = {"version": getInstanceConfiguration().getVersion()} | |
188 | - | |
189 | - f.close() | |
190 | - resp = requests.get(uri, params=parameter, timeout=1, verify=True) | |
191 | - resp = resp.text.strip() | |
192 | - except Exception as e: | |
193 | - logger.error(e) | |
194 | - version = getInstanceConfiguration().getVersion() | |
195 | - if 'b' in version.split("+")[0]: | |
196 | - return | |
197 | - if not resp == u'OK': | |
198 | - logger.info("You have available updates. Run ./faraday.py --update to catchup!") | |
199 | - else: | |
200 | - logger.info("No updates available, enjoy Faraday.") | |
201 | +#def checkUpdates(): | |
202 | +# import requests | |
203 | +# uri = getInstanceConfiguration().getUpdatesUri() | |
204 | +# resp = u"OK" | |
205 | +# try: | |
206 | +# f = open(FARADAY_VERSION_FILE) | |
207 | +# | |
208 | +# getInstanceConfiguration().setVersion(f.read().strip()) | |
209 | +# getInstanceConfiguration().setAppname("Faraday - Penetration Test IDE Community") | |
210 | +# parameter = {"version": getInstanceConfiguration().getVersion()} | |
211 | +# | |
212 | +# f.close() | |
213 | +# resp = requests.get(uri, params=parameter, timeout=1, verify=True) | |
214 | +# resp = resp.text.strip() | |
215 | +# except Exception as e: | |
216 | +# logger.error(e) | |
217 | +# version = getInstanceConfiguration().getVersion() | |
218 | +# if 'b' in version.split("+")[0]: | |
219 | +# return | |
220 | +# if not resp == u'OK': | |
221 | +# logger.info("You have available updates. Run ./faraday.py --update to catchup!") | |
222 | +# else: | |
223 | +# logger.info("No updates available, enjoy Faraday.") | |
224 | ||
225 | ||
226 | def check_faraday_version(): | |
227 | @@ -544,8 +544,8 @@ def main(): | |
228 | args = getParserArgs() | |
229 | setupFolders(CONST_FARADAY_FOLDER_LIST) | |
230 | setUpLogger(args.debug) | |
231 | - if not args.nodeps: | |
232 | - check_dependencies_or_exit() | |
233 | + #if not args.nodeps: | |
234 | + # check_dependencies_or_exit() | |
235 | printBanner() | |
236 | if args.cert_path: | |
237 | os.environ[REQUESTS_CA_BUNDLE_VAR] = args.cert_path | |
238 | @@ -553,7 +553,7 @@ def main(): | |
239 | setConf() | |
240 | login(args.login) | |
241 | check_faraday_version() | |
242 | - checkUpdates() | |
243 | + #checkUpdates() | |
244 | startFaraday() | |
245 | ||
246 | ||
247 | --- a/manage.py | |
248 | +++ b/manage.py | |
249 | @@ -114,9 +114,9 @@ def sql_shell(): | |
250 | @click.command(help='Checks configuration and faraday status.') | |
251 | @click.option('--check_postgresql', default=False, is_flag=True) | |
252 | @click.option('--check_faraday', default=False, is_flag=True) | |
253 | [email protected]('--check_dependencies', default=False, is_flag=True) | |
254 | +#@click.option('--check_dependencies', default=False, is_flag=True) | |
255 | @click.option('--check_config', default=False, is_flag=True) | |
256 | -def status_check(check_postgresql, check_faraday, check_dependencies, check_config): | |
257 | +def status_check(check_postgresql, check_faraday, check_config): | |
258 | ||
259 | selected = False | |
260 | exit_code = 0 | |
261 | @@ -130,9 +130,9 @@ def status_check(check_postgresql, check | |
262 | status_check_functions.print_faraday_status() | |
263 | selected = True | |
264 | ||
265 | - if check_dependencies: | |
266 | - status_check_functions.print_depencencies_status() | |
267 | - selected = True | |
268 | +# if check_dependencies: | |
269 | +# status_check_functions.print_depencencies_status() | |
270 | +# selected = True | |
271 | ||
272 | if check_config: | |
273 | status_check_functions.print_config_status() | |
274 | --- a/server/commands/status_check.py | |
275 | +++ b/server/commands/status_check.py | |
276 | @@ -14,7 +14,7 @@ import server.config | |
277 | from colorama import init | |
278 | from server.web import app | |
279 | from server.models import db | |
280 | -from utils import dependencies | |
281 | +#from utils import dependencies | |
282 | from requests.exceptions import InvalidURL, ConnectionError | |
283 | from colorama import Fore, Back, Style | |
284 | from server.utils.daemonize import is_server_running | |
285 | @@ -116,37 +116,37 @@ def check_client(): | |
286 | return False | |
287 | ||
288 | ||
289 | -def check_server_dependencies(): | |
290 | - | |
291 | - installed_deps, missing_deps, conflict_deps = dependencies.check_dependencies( | |
292 | - requirements_file='requirements_server.txt') | |
293 | - | |
294 | - if conflict_deps: | |
295 | - return True, conflict_deps | |
296 | - | |
297 | - if missing_deps: | |
298 | - return 0, missing_deps | |
299 | - | |
300 | - if not conflict_deps and not missing_deps: | |
301 | - return None, None | |
302 | - | |
303 | - | |
304 | -def check_client_dependencies(): | |
305 | - | |
306 | - installed_deps, missing_deps, conflict_deps = dependencies.check_dependencies( | |
307 | - requirements_file='requirements.txt') | |
308 | - | |
309 | - if 'argparse' in conflict_deps: | |
310 | - conflict_deps.remove('argparse') | |
311 | - | |
312 | - if conflict_deps: | |
313 | - return True, conflict_deps | |
314 | - | |
315 | - if missing_deps: | |
316 | - return 0, missing_deps | |
317 | - | |
318 | - if not conflict_deps and not missing_deps: | |
319 | - return None, None | |
320 | +#def check_server_dependencies(): | |
321 | +# | |
322 | +# installed_deps, missing_deps, conflict_deps = dependencies.check_dependencies( | |
323 | +# requirements_file='requirements_server.txt') | |
324 | +# | |
325 | +# if conflict_deps: | |
326 | +# return True, conflict_deps | |
327 | +# | |
328 | +# if missing_deps: | |
329 | +# return 0, missing_deps | |
330 | +# | |
331 | +# if not conflict_deps and not missing_deps: | |
332 | +# return None, None | |
333 | +# | |
334 | + | |
335 | +#def check_client_dependencies(): | |
336 | +# | |
337 | +# installed_deps, missing_deps, conflict_deps = dependencies.check_dependencies( | |
338 | +# requirements_file='requirements.txt') | |
339 | +# | |
340 | +# if 'argparse' in conflict_deps: | |
341 | +# conflict_deps.remove('argparse') | |
342 | +# | |
343 | +# if conflict_deps: | |
344 | +# return True, conflict_deps | |
345 | +# | |
346 | +# if missing_deps: | |
347 | +# return 0, missing_deps | |
348 | +# | |
349 | +# if not conflict_deps and not missing_deps: | |
350 | +# return None, None | |
351 | ||
352 | ||
353 | def check_credentials(): | |
354 | @@ -248,35 +248,35 @@ def print_faraday_status(): | |
355 | .format(yellow=Fore.YELLOW, white=Fore.WHITE)) | |
356 | ||
357 | ||
358 | -def print_depencencies_status(): | |
359 | - """Prints Status of the dependencies using check_server_dependencies() and check_client_dependencies()""" | |
360 | - | |
361 | - status, server_dep = check_server_dependencies() | |
362 | - if status == True: | |
363 | - print('[{red}-{white}] Some server dependencies are old: [' + ', '.join(server_dep) + ']. Update them with \"pip install -r requirements_server.txt -U\"') \ | |
364 | - .format(red=Fore.RED, white=Fore.WHITE) | |
365 | - | |
366 | - elif status == 0: | |
367 | - print('[{red}-{white}] Client dependencies not met: [' + ', '.join(server_dep) + '] Install them with \"pip install -r requirements_server.txt -U\"')\ | |
368 | - .format(red=Fore.RED, white=Fore.WHITE) | |
369 | - | |
370 | - else: | |
371 | - print('[{green}+{white}] Server dependencies met' \ | |
372 | - .format(green=Fore.GREEN, white=Fore.WHITE)) | |
373 | - | |
374 | - status, client_dep = check_client_dependencies() | |
375 | - if status == True: | |
376 | - print('[{red}-{white}] Some client dependencies are old: [' + ', '.join(client_dep) + ']. Update them with \"pip install -r requirements.txt -U\"') \ | |
377 | - .format(red=Fore.RED, white=Fore.WHITE) | |
378 | - | |
379 | - elif status == 0: | |
380 | - print('[{red}-{white}] Client dependencies not met: [' + ', '.join(client_dep) + ']. Install them with \"pip install -r requirements.txt -U\"')\ | |
381 | - .format(red=Fore.RED, white=Fore.WHITE) | |
382 | - | |
383 | - else: | |
384 | - print('[{green}+{white}] Client dependencies met'\ | |
385 | - .format(green=Fore.GREEN, white=Fore.WHITE)) | |
386 | +#def print_depencencies_status(): | |
387 | +# """Prints Status of the dependencies using check_server_dependencies() and check_client_dependencies()""" | |
388 | ||
389 | +# status, server_dep = check_server_dependencies() | |
390 | +# if status == True: | |
391 | +# print('[{red}-{white}] Some server dependencies are old: [' + ', '.join(server_dep) + ']. Update them with \"pip install -r requirements_server.txt -U\"') \ | |
392 | +# .format(red=Fore.RED, white=Fore.WHITE) | |
393 | +# | |
394 | +# elif status == 0: | |
395 | +# print('[{red}-{white}] Client dependencies not met: [' + ', '.join(server_dep) + '] Install them with \"pip install -r requirements_server.txt -U\"')\ | |
396 | +# .format(red=Fore.RED, white=Fore.WHITE) | |
397 | + | |
398 | +# else: | |
399 | +# print('[{green}+{white}] Server dependencies met' \ | |
400 | +# .format(green=Fore.GREEN, white=Fore.WHITE)) | |
401 | +# | |
402 | +# status, client_dep = check_client_dependencies() | |
403 | +# if status == True: | |
404 | +# print('[{red}-{white}] Some client dependencies are old: [' + ', '.join(client_dep) + ']. Update them with \"pip install -r requirements.txt -U\"') \ | |
405 | +# .format(red=Fore.RED, white=Fore.WHITE) | |
406 | + | |
407 | +# elif status == 0: | |
408 | +# print('[{red}-{white}] Client dependencies not met: [' + ', '.join(client_dep) + ']. Install them with \"pip install -r requirements.txt -U\"')\ | |
409 | +# .format(red=Fore.RED, white=Fore.WHITE) | |
410 | + | |
411 | +# else: | |
412 | +# print('[{green}+{white}] Client dependencies met'\ | |
413 | +# .format(green=Fore.GREEN, white=Fore.WHITE)) | |
414 | +# | |
415 | ||
416 | def print_config_status(): | |
417 | """Prints Status of the configuration using check_credentials(), check_storage_permission() and check_open_ports()""" | |
418 | @@ -316,8 +316,8 @@ def full_status_check(): | |
419 | print('\n{white}Checking if Faraday is running...'.format(white=Fore.WHITE)) | |
420 | print_faraday_status() | |
421 | ||
422 | - print('\n{white}Checking Faraday dependencies...'.format(white=Fore.WHITE)) | |
423 | - print_depencencies_status() | |
424 | +# print('\n{white}Checking Faraday dependencies...'.format(white=Fore.WHITE)) | |
425 | +# print_depencencies_status() | |
426 | ||
427 | print('\n{white}Checking Faraday config...{white}'.format(white=Fore.WHITE)) | |
428 | print_config_status() |
0 | Description: Remove useless dependencies | |
1 | Remove useless dependencies: the console scripts check if all | |
2 | requirements are available. They aren't because some of dependencies | |
3 | are not required and/or not availbalbe in Kali. | |
4 | Author: Sophie Brun <[email protected]> | |
5 | Last-Update: 2019-06-12 | |
6 | --- | |
7 | This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ | |
8 | --- a/faraday/manage.py | |
9 | +++ b/faraday/manage.py | |
10 | @@ -102,23 +102,23 @@ def import_from_couchdb(): | |
11 | def database_schema(): | |
12 | DatabaseSchema().run() | |
13 | ||
14 | [email protected](help="Open a SQL Shell connected to postgresql 'Faraday DB'") | |
15 | -def sql_shell(): | |
16 | - try: | |
17 | - from pgcli.main import PGCli | |
18 | - except ImportError: | |
19 | - print('PGCli was not found, please install it with: pip install pgcli') | |
20 | - sys.exit(1) | |
21 | - conn_string = faraday.server.config.database.connection_string.strip("'") | |
22 | - conn_string = urlparse(conn_string) | |
23 | - parsed_conn_string = ("user={username} password={password} host={hostname} dbname={dbname}" | |
24 | - .format(username=conn_string.username, | |
25 | - password=conn_string.password, | |
26 | - hostname=conn_string.hostname, | |
27 | - dbname=conn_string.path[1:])) | |
28 | - pgcli = PGCli() | |
29 | - pgcli.connect_uri(parsed_conn_string) | |
30 | - pgcli.run_cli() | |
31 | +#@click.command(help="Open a SQL Shell connected to postgresql 'Faraday DB'") | |
32 | +#def sql_shell(): | |
33 | +# try: | |
34 | +# from pgcli.main import PGCli | |
35 | +# except ImportError: | |
36 | +# print('PGCli was not found, please install it with: pip install pgcli') | |
37 | +# sys.exit(1) | |
38 | +# conn_string = faraday.server.config.database.connection_string.strip("'") | |
39 | +# conn_string = urlparse(conn_string) | |
40 | +# parsed_conn_string = ("user={username} password={password} host={hostname} dbname={dbname}" | |
41 | +# .format(username=conn_string.username, | |
42 | +# password=conn_string.password, | |
43 | +# hostname=conn_string.hostname, | |
44 | +# dbname=conn_string.path[1:])) | |
45 | +# pgcli = PGCli() | |
46 | +# pgcli.connect_uri(parsed_conn_string) | |
47 | +# pgcli.run_cli() | |
48 | ||
49 | ||
50 | @click.command(help='Checks configuration and faraday status.') | |
51 | @@ -257,7 +257,7 @@ cli.add_command(initdb) | |
52 | cli.add_command(import_from_couchdb) | |
53 | cli.add_command(database_schema) | |
54 | cli.add_command(create_superuser) | |
55 | -cli.add_command(sql_shell) | |
56 | +#cli.add_command(sql_shell) | |
57 | cli.add_command(status_check) | |
58 | cli.add_command(create_tables) | |
59 | cli.add_command(change_password) | |
60 | --- a/requirements.txt | |
61 | +++ b/requirements.txt | |
62 | @@ -5,11 +5,9 @@ deprecation>=1.0.1 | |
63 | flask>=1.0 | |
64 | IPy>=0.83 | |
65 | mockito>=1.0.12 | |
66 | -pgcli>=1.8.2 | |
67 | requests>=2.18.4 | |
68 | tornado==4.5.1 | |
69 | tqdm>=4.15.0 | |
70 | -whoosh>=2.7.4 | |
71 | cairocffi==0.9.0 | |
72 | pycairo==1.18.1 | |
73 | PyGObject==3.32.1 | |
74 | --- a/requirements_server.txt | |
75 | +++ b/requirements_server.txt | |
76 | @@ -12,7 +12,6 @@ future>=0.17.1 | |
77 | IPy>=0.83 | |
78 | marshmallow<3.0.0 | |
79 | Pillow>=4.2.1 | |
80 | -pgcli | |
81 | psycopg2==2.7.7 | |
82 | pyasn1-modules>=0.0.11 | |
83 | pyopenssl>=17.2.0 |
0 | remove-unwanted-checks.diff | |
1 | copy-images-directory.patch | |
2 | fix-syntax-error.patch | |
3 | fix-path-to-VERSION.patch | |
0 | dont-check-update.patch | |
1 | dont-use-pip.patch | |
2 | remove-unwanted-requirements.patch | |
3 | keep-using-filteralchemy-name.patch |
0 | apis usr/share/python-faraday/ | |
1 | bin usr/share/python-faraday/ | |
2 | config usr/share/python-faraday/ | |
3 | data usr/share/python-faraday/ | |
4 | gui usr/share/python-faraday/ | |
5 | helpers usr/share/python-faraday/ | |
6 | managers usr/share/python-faraday/ | |
7 | migrations usr/share/python-faraday/ | |
8 | model usr/share/python-faraday/ | |
9 | persistence usr/share/python-faraday/ | |
10 | plugins usr/share/python-faraday/ | |
11 | scripts usr/share/python-faraday/ | |
12 | server usr/share/python-faraday/ | |
13 | utils/ usr/share/python-faraday/ | |
14 | zsh/ usr/share/python-faraday/ | |
15 | alembic.ini usr/share/python-faraday/ | |
16 | credentials.json usr/share/python-faraday/ | |
17 | *.py usr/share/python-faraday/ | |
18 | faraday-terminal.zsh usr/share/python-faraday/ | |
19 | debian/helper-script/* usr/bin/ | |
20 | VERSION usr/share/python-faraday/ | |
21 | debian/migrate-database usr/share/python-faraday/debian-scripts | |
0 | debian/helper-script/* usr/bin | |
1 | debian/migrate-database usr/lib/python2.7/dist-packages/faraday/debian-scripts |
0 | usr/share/sphinx_rtd_theme/static/fonts usr/share/doc/python-faraday/html/_static/fonts | |
1 | usr/share/glewlwyd/webapp/fonts usr/share/python-faraday/server/www/fonts/font-awesome | |
2 | usr/share/glewlwyd/webapp/fonts/glyphicons-halflings-regular.eot usr/share/python-faraday/server/www/fonts/glyphicons-halflings-regular.eot | |
3 | usr/share/glewlwyd/webapp/fonts/glyphicons-halflings-regular.ttf usr/share/python-faraday/server/www/fonts/glyphicons-halflings-regular.ttf | |
4 | usr/share/glewlwyd/webapp/fonts/glyphicons-halflings-regular.woff usr/share/python-faraday/server/www/fonts/glyphicons-halflings-regular.woff | |
5 | usr/share/glewlwyd/webapp/fonts/glyphicons-halflings-regular.woff2 usr/share/python-faraday/server/www/fonts/glyphicons-halflings-regular.woff2 | |
0 | usr/bin/faraday usr/bin/python-faraday | |
1 | usr/share/fonts-glyphicons/glyphicons-halflings-regular.eot usr/lib/python2.7/dist-packages/faraday/server/www/fonts/glyphicons-halflings-regular.eot | |
2 | usr/share/fonts-glyphicons/glyphicons-halflings-regular.ttf usr/lib/python2.7/dist-packages/faraday/server/www/fonts/glyphicons-halflings-regular.ttf | |
3 | usr/share/fonts-glyphicons/glyphicons-halflings-regular.woff usr/lib/python2.7/dist-packages/faraday/server/www/fonts/glyphicons-halflings-regular.woff | |
4 | usr/share/fonts-glyphicons/glyphicons-halflings-regular.woff2 usr/lib/python2.7/dist-packages/faraday/server/www/fonts/glyphicons-halflings-regular.woff2 | |
5 | usr/share/fonts/truetype/glyphicons/glyphicons-halflings-regular.svg usr/lib/python2.7/dist-packages/faraday/server/www/fonts/font-awesome/fontawesome-webfont.svg |
0 | # false-positive | |
1 | python-faraday: extra-license-file usr/share/python-faraday/server/www/scripts/licenses/providers/license.js | |
0 | # False-positive | |
1 | python-faraday: extra-license-file usr/lib/python2.7/dist-packages/faraday/server/www/scripts/licenses/providers/license.js | |
2 | 2 | # don't use Debian package: versions are too different |
3 | python-faraday: embedded-javascript-library usr/share/doc/python-faraday/html/_static/jquery-1.11.1.js please use libjs-jquery | |
4 | python-faraday: embedded-javascript-library usr/share/doc/python-faraday/html/_static/jquery-3.1.0.js please use libjs-jquery | |
5 | python-faraday: embedded-javascript-library usr/share/doc/python-faraday/html/_static/jquery.js please use libjs-jquery | |
6 | python-faraday: embedded-javascript-library usr/share/doc/python-faraday/html/_static/underscore.js please use libjs-underscore | |
7 | python-faraday: embedded-javascript-library usr/share/python-faraday/server/www/normalize.css please use libjs-normalize | |
8 | python-faraday: embedded-javascript-library usr/share/python-faraday/server/www/script/jquery-1.11.2.js please use libjs-jquery | |
9 | python-faraday: embedded-javascript-library usr/share/python-faraday/server/www/script/jquery-1.9.1.js please use libjs-jquery | |
10 | python-faraday: embedded-javascript-library usr/share/python-faraday/server/www/script/jquery.js please use libjs-jquery | |
11 | python-faraday: embedded-javascript-library usr/share/python-faraday/server/www/script/jquery.tablesorter.min.js please use libjs-jquery-tablesorter | |
3 | python-faraday: embedded-javascript-library usr/lib/python2.7/dist-packages/faraday/server/www/normalize.css please use libjs-normalize | |
4 | python-faraday: embedded-javascript-library usr/lib/python2.7/dist-packages/faraday/server/www/script/jquery-1.11.2.js please use libjs-jquery | |
5 | python-faraday: embedded-javascript-library usr/lib/python2.7/dist-packages/faraday/server/www/script/jquery-1.9.1.js please use libjs-jquery | |
6 | python-faraday: embedded-javascript-library usr/lib/python2.7/dist-packages/faraday/server/www/script/jquery.js please use libjs-jquery | |
7 | python-faraday: embedded-javascript-library usr/lib/python2.7/dist-packages/faraday/server/www/script/jquery.tablesorter.min.js please use libjs-jquery-tablesorter | |
12 | 8 | # fonts are not packaged, just install them in python-faraday |
13 | python-faraday: font-in-non-font-package usr/share/python-faraday/server/www/fonts/flexslider* | |
14 | python-faraday: font-outside-font-dir usr/share/python-faraday/server/www/fonts/flexslider* | |
15 | python-faraday: font-in-non-font-package usr/share/python-faraday/server/www/fonts/opensans/* | |
16 | python-faraday: font-outside-font-dir usr/share/python-faraday/server/www/fonts/opensans/* | |
17 | python-faraday: font-in-non-font-package usr/share/python-faraday/server/www/fonts/ubuntu/* | |
18 | python-faraday: font-outside-font-dir usr/share/python-faraday/server/www/fonts/ubuntu/* | |
19 | python-faraday: font-in-non-font-package usr/share/python-faraday/server/www/script/ui-grid.woff | |
20 | python-faraday: font-outside-font-dir usr/share/python-faraday/server/www/script/ui-grid.woff | |
9 | python-faraday: font-in-non-font-package usr/lib/python2.7/dist-packages/faraday/server/www/fonts/flexslider* | |
10 | python-faraday: font-outside-font-dir usr/lib/python2.7/dist-packages/faraday/server/www/fonts/flexslider* | |
11 | python-faraday: font-in-non-font-package usr/lib/python2.7/dist-packages/faraday/server/www/fonts/opensans* | |
12 | python-faraday: font-outside-font-dir usr/lib/python2.7/dist-packages/faraday/server/www/fonts/opensans* | |
13 | python-faraday: font-in-non-font-package usr/lib/python2.7/dist-packages/faraday/server/www/fonts/ubuntu* | |
14 | python-faraday: font-outside-font-dir usr/lib/python2.7/dist-packages/faraday/server/www/fonts/ubuntu* | |
15 | python-faraday: font-in-non-font-package usr/lib/python2.7/dist-packages/faraday/server/www/script/ui-grid.woff | |
16 | python-faraday: font-outside-font-dir usr/lib/python2.7/dist-packages/faraday/server/www/script/ui-grid.woff |
0 | debian/manpages/* |
9 | 9 | rm -f /usr/share/python-faraday/external_libs |
10 | 10 | fi |
11 | 11 | if [ "$1" = "configure" ] && [ -n "$2" ]; then |
12 | ./usr/share/python-faraday/debian-scripts/migrate-database | |
12 | ./usr/lib/python2.7/dist-packages/faraday/debian-scripts/migrate-database | |
13 | 13 | fi |
14 | 14 | |
15 | 15 | #DEBHELPER# |
1 | 1 | Description=python-faraday Server |
2 | 2 | Requires=postgresql.service |
3 | 3 | After=postgresql.service |
4 | Documentation="file:/usr/share/doc/python-faraday/README.Debian" | |
4 | 5 | |
5 | 6 | [Service] |
6 | 7 | Type=simple |
7 | ExecStartPre=/bin/sh -c 'if ! su postgres -c "psql -lqt" | cut -d \| -f 1 | grep -qw faraday; then cd /usr/share/python-faraday && python manage.py initdb; fi' | |
8 | ExecStart=/usr/share/python-faraday/faraday-server.py | |
8 | ExecStartPre=/bin/sh -c 'if ! su postgres -c "psql -lqt" | cut -d \| -f 1 | grep -qw faraday; then faraday-manage initdb; fi' | |
9 | ExecStart=faraday-server | |
9 | 10 | |
10 | 11 | [Install] |
11 | 12 | WantedBy=multi-user.target |
2 | 2 | #export DH_VERBOSE = 1 |
3 | 3 | |
4 | 4 | %: |
5 | dh $@ --with python2 | |
5 | dh $@ --with python2,sphinxdoc --buildsystem=pybuild | |
6 | ||
7 | override_dh_auto_build: | |
8 | dh_auto_build | |
9 | PYTHONPATH=. http_proxy='127.0.0.1:9' sphinx-build -N -bhtml doc build/html | |
10 | ||
11 | override_dh_auto_install: | |
12 | dh_auto_install | |
13 | # remove unwanted files: .gitignore and useless README | |
14 | rm debian/python-faraday/usr/lib/python2.7/dist-packages/faraday/migrations/versions/.gitignore | |
15 | rm debian/python-faraday/usr/lib/python2.7/dist-packages/faraday/server/www/scripts/config/.gitignore | |
16 | rm debian/python-faraday/usr/lib/python2.7/dist-packages/faraday/migrations/README | |
17 | ||
18 | override_dh_link: | |
19 | # remove the existing dirs to create symlinks instead | |
20 | rm -r debian/python-faraday/usr/lib/python2.7/dist-packages/faraday/server/www/fonts/font-awesome | |
21 | dh_link | |
22 | ||
23 | override_dh_fixperms: | |
24 | dh_fixperms | |
25 | chmod 644 debian/python-faraday/usr/lib/python2.7/dist-packages/faraday/server/www/images/* | |
26 | chmod 644 debian/python-faraday/usr/lib/python2.7/dist-packages/faraday/server/www/script/angular-chart.css.map | |
27 | chmod 644 debian/python-faraday/usr/lib/python2.7/dist-packages/faraday/server/www/scripts/statusReport/providers/logical.pegjs | |
28 | chmod 644 debian/python-faraday/usr/lib/python2.7/dist-packages/faraday/server/www/fonts/flexslider* | |
29 | ||
30 | ||
31 | override_dh_auto_test: | |
32 | # don't run tests for the moment: missing pytest-factoryboy | |
33 | # python -m pytest test_cases | |
6 | 34 | |
7 | 35 | override_dh_installchangelogs: |
8 | 36 | dh_installchangelogs RELEASE.md |
9 | 37 | |
10 | override_dh_install: | |
11 | dh_install -XREADME -XCHANGES -Xgitignore | |
12 | # remove the docs, we install them with dh_installdocs | |
13 | rm -r debian/python-faraday/usr/share/python-faraday/persistence/server/docs | |
14 | #remove the existing dirs to create symlinks instead | |
15 | rm -r debian/python-faraday/usr/share/python-faraday/server/www/fonts/font-awesome | |
16 | ||
17 | override_dh_installdocs: | |
18 | dh_installdocs -Xdoctrees | |
19 | #remove the existing dirs to create symlinks instead | |
20 | rm -r debian/python-faraday/usr/share/doc/python-faraday/html/_static/fonts | |
21 | ||
22 | override_dh_fixperms: | |
23 | dh_fixperms | |
24 | chmod 644 debian/python-faraday/usr/share/python-faraday/server/www/fonts/flexslider-icon.* | |
25 | chmod 644 debian/python-faraday/usr/share/python-faraday/server/www/script/angular-chart.css.map | |
26 | chmod 644 debian/python-faraday/usr/share/python-faraday/server/www/images/* | |
27 | chmod 644 debian/python-faraday/usr/share/python-faraday/helpers/plugins/canvas/faraday_report/dialog.glade2 | |
28 | chmod 644 debian/python-faraday/usr/share/python-faraday/scripts/searcher/__init__.py | |
29 | chmod 644 debian/python-faraday/usr/share/python-faraday/managers/reports_managers.py | |
30 | chmod 644 debian/python-faraday/usr/share/python-faraday/plugins/repo/zap/java/* | |
31 | for i in $$(find debian/python-faraday/usr/share/python-faraday/plugins/repo -name '*__init__.py'); do \ | |
32 | echo $$i; \ | |
33 | chmod 644 $$i; \ | |
34 | done | |
35 | ||
36 | dh_installdirs | |
37 | ||
38 | # don't run the tests: modules are missing | |
39 | #override_dh_auto_test: | |
40 | # python -m pytest test_cases | |
41 |