Skip to content

Instantly share code, notes, and snippets.

View Freccia's full-sized avatar
🕰️
.

gvzr Freccia

🕰️
.
  • Intergalactic Godzilla Company
View GitHub Profile
@Freccia
Freccia / osx-pw-policies.sh
Created June 29, 2017 13:34
Sets Os X Password Policies
#!/bin/sh
###################################################################################
## Create a pwpolicy XML file based upon variables and options included below.
## Policy is applied and then file gets deleted.
## Use "sudo pwpolicy -u <user> -getaccountpolicies"
## to see it, and "sudo pwpolicy -u <user> -clearaccountpolicies" to clear it.
##
## Tested on: OS X 10.10 10.11 10.12
####################################################################################
@Freccia
Freccia / spoofMac.sh
Created September 20, 2017 12:23
Dumb script to spoof your mac address on Linux/Darwin(OS X)
#!/bin/bash
#
# Created by freccia
# july 2017
#
# Make sure you are root
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root." 1>&2
@Freccia
Freccia / wipe-iT.sh
Created September 20, 2017 12:26
Got something to hide ?
#!/usr/bin/env bash
RED='\033[1;31m'
BLUE='\033[1;34m'
YELLOW='\033[1;33m'
ENDC='\033[0m'
echo -e $RED "This is such a powerful tool, please be careful using it." $ENDC
read a
echo -e $BLUE "As with great powers comes great responsibilities..." $ENDC
@Freccia
Freccia / download_borg.sh
Created September 20, 2017 12:18
Download and verify Borg Backup executable (stable release)
#!/usr/bin/env bash
# This script is tested on OS X (10.12.6)
# but is likely to work on Linux
RED="\033[1;31m"
GREEN="\033[1;32m"
ENDC="\033[0m"
# STABLE RELEASE
@Freccia
Freccia / osx-disable-ipv6.sh
Last active August 20, 2017 19:19
Disable ipv6 globally on OS X
#!/bin/bash
#########################
# written by freccia #
# 29.06.2017 #
# Disables ipv6 on OS X #
#########################
# This script checks for interfaces actually up
# then it disables ipv6 on these
@Freccia
Freccia / blokz.sh
Created June 29, 2017 14:19
Hexdump firsts blocks of drive
#!/bin/sh
DRIVE="/dev/disk2"
BLOCK_SIZE="512"
N_BLOCKS="100"
dd if=$DRIVE bs=$BLOCK_SIZE count=$N_BLOCKS | hexdump -C
@Freccia
Freccia / osx-config.sh
Last active June 29, 2017 13:12
This script enables filevault (deferred) and set ask for password immediately
#!/bin/bash
########################
# written by freccia #
# 22.06.2017 #
########################
# Make sure only root can run our script
if [ "$(id -u)" != "0" ]; then
echo "This script must be run as root" 1>&2