r/madeinpython • u/freakydenims • 1h ago
Built an open-source Agent Skill (pqc-migration) to cut through the post-quantum panic and help devs actually migrate
r/madeinpython • u/Cool_doggy • May 05 '20
In the comments below, you can ask to become a moderator.
Upvote those who you think should be moderators.
Remember to give reasons on why you should be moderator!
r/madeinpython • u/freakydenims • 1h ago
r/madeinpython • u/MrWaterWhipper • 5h ago
My old DNS Sniffer that I created in 2012 originally, but updated for 2026 standards. For use on internal networks only! Anyways, I switched a few things like old ANY query to TXT with EDNS0 query now. My question is, do you guys/girls have any recommendations or suggestions to make this script any better or if I'm missing anything? Just looking for some feedback and or suggestions to improve. Thanks, -DD
###################################################################################### DNS-Anal-Sniffer v1.7# Code-by-DirtyD## Quickly Anal Sniff IP ranges for open recursive DNS resolvers and UDP aplification potential.# Sends custom crafted TXT queries + EDNS0(8192 byte buffer) + DNSSEC(DO bit) with RRL detection.######################################################################################
import socket, sys, struct, ipaddress, csv, itertools, time, threading, os, secretsfrom concurrent.futures import ThreadPoolExecutor, as_completed
TEST_DOMAINS = ["cisco.com","hubspot.com","weather.com","oracle.com","salesforce.com","amazon.com","microsoft.com","ibm.com",]domain_cycle = itertools.cycle(TEST_DOMAINS)
stats = {"scanned": 0, "found": 0, "ignored": 0, "bytes_sent": 0,"bytes_recv": 0, "active_threads": 0, "start_time": 0.0,"total": 0, "peak_rate": 0.0, "current_ip": "Initializing...","recent_finds": [], "last_found": "-"}
stats_lock = threading.Lock()stop_reporter = threading.Event()HEADER_OVERHEAD = 28
def encode_dns_name(domain):if isinstance(domain, str):domain = domain.encode('utf-8')encoded = b''.join(bytes([len(lbl)]) + lbl for lbl in domain.split(b'.') if lbl)return encoded + b'\x00'
def craft_edns0_query(domain_str):tid = secrets.token_bytes(2)header = tid + b'\x01\x00\x00\x01\x00\x00\x00\x00\x00\x01'question = encode_dns_name(domain_str) + b'\x00\x10\x00\x01'opt_rr = b'\x00\x00\x29\x20\x00\x00\x00\x80\x00\x00\x00' # 8192 + DO bitreturn header + question + opt_rr
def parse_dns_response(data):if len(data) < 12:return Falseflags = struct.unpack('!H', data[2:4])[0]rcode = flags & 0x000Fra = (flags & 0x0080) != 0qr = (flags & 0x8000) != 0qdcount = struct.unpack('!H', data[4:6])[0]if not qr or not ra or rcode != 0:return Falseptr = 12try:for _ in range(qdcount):while True:label_len = data[ptr]if label_len == 0:ptr += 1breakptr += 1 + label_lenptr += 4except IndexError:return Falsereturn True
def send_single_probe(sock, target_ip, req_pkt, req_size):with stats_lock:stats["bytes_sent"] += req_size + HEADER_OVERHEADt0 = time.time()sock.sendto(req_pkt, (target_ip, 53))data, _ = sock.recvfrom(65535)lat_ms = (time.time() - t0) * 1000res_size = len(data)with stats_lock:stats["bytes_recv"] += res_size + HEADER_OVERHEADreturn data, res_size, lat_ms
def scan_resolver(target_ip, timeout=1.5):ip_str = str(target_ip)domain = next(domain_cycle)req_pkt = craft_edns0_query(domain)req_size = len(req_pkt)
with stats_lock:stats["active_threads"] += 1stats["current_ip"] = ip_str
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)sock.settimeout(timeout)
try:data, res_size, lat1 = send_single_probe(sock, ip_str, req_pkt, req_size)if not parse_dns_response(data):return None
replies, lats, max_res = 1, [lat1], res_size
for _ in range(2):time.sleep(0.15)try:s_data, s_size, s_lat = send_single_probe(sock, ip_str, req_pkt, req_size)if parse_dns_response(s_data):replies += 1lats.append(s_lat)if s_size > max_res:max_res = s_sizeexcept (socket.timeout, ConnectionRefusedError):pass
if replies < 3:with stats_lock:stats["ignored"] += 1return None
factor = round(max_res / req_size)
return {"ip": ip_str,"factor": factor,"latency_ms": round(sum(lats) / len(lats), 1),"res_size": max_res}except Exception:return Nonefinally:sock.close()with stats_lock:stats["scanned"] += 1stats["active_threads"] -= 1
def render_dashboard(cidr, csv_file, threads, rate, min_amp, final=False):with stats_lock:sc = stats["scanned"]fd = stats["found"]ign = stats["ignored"]act = stats["active_threads"]snt = stats["bytes_sent"]tot = stats["total"]st = stats["start_time"]pk = stats["peak_rate"]cur = "COMPLETE" if final else stats["current_ip"]rec = list(stats["recent_finds"])last = stats["last_found"]
el = max(time.time() - st, 0.001)rate_cur = round(sc / el)if rate_cur > pk:with stats_lock:stats["peak_rate"] = rate_curpk = rate_cur
eta = (tot - sc) / rate_cur if (rate_cur > 0 and not final) else 0r_str = "Unlimited" if rate <= 0 else f"{rate} hosts/sec"
lines = ["-------------------------------------------------------"," DNS-Anal-Sniffer v1.7 Code-by-DirtyD ","-------------------------------------------------------",f" Target Range: {cidr}",f" Output CSV: {csv_file}",f" Current Host: {cur}",f" Progress: {sc} / {tot} ({(sc/tot*100 if tot else 0):.1f}%)",f" Scan Rate: {rate_cur} hosts/sec",f" Rate Limit: {r_str}",f" Min Amp Factor: {min_amp}x",f" Active Threads: {act} / {threads}",f" Net Uplink: {((snt/el)*8)/1024:.1f} KB/s",f" Vulnerable Found: {fd}",f" RRL / Ignored: {ign}",f" Elapsed / ETA: {int(el)}s / {int(eta//60):02d}:{int(eta%60):02d}","-------------------------------------------------------"," Recent Vulnerable Resolvers:",]
for i in range(5):lines.append(f" {rec[i]}" if i < len(rec) else " -")lines.append("-------------------------------------------------------")
print("\033[H\033[J" + "\n".join(lines), flush=True)
def reporter(cidr, csv_file, threads, rate, min_amp):while not stop_reporter.is_set():render_dashboard(cidr, csv_file, threads, rate, min_amp, False)time.sleep(0.20) # slightly faster refresh
def main():if len(sys.argv) < 3:print("[?] Usage: python Anal_Sniff.py <CIDR> <Output_CSV> [threads] [rate_limit] [min_amp]")print("[+] Example: python Anal_Sniff.py 1.2.64.0/18 results.csv 40 20 10")sys.exit(1)
cidr = sys.argv[1]csv_file = sys.argv[2]threads = int(sys.argv[3]) if len(sys.argv) > 3 else 40rate = float(sys.argv[4]) if len(sys.argv) > 4 else 0min_amp = int(sys.argv[5]) if len(sys.argv) > 5 else 10
try:net = ipaddress.ip_network(cidr, strict=False)except ValueError:print(f"[!] Error: {cidr} is not a valid CIDR.")sys.exit(1)
if os.name == 'nt':os.system('')
hosts = list(net.hosts())stats["total"] = len(hosts)stats["start_time"] = time.time()
t = threading.Thread(target=reporter, args=(cidr, csv_file, threads, rate, min_amp), daemon=True)t.start()
exists = os.path.isfile(csv_file) and os.path.getsize(csv_file) > 0with open(csv_file, 'a', newline='', encoding='utf-8') as f:writer = csv.DictWriter(f, fieldnames=['Host', 'Amp_Factor', 'Latency_ms'])if not exists:writer.writeheader()
with ThreadPoolExecutor(max_workers=threads) as ex:futures = []last_sub = time.time()interval = 1.0 / rate if rate > 0 else 0
for ip in hosts:if rate > 0:slp = interval - (time.time() - last_sub)if slp > 0:time.sleep(slp)last_sub = time.time()futures.append(ex.submit(scan_resolver, ip))
for fut in as_completed(futures):res = fut.result()if res:if res["factor"] >= min_amp:ent = f"{res['ip']:<16} | Amp: {res['factor']}x ({res['res_size']}B)"with stats_lock:stats["found"] += 1stats["recent_finds"] = ([ent] + stats["recent_finds"])[:5]stats["last_found"] = entwriter.writerow({'Host': res['ip'],'Amp_Factor': res['factor'],'Latency_ms': res['latency_ms']})f.flush()else:with stats_lock:stats["ignored"] += 1
stop_reporter.set()time.sleep(0.4)render_dashboard(cidr, csv_file, threads, rate, min_amp, True)print(f"\n[+] Anal Sniffing finished. {stats['found']} resolvers ={min_amp}x saved to {csv_file}\n")
if __name__ == "__main__":main()
r/madeinpython • u/Sweaty-Indication859 • 8h ago
r/madeinpython • u/scapaflow96 • 10h ago
Things are finally taking shape.
r/madeinpython • u/tebama • 2d ago
r/madeinpython • u/VGB2010LK • 3d ago
r/madeinpython • u/Austinwhitely • 3d ago
r/madeinpython • u/laperen34 • 3d ago
Hey everyone, during CTF's, I got a little tired of switching back and forth to the browser everytime I needed to encode, decode, XOR etc. something. So I built TChef, a really lightweight CLI tool that handles basic encoding, decoding, hashing, and XOR operations in terminal.
You can download it by pip:
pip install tchef-cli
Github repo: https://github.com/kotiaeion2512/TChef
Any feedback, bug reports, ideas etc. would be really welcome!
r/madeinpython • u/DataBaeBee • 3d ago
r/madeinpython • u/bangarangguy • 3d ago
r/madeinpython • u/KennyPorto • 4d ago
You're scrolling on your phone, headset on, and a call comes in. With Handset you click Answer on your PC and talk through your headset, and the phone stays free in your hand.
What it does: it makes a Linux PC act like a car's Bluetooth hands-free kit. Pair the phone once, and calls show up on the desktop: answer from the notification, dial, mute, keypad tones, call waiting and hold. If the phone shares them, it also shows contacts, favourites and recent calls. No app on the phone, so Android and iPhone both work.
How it's built (the Python part):
a(oa{sv}) reply), so the D-Bus side moved to jeepney, a pure-Python D-Bus library.About 750 lines of Python and 1,000 of QML. MIT licensed, built with Claude Code.
https://github.com/KennyPorto/handset
(The phone numbers in the screenshots are all made up.)
r/madeinpython • u/mthnzbk • 4d ago
Doku2D is an open-source engine for making 2D games in Python. It uses SFML through PySFML for graphics, windowing, input, and audio, and Pymunk for physics. OpenAI Codex wrote the engine code. I decided which features to build and how they should work, then playtested the sample games and guided development based on what I found.
Doku2D loads Tiled maps and supports animated tiles, collisions, and NPC pathfinding and route following. The UI supports themes and localization. You can write branching conversations in .dialogue files, with typewriter text, character portraits, player choices, and the ability to save and resume a conversation.
The doku2d build command uses Nuitka to compile your game into a standalone desktop application for Windows or Linux. You can also build a test APK or a signed Android App Bundle. The repository includes English and Turkish documentation, step-by-step tutorials, and sample games.
If you’re making 2D games in Python, I’d like to hear where you get stuck, whether it’s during setup, while reading the docs, or when using the API.
r/madeinpython • u/UsedAd4766 • 4d ago
r/madeinpython • u/Handsome_sweettouu • 5d ago
Interesting python problem
r/madeinpython • u/Back2basics314 • 6d ago
Conceptual.fyi is up and made in Python
TLDR:
Search -> Bookmark a goal -> Sign in -> Answer questions on what you do know -> Learn toward your goal -> Build on that learning for a lifetime when you need it.
Seems easy enough... right? :)
I built a way to learn and keep up to date on research. I'm searching for concept-based learning on the internet. I'm ranking concepts by memorability, effort and brevity.
Sign in and I'll save your progress on any goal you choose. Once you've bookmarked a goal, I'll ask you ~5 questions to see what the next step is you should learn on your way to your goal. If you want to know why you're learning something, I'll explain it in the right column.
The over-egregious estimates assume you know nothing about anything. So take those with a grain of salt. Let me know if you have other ideas on how to present estimates better.
Technologies used:

