Skip to content

Instantly share code, notes, and snippets.

View simple-https-server.py
#!/usr/bin/env python3
# taken from http://www.piware.de/2011/01/creating-an-https-server-in-python/
# generate server.pem with the following command:
# openssl req -new -x509 -keyout key.pem -out server.pem -days 365 -nodes
# run as follows:
# python simple-https-server.py
# then in your browser, visit:
# https://localhost:8443
import http.server
@apfelchips
apfelchips / serv.py
Last active December 15, 2022 16:11 — forked from phrawzty/2serv.py
simple python http server to dump request headers
View serv.py
#!/usr/bin/env python3
"""
inspiration:
https://gist.github.com/phrawzty/62540f146ee5e74ea1ab?permalink_comment_id=2358615
https://gist.github.com/nitaku/10d0662536f37a087e1b#file-server-py
example:
curl -s -H "X-Something: yeah" localhost:8080
curl --data "{\"this\":\"is a test\"}" localhost:8080
@apfelchips
apfelchips / add-ssh-keys.yml
Created March 29, 2022 21:04 — forked from EntropyWorks/add-ssh-keys.yml
Add all the hosts from your ansible inventory to your .ssh/known_hosts and also use ssh-copy-id to add keys to the hosts
View add-ssh-keys.yml
---
# Original idea found at http://stackoverflow.com/a/39083724
#
# ansible -i inventory.ini add-ssh-keys.yml
#
- name: Store known hosts of 'all' the hosts in the inventory file
hosts: localhost
connection: local
vars:
ssh_known_hosts_command: "ssh-keyscan -T 10"
@apfelchips
apfelchips / ghidra_processor_docs_downloader.py
Last active February 15, 2023 09:29 — forked from ckuethe/ghidra_processor_docs_downloader.py
Ghidra Processor Documentation Downloader
View ghidra_processor_docs_downloader.py
#!/usr/bin/env python3
# vim: tabstop=4:softtabstop=4:shiftwidth=4:expandtab:
import os
import sys
import requests
docs = {
'68000': {
'M68000PRM.pdf': 'https://www.nxp.com/files-static/archives/doc/ref_manual/M68000PRM.pdf',