Skip to content

Instantly share code, notes, and snippets.

@hmoenck
hmoenck / prepare.sh
Last active July 25, 2016 13:25
Startup script for Acquisition machines.
#!/bin/bash
#Startup script for Acquisition machines.
#Increase USB memory cap
sudo bash -c 'sudo echo 1000 > /sys/module/usbcore/parameters/usbfs_memory_mb'
#Mount NTFS device
sudo mount -t ntfs-3g -o mount,rw,umask=0000,uid=1000,gid=1000 /dev/sdxy /media/my/folder/
#ssh mount foreign folder. Don't forget to set allow_other!
@hmoenck
hmoenck / runAcquisition.sh
Created July 25, 2016 13:15
Simple script to wrap around acquisition process.
#!/bin/bash
mytitle="Acquisition"
echo -e '\033]2;'$mytitle'\007'
path=$(dirname $0)
cd $path
[ `whoami` = root ] || exec su -c "sh $0" root
#If there are more than 10 crashes, something went rather systematically Wrong.
for i in 1 2 3 4 5 6 7 8 9 10
do
@hmoenck
hmoenck / slackpost.sh
Last active January 8, 2019 21:28
Slackpost
#!/bin/bash
# Usage: slackpost <channel> <message>
# Setup:
# 1. Create an incoming webhook. Link can be found in https://api.slack.com/custom-integrations
# 2. Retrieve link like https://hooks.slack.com/services/T0XXXXXXX/BXXXXXXXX/XXXXXXXXXXXXXXXXXXXXXXXX
# 3. Add link to this script (webhook)
# 4. Add your slackhost
# 5. Profit