-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Steven Hollingsworth
committed
Sep 7, 2021
1 parent
9f2b438
commit 40cf72e
Showing
525 changed files
with
42,341 additions
and
130 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,129 +1,7 @@ | ||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
*.py[cod] | ||
*$py.class | ||
|
||
# C extensions | ||
*.so | ||
|
||
# Distribution / packaging | ||
.Python | ||
build/ | ||
develop-eggs/ | ||
*.pyc | ||
tmp/ | ||
*.gif | ||
*.mp4 | ||
*.webm | ||
dist/ | ||
downloads/ | ||
eggs/ | ||
.eggs/ | ||
lib/ | ||
lib64/ | ||
parts/ | ||
sdist/ | ||
var/ | ||
wheels/ | ||
pip-wheel-metadata/ | ||
share/python-wheels/ | ||
*.egg-info/ | ||
.installed.cfg | ||
*.egg | ||
MANIFEST | ||
|
||
# PyInstaller | ||
# Usually these files are written by a python script from a template | ||
# before PyInstaller builds the exe, so as to inject date/other infos into it. | ||
*.manifest | ||
*.spec | ||
|
||
# Installer logs | ||
pip-log.txt | ||
pip-delete-this-directory.txt | ||
|
||
# Unit test / coverage reports | ||
htmlcov/ | ||
.tox/ | ||
.nox/ | ||
.coverage | ||
.coverage.* | ||
.cache | ||
nosetests.xml | ||
coverage.xml | ||
*.cover | ||
*.py,cover | ||
.hypothesis/ | ||
.pytest_cache/ | ||
|
||
# Translations | ||
*.mo | ||
*.pot | ||
|
||
# Django stuff: | ||
*.log | ||
local_settings.py | ||
db.sqlite3 | ||
db.sqlite3-journal | ||
|
||
# Flask stuff: | ||
instance/ | ||
.webassets-cache | ||
|
||
# Scrapy stuff: | ||
.scrapy | ||
|
||
# Sphinx documentation | ||
docs/_build/ | ||
|
||
# PyBuilder | ||
target/ | ||
|
||
# Jupyter Notebook | ||
.ipynb_checkpoints | ||
|
||
# IPython | ||
profile_default/ | ||
ipython_config.py | ||
|
||
# pyenv | ||
.python-version | ||
|
||
# pipenv | ||
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. | ||
# However, in case of collaboration, if having platform-specific dependencies or dependencies | ||
# having no cross-platform support, pipenv may install dependencies that don't work, or not | ||
# install all needed dependencies. | ||
#Pipfile.lock | ||
|
||
# PEP 582; used by e.g. github.com/David-OConnor/pyflow | ||
__pypackages__/ | ||
|
||
# Celery stuff | ||
celerybeat-schedule | ||
celerybeat.pid | ||
|
||
# SageMath parsed files | ||
*.sage.py | ||
|
||
# Environments | ||
.env | ||
.venv | ||
env/ | ||
venv/ | ||
ENV/ | ||
env.bak/ | ||
venv.bak/ | ||
|
||
# Spyder project settings | ||
.spyderproject | ||
.spyproject | ||
|
||
# Rope project settings | ||
.ropeproject | ||
|
||
# mkdocs documentation | ||
/site | ||
|
||
# mypy | ||
.mypy_cache/ | ||
.dmypy.json | ||
dmypy.json | ||
|
||
# Pyre type checker | ||
.pyre/ | ||
src/v0tools.egg-info |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
include src/v0tools/data/* | ||
include VERSION | ||
include README.md | ||
global-exclude *.pyc |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
.DEFAULT_GOAL := pkg | ||
|
||
docs := ./docs | ||
srcdir := ./src | ||
pkgname := v0tools | ||
|
||
documentation: clean | ||
@echo "Running docs" | ||
mkdir -p $(docs)/static/api | ||
./scripts/gendoc.py | ||
# ./scripts/genenvconfig.py | ||
# ./scripts/genbadges.py | ||
# ./scripts/genpypyreadme.py | ||
pydoctor \ | ||
-v \ | ||
-W \ | ||
--html-output=$(docs)/static/api \ | ||
--buildtime="1996-06-17 15:00:00" \ | ||
$(srcdir)/$(pkgname) | ||
./scripts/checkundocced.py | ||
|
||
docker_tests: | ||
./scripts/dockertest.sh ./docker/deb36.Dockerfile | ||
./scripts/dockertest.sh ./docker/deb37.Dockerfile | ||
./scripts/dockertest.sh ./docker/deb38.Dockerfile | ||
./scripts/dockertest.sh ./docker/deb39.Dockerfile | ||
./scripts/dockertest.sh ./docker/deb310.Dockerfile | ||
./scripts/dockertest.sh ./docker/centos7.Dockerfile | ||
./scripts/dockertest.sh ./docker/arch.Dockerfile | ||
|
||
install_local: | ||
pip3 install . | ||
|
||
pkg: documentation clean | ||
@echo "Running PKG" | ||
python3 setup.py sdist | ||
twine check dist/* | ||
|
||
upload: | ||
@echo "Running upload" | ||
twine upload --repository v0tools dist/* | ||
|
||
bump_version: | ||
# order is important here | ||
./scripts/version_bump.py | ||
./scripts/genchangelog.py | ||
git add ./CHANGELOG.md | ||
git add ./VERSION | ||
git diff HEAD | ||
git commit -S --amend | ||
bash -c "git tag v$$(cat VERSION)" | ||
|
||
push: | ||
$(eval tag = $(shell cat VERSION)) | ||
git push -u origin HEAD | ||
git push -u origin v$(tag) | ||
|
||
release: pkg upload push | ||
@echo "Running Release" | ||
|
||
test_create: | ||
./scripts/unittest_create.py | ||
|
||
test: test_create | ||
./scripts/runtests.sh | ||
|
||
clean: | ||
rm -rfv dist/* src/*.egg-info $(docs)/static/api | ||
find -type f -name '*.pyc' -delete -print | ||
find -type d -name __pycache__ -delete -print | ||
|
||
server: | ||
bash -c "cd $(docs); hugo server" | ||
|
||
hugo_deploy: documentation | ||
rm -rfv $(docs)/public | ||
mkdir -p $(docs)/public | ||
bash -c "cd $(docs); hugo; hugo deploy" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,60 @@ | ||
# v0tools | ||
Hacking CTF toolchain and cli scripts | ||
**This package is for those participating in hacking CTFs and want some tools to help with some of the more tedious tasks.** | ||
|
||
**Enjoy!** | ||
|
||
**Pull requests welcome. :)** | ||
|
||
## Installation / Quickstart | ||
|
||
> **To install this package from [pypy](https://pypi.org/project/v0tools/) run the following command.** | ||
```bash | ||
pip3 install v0tools | ||
``` | ||
|
||
|
||
Full documentation can be found at [https://v0tools.stev0.me](https://v0tools.stev0.me) | ||
|
||
### Commands | ||
|
||
* *[cmd-not-found.py](https://v0tools.stev0.me/commands/cmd-not-found/)* | ||
* Print how to install packages on different operating systems | ||
|
||
* *[cmdrec.py](https://v0tools.stev0.me/commands/cmdrec/)* | ||
* Terminal Recorder using ffmpeg and KDE Console. | ||
|
||
* *[dnsrebind.py](https://v0tools.stev0.me/commands/dnsrebind/)* | ||
* dns rebinding fqdn. | ||
|
||
* *[ip_urls.py](https://v0tools.stev0.me/commands/ip_urls/)* | ||
* Generate a list of obfuscated ip variations and print to stdout. | ||
|
||
* *[linrshell.py](https://v0tools.stev0.me/commands/linrshell/)* | ||
* Linux Reverse Shell stager. | ||
|
||
* *[php_search_vuln.py](https://v0tools.stev0.me/commands/php_search_vuln/)* | ||
* Search for vulnerable calls / strings in php code. | ||
|
||
* *[unicodes.py](https://v0tools.stev0.me/commands/unicodes/)* | ||
* print unicode values and associated information to stdout. | ||
|
||
* *[v0_bash_complete_msfvenom.py](https://v0tools.stev0.me/commands/v0_bash_complete_msfvenom/)* | ||
* Sourceable Autocomplete for msfvenom flags. | ||
|
||
* *[v0serv.py](https://v0tools.stev0.me/commands/v0serv/)* | ||
* HTTP Serve a directory, or serve a single isolated file. | ||
|
||
* *[v0upload.py](https://v0tools.stev0.me/commands/v0upload/)* | ||
* HTTP server that accepts PUT requests from remotes. | ||
|
||
* *[winrshell.py](https://v0tools.stev0.me/commands/winrshell/)* | ||
* Windows Reverse Shell stager. | ||
|
||
|
||
### License | ||
See: [LICENSE](./LICENSE) | ||
|
||
|
||
## Api | ||
|
||
> **API Documentation can be found [here](https://v0tools.stev0.me/api)** |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
0.0.1 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
#!/usr/bin/env python3 | ||
# -*- coding: utf-8 -*- | ||
""" | ||
Print how to install packages on different operating systems | ||
Thanks to https://command-not-found.com/ and | ||
Ƚukasz Lach https://twitter.com/lach_dev for hosting the site | ||
""" | ||
from bs4 import BeautifulSoup | ||
import requests | ||
import json | ||
from v0tools.cli import Cli | ||
|
||
cli = Cli() | ||
parser = cli.parser | ||
parser.add_argument( | ||
"command", | ||
help="command help", | ||
type=str, | ||
) | ||
|
||
|
||
def main(args): | ||
"""Run main function.""" | ||
# txt = pathlib.Path("./test.html").read_text() | ||
txt = requests.get(f"https://command-not-found.com/{args.command}") | ||
val = BeautifulSoup(txt.content, "lxml") | ||
vals = {} | ||
for i in val.findAll("div"): | ||
if "command-install" not in i.attrs["class"]: | ||
continue | ||
os = i.attrs.get("data-os") | ||
if not os: | ||
continue | ||
code = i.find("code").getText() | ||
vals[os] = code | ||
print(json.dumps(vals, indent=4, separators=(",", " : "))) | ||
|
||
|
||
if __name__ == "__main__": | ||
args = cli.get_parse() | ||
# args = cli.get_parse("booga") | ||
cli.set_entrypoint(main) | ||
cli.run(args) |
Oops, something went wrong.