A tiny utility to find CTF-style flags like DH{...} in strings
Project description
flagfinder
A tiny Python package for finding CTF-style flags in strings.
Install
pip install flagfinder
Usage
from flagfinder import findflag, findflags, findflag_labeled
text = "hello DH{test123} and DH{abc}"
print(findflag("DH", text))
# DH{test123}
print(findflags("DH", text))
# ['DH{test123}', 'DH{abc}']
print(findflag_labeled("flag", "DH", text))
# flag: DH{test123}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
flagfinder-0.1.0.tar.gz
(2.8 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file flagfinder-0.1.0.tar.gz.
File metadata
- Download URL: flagfinder-0.1.0.tar.gz
- Upload date:
- Size: 2.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cb91b6ba4d816aabf22efb9382c0bd978519220b4c59310a5b2458127e000aad
|
|
| MD5 |
5918f07f97e2db0815e557fea0a18110
|
|
| BLAKE2b-256 |
27543e1eaec0ddc666211d2a41cff0568eba469c343c50bfce25d2122cc7e084
|
File details
Details for the file flagfinder-0.1.0-py3-none-any.whl.
File metadata
- Download URL: flagfinder-0.1.0-py3-none-any.whl
- Upload date:
- Size: 3.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
143d2310c5dd7555a26699d6ce6b2c7711aa7ae5eacabd08563fe8377ecf9a62
|
|
| MD5 |
0a5f5b5084179d8b755eba7b8444d655
|
|
| BLAKE2b-256 |
90ff63f92f20559f5f502295cfdcd1d011e64d3d53ae03dc05e75fff302f7ebe
|