Skip to content

Instantly share code, notes, and snippets.

@am1ru1
am1ru1 / DeepCopyTest.ps1
Created September 7, 2016 07:45 — forked from zippy1981/DeepCopyTest.ps1
PowerShell Deepcopy demo
# Get original data
$data = @{
First = 'Justin';
Last = 'Dearing';
Resume = @{
Experience = [HashTable[]]@(
@{
StartDate = [DateTime] (Get-Date '2002-03-23');
EndDate = [DateTime] (Get-Date '2007-05-15');
Company = 'ACME ISP';
@am1ru1
am1ru1 / slideshare-dl.py
Created July 6, 2016 16:39 — forked from onlurking/slideshare-dl.py
An Slideshare Presentation Downloader written with Python 3 and Insomnia, now only requires img2pdf and BeautifulSoup.
import argparse
import urllib.request
import os
import img2pdf
from os import walk
from os.path import join
from bs4 import BeautifulSoup
work_dir = os.path.dirname(__file__)
@am1ru1
am1ru1 / osx_infector.py
Created June 23, 2016 07:33 — forked from secretsquirrel/osx_infector.py
From Shmoocon infection demo
import os
import struct
import shutil
import subprocess
class macho_intel32_shellcode():
"""
Mach-O Intel x32 shellcode class
"""
# Signatures for detecting Microsoft Word Intruder
# https://www.fireeye.com/blog/threat-research/2015/04/a_new_word_document.html
alert tcp $HOME_NET any -> $EXTERNAL_NET $HTTP_PORTS (msg:"FOX-SRT - Trojan - Microsoft Word Intruder payload request"; content:"GET"; depth:3; flowbits:set,wmi; content:!"Referer|3a| "; content:!"Cookie|3a| "; uricontent:"&act=1"; fast_pattern: only; pcre:"/\/webstat\/image\.php\?id=[0-9]{8}/"; threshold: type limit, track by_src, count 1, seconds 3600; classtype:trojan-activity; reference:url,https://www.fireeye.com/blog/threat-research/2015/04/a_new_word_document.html; sid:21001609; rev:1;)
alert tcp $EXTERNAL_NET $HTTP_PORTS -> $HOME_NET any (msg:"FOX-SRT - Trojan - Microsoft Word Intruder payload response"; flowbits:isset,mwi; content:"Content-Type|3a| application/octet-stream"; content:"Content-Description|3a| File Transfer"; pcre:"/filename=[0-9]{8}\.exe/"; threshold: type limit, track by_src, count 1, seconds 3600; classtype:trojan-activity; reference:url,https://www.fir
@am1ru1
am1ru1 / gist:7752088
Created December 2, 2013 16:24
Vnoxygen PGP
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: BCPG v1.47
mQGiBFGPW60RBADSRdukOufvUs90Cvp88m5jGK0P+qQsxcJtlA+yAp8wdtVW1AQw
gBXE6hbVCXSmvcrJbL0DTv+dHA80mJlKypWyHg4TI/gEZ8YSwpeW4KiEZUKMJYdi
4Y/o3/ReJGesAeOsVLCc4MxU/2sa3/2mWoG+Nz+Yv2LN+lmec5NeVaKpLQCgvWWz
f7Ga5SDrW2Pk6UEe0GoES+MD/RE0/sDCfHBkVPS8uBj9jTfpbi9YtIx687rN0RRl
CF32rPwK18+NePzaunBcuCP3IsLBsFadmqicdx5aWgsMpt3rPD/ImqGqmTFJXPQ4
fXRkwW6LUeNi76ok+oK93iXi2uZJY4uZzZOxIhD/4ntOMunqxt+CDRuW8+mUmfxT
/EcHA/9o4RjAYN/mtl5w0zWbC43zx0+Xz4VhGcuMcleSK+Qllv6Uzk/FnP3+SHge
@am1ru1
am1ru1 / ubuntu-configure-sendmail-with-gmail
Last active December 29, 2015 05:39 — forked from fcoury/ubuntu-configure-sendmail-with-gmail
removed GTK zenity, and added warning to check mail log for issues.
#!/bin/bash
HOST=$(hostname)
function install_postfix() {
echo | sudo debconf-set-selections <<__EOF
postfix postfix/root_address string
postfix postfix/rfc1035_violation boolean false
postfix postfix/mydomain_warning boolean
postfix postfix/mynetworks string 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128