Skip to content

Instantly share code, notes, and snippets.

@HarmJ0y
HarmJ0y / LNKBackdoor.ps1
Created July 4, 2016 20:49
Functions to 'backdoor' .LNK files with additional functionality and enumerate all 'backdoored' .LNKs on a system.
function Set-LNKBackdoor {
<#
.SYNOPSIS
Backdoors an existing .LNK shortcut to trigger the original binary and a payload specified by
-ScriptBlock or -Command.
Author: @harmj0y
License: BSD 3-Clause
Required Dependencies: None
#!/usr/bin/env python3
# coding: utf8
"""
A simple wrapper for the `mailx` command.
Purpose
-------
Send an email notification to yourself from a Python script.
@HarmJ0y
HarmJ0y / git.txt
Created May 31, 2016 00:46
Common git commands
Show remote branches:
git branch -v -a
To check out the remote branch:
http://stackoverflow.com/questions/1783405/checkout-remote-git-branch
git fetch
git checkout <branch>
@NickCraver
NickCraver / Windows10-Setup.ps1
Last active March 1, 2026 11:53
(In Progress) PowerShell Script I use to customize my machines in the same way for privacy, search, UI, etc.
##################
# Privacy Settings
##################
# Privacy: Let apps use my advertising ID: Disable
Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AdvertisingInfo -Name Enabled -Type DWord -Value 0
# To Restore:
#Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AdvertisingInfo -Name Enabled -Type DWord -Value 1
# Privacy: SmartScreen Filter for Store Apps: Disable
Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AppHost -Name EnableWebContentEvaluation -Type DWord -Value 0
@azet
azet / get_alexa_1m_mx_rrs
Last active September 6, 2017 08:55
Retrieves MX and A records for 'Alexa Top 1 Million' hosts and prints them as pretty formatted JSON objects to stdout.
#!/usr/bin/env bash
#
# Retrieves MX and A records for 'Alexa Top 1 Million' hosts
# and prints them as pretty formatted JSON objects to stdout.
#
# *Optional* parallelism support with GNU Parallel (recommended):
# $ sudo apt-get install parallel
#
# Authors: Aaron Zauner <azet@azet.org>
# License: CC0 1.0 (https://creativecommons.org/publicdomain/zero/1.0)
@azet
azet / get_spf
Created May 13, 2015 16:43
get a SPF record based on an IP address, if possible
#!/usr/bin/env bash
#
# checks if a SPF record is present for a given IP
# if that IP resolves for the MX and is used without
# redirects/load balacing etc.
#
# needs to be improved
#
readonly IP=${1}
@timbutler
timbutler / gist:46e54e19efe19fea2faf
Created November 3, 2014 00:12
Work out the most commonly called URL's in an Apache logfile
awk '{print $7}' access_log|cut -d? -f1|sort|uniq -c|sort -nk1|tail -n10
@ssstonebraker
ssstonebraker / sed cheatsheet
Created August 2, 2013 14:06 — forked from un33k/sed cheatsheet
Sed Cheatsheet
FILE SPACING:
# double space a file
sed G
# double space a file which already has blank lines in it. Output file
# should contain no more than one blank line between lines of text.
sed '/^$/d;G'