Skip to content

Instantly share code, notes, and snippets.

@joubin
joubin / vm-usage.sh
Created August 17, 2014 16:50
Simple script to get cpu usage for virtual machines on a mac.
VMOS=$1
set -e
#Making sure I have everything I need
for i in brew spark
do
command -v $i >/dev/null 2>&1 || { echo >&2 "I require $i but it's not installed. Aborting."; exit 1; }
done
command -v spark >/dev/null 2>&1 || { echo >&2 "I require spark but it's not installed. Going to install."; brew install spark; }
#Setting up a killGroup so that the process all close cleanly
@joubin
joubin / bypassSafeConnect.py
Last active July 13, 2020 17:37
This is a small script to bypass SafeConnect. SaveConnect is a small tool some universities use to manage you system. It installs their third party tool to monitor your usage and to check to see if you are running a virus scanner. The system is pretty flawed both in code and implementation. You can bypass it all together by running this.
#!/usr/bin/python
#
# Version 1.0
# This script will pass a linux HTML header causing safe connect to ignor the host mac address as safeconnect is not developed for *nix machines
# For educational purposes only.
# Joubin Jabbari
import sys
import urllib2
import random
@joubin
joubin / MacUsageHelper.sh
Created May 13, 2014 01:10
Get kernel related usage stats from your mac. For the geeky with highly modified os installs.
kextstat -kl | awk '!/com\.apple/{printf "%s %s\n", $6, $7}' | open -ef
{ sudo launchctl list | sed 1d | awk '!/0x|com\.(apple|openssh|vix\.cron)|org\.(amav|apac|cups|isc|ntp|postf|x)/{print $3}'; echo; sudo defaults read com.apple.loginwindow LoginHook; echo; sudo crontab -l; } 2> /dev/null | open -ef
{ launchctl list | sed 1d | awk '!/0x|com\.apple|org\.(x|openbsd)/{print $3}'; echo; crontab -l 2> /dev/null; } | open -ef