Skip to content

Instantly share code, notes, and snippets.

@p3t3r67x0
p3t3r67x0 / extract_links.py
Created January 26, 2017 21:31
Extract links from a given html document with you must call as first argument
@p3t3r67x0
p3t3r67x0 / get_server_cert.py
Last active June 2, 2021 08:08
Simple script to extract the server cert of a given domain
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import ssl
import OpenSSL
cert = ssl.get_server_certificate(('google.de', 443))
x509 = OpenSSL.crypto.load_certificate(OpenSSL.crypto.FILETYPE_PEM, cert)
print 'Expired: {}'.format(x509.has_expired())
@p3t3r67x0
p3t3r67x0 / zip_codes.csv
Last active December 28, 2016 20:07
A sorted list of german zip codes
We can't make this file beautiful and searchable because it's too large.
"zip","city","state","citizen"
"01067","Dresden","Sachsen","11957"
"01069","Dresden","Sachsen","25484"
"01097","Dresden","Sachsen","14924"
"01099","Dresden","Sachsen","27974"
"01108","Dresden","Sachsen","5876"
"01109","Dresden","Sachsen","20010"
"01127","Dresden","Sachsen","14991"
"01129","Dresden","Sachsen","18915"
"01139","Dresden","Sachsen","17555"
@p3t3r67x0
p3t3r67x0 / iptables_ubuntu.md
Last active September 3, 2017 23:40
Iptables for Ubuntu Desktop 16.04 with default DROP policy

Iptables for Ubuntu Desktop 16.04

With these rules you are able to protect yourself a tiny bit

  • You are able to do open website in your browser or terminal
  • You are able to reviece and send mails with e. g. Thunderbird
  • You are able to ping any device you want from you machine
  • You are able to connect yourself to a remote secure shell
  • You are able to retrieve a dhcp lease from your router

Exploits

EGREGIOUSBLUNDER

A remote code execution exploit for Fortigate firewalls that exploits a HTTP cookie overflow vulnerability. It affects models 60, 60M, 80C, 200A, 300A, 400A, 500A, 620B, 800, 5000, 1000A, 3600, and 3600A. The model of the firewall is detected by examining the ETag in the HTTP headers of the firewall. This is not CVE-2006-6493 as detected by Avast.

ELIGIBLEBACHELOR

@p3t3r67x0
p3t3r67x0 / bash_commands.md
Last active June 17, 2018 06:26
Some useful vim and bash commands that I only use occasionally

vim

Remove ^M

:%s/\r//g

Remove unwanted whitespaces

@p3t3r67x0
p3t3r67x0 / openssl_commands.md
Last active March 18, 2025 15:34
Some list of openssl commands for check and verify your keys

openssl

Install

Install the OpenSSL on Debian based systems

sudo apt-get install openssl
@p3t3r67x0
p3t3r67x0 / hosteurope_virtual_server_hostname.md
Last active February 29, 2016 11:38
Hosteurope virtual server hostname setting script

Script

#!/bin/bash
### BEGIN INIT INFO
# Provides: hostname.sh
# Required-Start:
# Required-Stop:
# Default-Start: 2 3 4 5
# Default-Stop: 0 6