- Python Penetration Testing Cookbook
- Rejah Rehim
- 264字
- 2021-07-02 23:08:39
Installing Python
- If you are using a Debian-based distribution such as Ubuntu you can install Python with:
$ sudo apt-get install python
If your system runs CentOS/RHEL, use the following command to install Python:
$ sudo yum install python
If it's a SuSE Linux distribution, use the following command to install Python:
$ sudo yum install python
- Check the version of installed Python interpreter with the following command in the Terminal:
$ python -version
This will print the current installed Python version.
- If you want to install a specific version of Python, we get the Python source code from the https://www.python.org/ website and install it manually. For this, you can download the required source archive from https://www.python.org/ftp/python/.
You can download with the following command; make sure to replace the version number with your required one:
$ wget https://www.python.org/ftp/python/3.6.2/Python-3.6.2.tgz
- Then we have to extract the downloaded archive with the following command:
$ tar -xvzf Python-3.6.2.tgz
It will be extracted to a Python-3.6.2 folder.
- Now you can configure, build, and install Python, for this you need to have a C compiler installed on your system. If it's not installed you can do it as follows:
-
- For Debian/Ubuntu:
$ sudo apt-get install gcc
-
- For CentOs/ RHEL:
$ yum install gcc
Then, you can run configure for configuring the build and then install the build with the make altinstall command:
$ cd Python-3.6.2 $ ./configure --prefix=/usr/local $ make altinstall
After installation, you can see both versions of Python installed on the system and you can choose which version to use while running the scripts.
推薦閱讀
- 黑客大曝光:無線網(wǎng)絡(luò)安全(原書第3版)
- CSO進(jìn)階之路:從安全工程師到首席安全官
- Rootkit和Bootkit:現(xiàn)代惡意軟件逆向分析和下一代威脅
- 白帽子講Web安全(紀(jì)念版)
- 開發(fā)者的Web安全戒律:真實(shí)威脅與防御實(shí)踐
- 軟件開發(fā)安全之道:概念、設(shè)計(jì)與實(shí)施
- 網(wǎng)絡(luò)安全三十六計(jì):人人該懂的防黑客技巧
- Building a Home Security System with BeagleBone
- Instant Java Password and Authentication Security
- 人工智能安全(精裝版)
- SQL Injection Strategies
- 博弈論與數(shù)據(jù)安全
- 捍衛(wèi)隱私
- 黑客攻防與電腦安全從新手到高手(超值版)
- Hands-On Bug Hunting for Penetration Testers