Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
_codeql_detected_source_root
__pycache__/
*.pyc
*.pyo
.pytest_cache/
*.egg-info/
dist/
build/
74 changes: 74 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# misc

A collection of miscellaneous scripts, tools, and experiments by [Dario Clavijo](https://github.com/daedalus).

Topics covered include cryptography, Bitcoin/blockchain tooling, security research, networking utilities, system administration, mathematics, and general utilities.

## Directory Layout

```
misc/
├── crypto/ Cryptographic algorithms, primitives, and tests
│ (AES, RSA, ECDSA, DH, TOTP, PRNG, hashes, encoding)
├── bitcoin/ Bitcoin and blockchain tools
│ (address utilities, node scanners, miners, FactorDB)
├── security/ Security research and offensive tooling
│ (CVE PoCs, network reconnaissance, forensics, credential tools)
├── networking/ Networking utilities
│ (DNS, FTP, Docker Swarm, iptables, Tor, JSON-RPC)
├── sysadmin/ System administration scripts
│ (backups, storage, VM management, Android, package setup)
├── math/ Mathematics and computer science experiments
│ (LFSR, IEEE-754, ALU, number theory, combinatorics)
├── utils/ General-purpose utilities and tests
│ (compression, data encoding, file tools, ML helpers)
└── examples/ Example images used in demonstrations
```

## Usage

Most scripts are standalone and can be run directly:

```bash
# Python scripts
python crypto/simple_sha256.py
python math/ackermann.py

# Shell scripts
bash sysadmin/fastcommit.sh
bash security/certfinder.sh example.com
```

Some scripts require third-party dependencies. Install them with:

```bash
pip install -r requirements.txt
```

See each script's header comment for specific usage instructions and any additional dependencies.

## Requirements

- Python 3.6+
- Various third-party packages (see `requirements.txt`)
- Some shell scripts require Linux-specific tools (e.g., `cryptsetup`, `virsh`, `nmap`)

---

## DISCLAIMER

> **Security & Offensive Tooling — Authorized and Educational Use Only**
>
> Several scripts in this repository (particularly under `security/`, `crypto/`, and `bitcoin/`) implement or demonstrate offensive security techniques, cryptographic attacks, vulnerability proofs-of-concept, credential extraction methods, and network reconnaissance tools.
>
> **These scripts are provided strictly for:**
> - Authorized penetration testing on systems you own or have explicit written permission to test
> - Academic research and educational purposes
> - Controlled lab environments
>
> **You must NOT use these tools to:**
> - Access systems, networks, or data without explicit authorization
> - Conduct any activity that violates applicable local, national, or international law
> - Harm individuals, organizations, or infrastructure
>
> The author(s) accept no liability for misuse. By using any script in this repository, you agree that you are solely responsible for ensuring your use complies with all applicable laws and regulations.
Empty file added bitcoin/__init__.py
Empty file.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Empty file added crypto/__init__.py
Empty file.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Empty file added math/__init__.py
Empty file.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Empty file added networking/__init__.py
Empty file.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
24 changes: 24 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
[tool.black]
line-length = 88
target-version = ["py38", "py39", "py310", "py311"]

[tool.ruff]
line-length = 88
target-version = "py38"

[tool.ruff.lint]
select = ["E", "F", "W", "I"]
ignore = [
"E501", # line too long (handled by formatter)
"E402", # module level import not at top of file
"F401", # imported but unused (many scripts are standalone)
"F841", # local variable assigned but never used
]

[tool.ruff.lint.per-file-ignores]
"**/*.py" = ["E302", "E303"]

[tool.flake8]
max-line-length = 88
max-complexity = 10
extend-ignore = "E501,E402"
57 changes: 57 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# Third-party dependencies used across scripts in this repository.
# Install with: pip install -r requirements.txt
# Note: some packages (e.g. lzo, bitshuffle) may require system libraries.

# Cryptography
pycryptodome # Crypto.Cipher, Crypto.Random (crack_AES256.py, pw-aes-memcache.py, testAES256.py)
cryptography # cryptography.fernet, PBKDF2HMAC (convert_luks_argon2id.py)
M2Crypto # android_fde_decryptkey.py
gmpy2 # classic_shor.py, rsa_*.py, test_timing.py
pyotp # TOTP_test.py, TOTP_test2.py
pbkdf2 # pmkid_test_calc.py
sha3 # hashtime.py (pysha3 / Python 3.6+ has it in hashlib)
qrcode # TOTP_test2.py

# Bitcoin / blockchain
# bip_utils # testxchain.py (optional)

# Security / networking
paramiko # brocade_version.py, cisco_paramiko_ssh.py
shodan # shodanMinerSearch.py, shodan_jsonfile_decoder_ssl_to_pem.py
python-nmap # check_nmap.py
passbolt-python-api # passbolt_api_hibp_test.py
pwnedpasswords # passbolt_api_hibp_test.py
graphviz # SANMAP.py
humanfriendly # SIMM_Pin_Recovery.py
pyping # msfhelper.py

# System / data
docker # docker-get-swarm-nodes-ips.py
libkeepass # testkdbx.py
hexdump # mmapread.py

# Data processing / ML
numpy # bitshuffle.py, shuffledata.py, testshuffle.py, test_revealercc.py
Pillow # test_revealercc.py
matplotlib # test_revealercc.py
scikit-learn # test_sklearn_vectorizers.py
pandas # test_sklearn_vectorizers.py

# Compression
lz4 # compression_test1.py, testshuffle.py, test_compress_diff.py
brotli # compression_test1.py
# lzo # compression_test1.py, testshuffle.py (requires liblzo2-dev)
# bitshuffle # testshuffle.py (requires numpy C extension)

# Utilities
oeispy # binet_oeis_crawl.py
sympy # heaps.py
simplejson # CVE-2017-7679.py
bencode # test_bencode.py
pgpdump # testpgpdump.py
tqdm # passbolt_api_hibp_test.py
holidays # licencia.py
workdays # licencia.py
beautifulsoup4 # dinacia-scraper.py
google-cloud-bigquery # bigquery_batch_execute.py
smartcard # (pyscard) convert_luks_argon2id.py
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Empty file added security/__init__.py
Empty file.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ EF=/tmp/encryption_footer
OFFSET=$(strings -t d $DEV | grep -e aes-cbc-essiv:sha256 | awk '{ print $1 }')
dd bs=1 skip=$(($OFFSET-36)) count=16384 if=$DEV of=$EF

curl https://raw.githubusercontent.com/daedalus/misc/master/android_fde_decryptkey.py > android_fde_decryptkey.py
curl https://raw.githubusercontent.com/daedalus/misc/master/security/android_fde_decryptkey.py > android_fde_decryptkey.py

python android_fde_decryptkey.py $EF $DEV $PW | xxd -r -ps > $KEYFILE

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Empty file added sysadmin/__init__.py
Empty file.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Empty file added utils/__init__.py
Empty file.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.