Skip to content

Instantly share code, notes, and snippets.

View CanadianJeff's full-sized avatar

Jeffery Wilkins CanadianJeff

  • Vancouver BC CANADA
View GitHub Profile
@echo off
SET GAMEINFO=..\gameinfo.txt
ECHO "GameInfo"> %GAMEINFO%
ECHO {>> %GAMEINFO%
ECHO game "Left 4 Dead 2" // Window title>> %GAMEINFO%
ECHO type multiplayer_only>> %GAMEINFO%
ECHO nomodels 1 >> %GAMEINFO%
ECHO nohimodel 1 >> %GAMEINFO%
ECHO l4dcrosshair 1 >> %GAMEINFO%
@CanadianJeff
CanadianJeff / www_cgi-bin_ipset
Created July 31, 2019 23:46
OpenWRT WIP Extras
#!/bin/sh
echo 'Content-type: text/html'
echo ''
saveIFS=$IFS
IFS='&'
eval "$QUERY_STRING"
IFS=$saveIFS
ACTION=${action}
IP=${ip}
RULESET=${ruleset}
@CanadianJeff
CanadianJeff / firewall.user
Last active March 7, 2022 03:42
NEW FIREWALL
#!/bin/sh
# This file is interpreted as shell script.
# Put your custom iptables rules here, they will
# be executed with each firewall (re-)start.
# Internal uci firewall chains are flushed and recreated on reload, so
# put custom rules into the root chains e.g. INPUT or FORWARD or into the
# special user chains, e.g. input_wan_rule or postrouting_lan_rule.
. /lib/functions/network.sh
@CanadianJeff
CanadianJeff / scan_profile.usp
Created May 4, 2019 13:22
Zenmap Scan Profile
[All TCP ports scan]
command = nmap -sS -p 1-65535 -Pn
description = Scan all ports on a host.
[Common TCP connect scan]
command = nmap -sT -p 17,19,21,22,23,25,26,37,53,80,88,110,113,123,135,137,138,139,143,443,444,445,548,554,843,993,995,1027,1030,1064,1080,1194,1221,1433,2082,2083,2084,2086,2087,2095,2096,3074,3306,3333,3389,3784,4899,5631,5800,5900,6665-6669,6697,8000,8080,8088,10000,17500,32764 -n -Pn -r
description = Scan Common Used Ports
[Common TCP syn scan]
command = nmap -sS -p 17,19,21,22,23,25,26,37,53,80,88,110,113,123,135,137,138,139,143,443,444,445,548,554,843,993,995,1027,1030,1064,1080,1194,1221,1433,2082,2083,2084,2086,2087,2095,2096,3074,3306,3333,3389,3784,4899,5631,5800,5900,6665-6669,6697,8000,8080,8088,10000,17500,32764 -n -Pn -r
@CanadianJeff
CanadianJeff / firewall.user
Last active December 5, 2020 02:00
OpenWRT /etc/firewall.user
#!/bin/sh
# This file is interpreted as shell script.
# Put your custom iptables rules here, they will
# be executed with each firewall (re-)start.
# Internal uci firewall chains are flushed and recreated on reload, so
# put custom rules into the root chains e.g. INPUT or FORWARD or into the
# special user chains, e.g. input_wan_rule or postrouting_lan_rule.
exec >/dev/ttyS0
@CanadianJeff
CanadianJeff / openwrt-apu2-extras.sh
Last active July 27, 2019 19:35
Extra Packages For LEDE/OpenWRT
opkg install \
amd64-microcode \
block-mount \
coreutils-stty \
flashrom \
irqbalance \
libmount \
luci-app-samba \
luci-app-upnp \
kmod-ath9k \
@CanadianJeff
CanadianJeff / srcds_server.sh
Last active March 7, 2021 23:54
Starting a SRCDS Server From Shell
#!/usr/bin/env bash
export NCURSES_NO_UTF8_ACS=1
## Variables
conport=27016
wsid=1552032032
maxplayers=25
steampath="/opt/steam"
TERMINAL="/dev/tty"
HEIGHT=20
2016-08-18 20:27:32.607000 New connection: 52.202.215.126:38674 (ec2-52-202-215-126.compute-1.amazonaws.com)
2016-08-18 20:27:32.611000 IP: 52.202.215.126 CITY: Ashburn
2016-08-18 20:27:32.615000 IP: 52.202.215.126 REGION: Virginia
2016-08-18 20:27:32.616000 IP: 52.202.215.126 COUNTRY: US
2016-08-18 20:27:32.618000 IP: 52.202.215.126 ORG: AS14618 Amazon.com, Inc.
2016-08-18 20:27:35.721000 IP: 52.202.215.126 PORT: 80 (open)
2016-08-18 20:27:39.723000 IP: 52.202.215.126 SCAN FINISHED IN 0:00:07.103000 SECONDS
import random
import string
import threading
import time
import sys
import socket
import JustIRC
def get_random_nick():
random_part = "".join([random.choice("abcdef0123456789_") for i in range(10)])
#define SERVER_LIST_SIZE (sizeof(honeyPot) / sizeof(unsigned char *))
#define PR_SET_NAME 15
#define PAD_RIGHT 1
#define PAD_ZERO 2
#define PRINT_BUF_LEN 12
#define CMD_IAC 255
#define CMD_WILL 251
#define CMD_WONT 252
#define CMD_DO 253