You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Added packaging constructs to allow installation using pip or pipx (Tib3rius#48)
* Restructured program to enable packaging. Moved main into its own function and resolved global dependency issues. Configured pyproject.toml
* Restructured configuration management such that configuration files are stored in the default user configuration directory for the OS they're using, utilising appdirs
* Added exclusion for byte compiled python files
* Removed build files from version control
* Restructured config file initialisation into a function so that it can be called by the entrypoint main() function
* Resolved issues updating global variables from within function scope. Added global identifiers to global variables to make them more readily identifiable as such
* Formatting revision
* Updated documentation to reflect package installation instructions and usage
* Grammatical revision to improve instructional clarity
* Added default sudo for udp scans to prompt for password to elevate privileges
* Added an installation command for all required packages to the README
* Added manual installation instructions, clarification of oscp vm limitations installing pip3, and instructions on how to elevate privileges when installed with pipx
* Formatting revision to improve clarity of instructions and added requirements.txt
* Removed hardcoded sudo commands from default scan configurations
* Changed suggestion to add alias to .bashrc to .profile as this is what's used by default in kali to set initial temrinal conditions
* Fixed error in manual installation that would have resulted in installing python2 packages
Copy file name to clipboardexpand all lines: README.md
+91-11
Original file line number
Diff line number
Diff line change
@@ -26,24 +26,66 @@ AutoRecon was inspired by three tools which the author used during the OSCP labs
26
26
27
27
## Requirements
28
28
29
-
* Python 3
30
-
* colorama
31
-
* toml
29
+
- Python 3
30
+
-`python3-pip`
31
+
-`pipx` (optional, but recommended)
32
32
33
-
Once Python 3 is installed, pip3 can be used to install the other requirements:
33
+
### Python 3
34
+
35
+
If you don't have these installed, and are running Kali Linux, you can execute the following:
34
36
35
37
```bash
36
-
$ pip3 install -r requirements.txt
38
+
$ sudo apt install python3
39
+
$ sudo apt install python3-pip
37
40
```
38
41
39
-
Several people have indicated that installing pip3 via apt on the OSCP Kali version makes the host unstable. In these cases, pip3 can be installed by running the following commands:
42
+
Additionally, if you experience any issues with the stability of the `python3-pip` installation (as reported by a number of people installing `pip3` via `apt` on the OSCP distribution of Kali), you can install it manually as follows:
Further, it's recommended you use `pipx` to manage your python packages; this installs each python package in it's own virtualenv, and makes it available in the global context, which avoids conflicting package dependencies and the resulting instability. To summarise the installation instructions:
54
+
55
+
```bash
56
+
$ python3 -m pip install --user pipx
57
+
$ python3 -m pipx ensurepath
58
+
```
59
+
60
+
Note that if you want to elevate privileges to run a program installed with `pipx`, with `sudo`, you have two options:
61
+
62
+
1. Append the appropriate path to your execution command, using _one_ of the following examples (recommended):
63
+
64
+
```bash
65
+
$ sudo env "PATH=$PATH" autorecon [OPTIONS]
66
+
$ sudo $(which autorecon) [OPTIONS]
67
+
```
68
+
69
+
To make this easier, you could add the following alias to your `~/.profile` (or equivalent):
70
+
71
+
```
72
+
alias sudo="sudo env \"PATH=$PATH\""
73
+
```
74
+
75
+
2. Add the `pipx` binary path to the `secure_path` set in `/etc/sudoers`
If you're not using Kali Linux, make sure to adjust the path to the relevant user. Further detail on the installation of `pipx` is available in their installation instructions available [here](https://pipxproject.github.io/pipx/installation/). Please refer to this for any issues you experience.
87
+
88
+
### Supporting packages
47
89
48
90
Several commands used in AutoRecon reference the SecLists project, in the directory /usr/share/seclists/. You can either manually download the SecLists project to this directory (https://github.com/danielmiessler/SecLists), or if you are using Kali Linux (**highly recommended**) you can run the following:
49
91
@@ -75,12 +117,50 @@ whatweb
75
117
wkhtmltoimage
76
118
```
77
119
120
+
On Kali Linux, you can ensure these are all installed using the following command:
If you'd prefer not to use `pip` or `pipx`, you can always still install and execute `autorecon.py` manually as a script. First install the dependencies:
145
+
146
+
```bash
147
+
$ python3 -m pip install -r requirements.txt
148
+
```
149
+
150
+
You will then be able to run the `autorecon.py` script (from `<AUTORECON_ROOT_DIR>/src/autorecon`):
151
+
152
+
```bash
153
+
$ python3 autorecon.py [OPTIONS] 127.0.0.1
154
+
```
155
+
156
+
See detailed usage options below.
157
+
78
158
## Usage
79
159
80
160
AutoRecon uses Python 3 specific functionality and does not support Python 2.
0 commit comments