Skip to content

Instantly share code, notes, and snippets.

@bluec0re
bluec0re / socks.py
Last active January 20, 2023 22:06
A public domain python socks implementation. Mostly compatible with socksipy
# This is free and unencumbered software released into the public domain.
#
# Anyone is free to copy, modify, publish, use, compile, sell, or
# distribute this software, either in source code form or as a compiled
# binary, for any purpose, commercial or non-commercial, and by any
# means.
#
# In jurisdictions that recognize copyright laws, the author or authors
# of this software dedicate any and all copyright interest in the
# software to the public domain. We make this dedication for the benefit
#!/usr/bin/env python3
# encoding: utf-8
# Licensed under GPLv3
# http://www.gnu.org/licenses/gpl-3.0.txt
# requires
# - wmctrl
# - vlc
# - irssi
# - terminal emulator with '-e' switch
# - bwm-ng (optional for bandwith display)
from __future__ import absolute_import, print_function, unicode_literals
import jinja2
from lxml import etree, html
from lxml.html import clean
import logging
import sys
import zipfile
from preprocess import preprocess
import json
@bluec0re
bluec0re / blur.py
Created July 20, 2015 16:30
Pixelates areas inside videos with opencv
#!/usr/bin/env python2
# encoding: utf-8
import cv2
import cv
import sys
video = cv2.VideoCapture("input.webm")
fps = video.get(cv.CV_CAP_PROP_FPS) / 2
#!/bin/bash
# enables reverse tether on android phones
# requires networkmanager
# tested & developed with CM12 (Android 5.1.1)
ADB=adb
# get by nmcli list
NM_CONN="048202e0-a62c-431b-8fc1-cf8fd552343e"
# the rndis device on your phone (adb shell ip link)
IF=usb0
/*
nfc_creditcard_reader by Jose Miguel Esparza (jesparza AT eternal-todo.com)
http://eternal-todo.com
Based on the PoC readnfccc by Renaud Lifchitz ([email protected])
Fixed to work with libnfc 1.7.4 by bluec0re
License: distributed under GPL version 3 (http://www.gnu.org/licenses/gpl.html)
@bluec0re
bluec0re / http_tunnel.py
Last active January 10, 2022 00:29
Tunnels every python code through HTTP proxies by patching socket.socket. Just import the module.
# -*- coding: utf-8 -*-
import socket
import os
# backup original function
_socket = socket.socket
class SocketProxyWrapper:
def __init__(self, socket, proxy):
@bluec0re
bluec0re / cert_clone.py
Created November 16, 2016 14:01
Python2 script to clone ssl certificates (chains). Requires M2Crypto.
#!/usr/bin/env python2
# encoding: utf-8
from M2Crypto import X509, EVP, RSA, m2
import sys
import argparse
def clone_to_req(crt, *args):
req = X509.Request()
req.set_version(crt.get_version())
@bluec0re
bluec0re / piccrypt.py
Created December 8, 2016 08:52
Little script to demonstrate different cipher modes applied on images
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# author: Timo Schmid
# copyright: 2016
"""
Script to demonstrate different cipher modes
with based on an image
"""
from __future__ import print_function
import sys
@bluec0re
bluec0re / highlight-and-copy.sh
Created July 10, 2018 12:20
Uses pygmentize and xclip to create pasteable (e.g. into Google docs, Word, Libreoffice, ...) code highlighting from the command line
#!/bin/bash
style='paraiso-dark'
lang=''
preview=''
options=''
while getopts 's:l:po:' opt;
do
case $opt in