> For the complete documentation index, see [llms.txt](https://wiki.zacheller.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://wiki.zacheller.dev/pentest/courses/beginner-network-pentesting/week-3-python-102.md).

# Week 3: Python 102

**Introductory Python** - Similar to Linux, we will spend some time learning basic Python scripting, which will be essential to our future endeavors as penetration testers.

## Notes

Python scripting in python102.py, a simple portscanner in scanner.py.

installed text size plugin for gedit

```
apt-get install -y gedit-plugin-text-size
```

HOST FILES\
python -m SimpleHTTPServer 80\
\---OR---\
python3 -m http.server 80\
\
HOST AN FTP SERVER\
\#pip3 install pyftpdlib\
python3 -m pyftpdlib -p 21 -w #-w allows anonymous users\
\
Navigate to <ftp://10.0.2.15> or wherever your ipconfig says

print router's IP address:

```
ip route show | grep -i 'default via'| awk '{print $3 }'
```
