This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git config --global alias.ahead "log --stat @{u}.." | |
git config --global alias.behind "log --stat ..@{u}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
""" | |
This script is based on https://cgi.tutorial.codepoint.net/file-upload but with changes as needed. | |
To use: | |
- Download the web page to be debugged. | |
- Edit it to replace `action="/cgi-bin/cgi-post"` with `action="/cgi-bin/cgi-post.py"` (on Windows on Linux you can simply rename this file to not have .py at the end. | |
- place in a cgi-bin subdirectory of the one where you saved the web page | |
- start a simple web server with ` python -m http.server 8001 --bind localhost --cgi` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo OFF | |
REM This file queries the registry to see if python files are going to be provided with parameters | |
REM when called by invoking as <filename>.py | |
reg query HKEY_CLASSES_ROOT\.py_auto_file\shell\open\command | |
reg query HKEY_CLASSES_ROOT\Applications\py.exe\shell\open\command | |
reg query HKEY_CLASSES_ROOT\Python.File\shell\open\command | |
echo ALL the above values should end with "%%1" %%* if they don't then you will need to use regedit to fix |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from scapy.all import DHCP_am | |
from scapy.base_classes import Net | |
dhcp_server = DHCP_am(iface='eth1', domain='example.com', | |
pool=Net('192.168.10.0/24'), | |
network='192.168.10.0/24', | |
gw='192.168.10.254', | |
renewal_time=600, lease_time=3600) | |
dhcp_server() |