r/madeinpython • u/kvcux_ • 7d ago
r/madeinpython • u/Druzina_M • 7d ago
Released the first beta version of ChillinPC- a program that checks your computer's temps and usage meters and marks if they hit near 100%. it's extremely lightwieght and usefull (at least for me). I also madde a short promotional video: https://www.youtube.com/watch?v=kPHKgyFfBoM
r/madeinpython • u/kvcux_ • 7d ago
r/madeinpython • u/Professional_Gas7715 • 7d ago
Hi everyone! As a non-coder music producer, I built eurodisco-mixer in pure Python (NumPy, SciPy, Gradio) to generate 6 synchronized 80s Eurodisco / Modern Talking WAV stems + full mix in ~0.1 seconds, complete with Guidance Scale DSP, Master EQ, and instant Ableton Live clipboard export.
Open-source (MIT License) on GitHub: https://github.com/mojsony13a-png/eurodisco-mixer
Looking for Python/DSP developers or synth fans to contribute ideas, MIDI export, or new 80s synth patches!
r/madeinpython • u/VGB2010LK • 7d ago
Hi everyone!
I've been working on my first Python/PyPI project: Llama-UI, a Rich-powered terminal frontend for "llama.cpp", designed with Termux on Android in mind.
I wanted a simple terminal interface to manage llama.cpp, models and chats without having to manually manage everything through commands.
Features:
- Rich-powered terminal interface
- Import or download GGUF models
- Start, stop and inspect llama-server
- Chat history (save, load and delete)
- Per-model system prompts and generation parameters
- Edit and regenerate messages
- Server logs and controls
Installation:
pip install llama-ui-termux
Run it with:
llama-ui
GitHub: https://github.com/user01234-sl/Llama-UI-Python
PyPI: https://pypi.org/project/llama-ui-termux/
This is my first published PyPI project. I'd appreciate feedback, bug reports or suggestions for improvement!
Thanks for reading.