Skip to content

Instantly share code, notes, and snippets.

View jacobsalmela's full-sized avatar
:octocat:
To all that makes us unique

Jacob Salmela jacobsalmela

:octocat:
To all that makes us unique
View GitHub Profile
@jacobsalmela
jacobsalmela / nc-reverse-shell.sh
Created August 13, 2014 12:37
(OS X) Reverse shell via netcat
#!/bin/bash
#----------AUTHOR------------
# Jacob Salmela
# 9 April 2013
#---------DESCRIPTION--------
# Serves up an unencrypted, reverse-shell when the -e option is unavailable
# Much less reliable (command lag), but useful in a pinch
#----------FUNCTIONS---------
@jacobsalmela
jacobsalmela / disableUAC.cmd
Created August 18, 2014 12:31
(Windows) Disable UAC
%windir%\System32\reg.exe ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v EnableLUA /t REG_DWORD /d 0 /f\
@jacobsalmela
jacobsalmela / analytics-geeklet.sh
Created August 18, 2014 23:33
(OS X) Geeklet to display Google Analytics daily vists
#----------VARIABLES--------
# API credentials
clientID=""
clientSecret=""
redirectURI=""
# OAuth tokens and codes
authorizationCode=""
# Once you have these two tokens, the script can run automatically.
accessToken=""
refreshToken=""
@jacobsalmela
jacobsalmela / timeSaver.sh
Last active August 20, 2022 13:57
(OS X) Enter the password repeatedly for multiple authentication windows
#!/bin/bash
# Change 60 to however many passwords you have to authenticate for
for s in {1..60}
do
sleep 1
# Enter your password below
osascript -e <<EOF 'tell application "System Events"
tell process "SecurityAgent"
set value of text field 1 of window 1 to "password"
end tell
@jacobsalmela
jacobsalmela / malwareDetection.plist
Created October 21, 2014 12:50
Simple malware detection using launchd
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>RollYourOwn.MalwareDetection.Yosemite</string>
<key>ProgramArguments</key>
<array>
<string>/usr/bin/malwaredetection.sh</string>
</array>
@jacobsalmela
jacobsalmela / login-to-gui.sh
Last active August 20, 2022 13:57
Logs in a user to the GUI after access to assistive devices have been enabled for ARDAgent.app and SystemEvents.app
osascript -e 'tell application "System Events"
keystroke "username"
keystroke tab
keystroke "password"
keystroke return
keystroke return
end tell'
@jacobsalmela
jacobsalmela / java-exceptions-testnav.sh
Last active August 29, 2015 14:08
Adds Pearsons TestNav to the Java Exception list
#!/bin/sh
# This script will x amount of servers to the Oracle Java Exception Site List.
# By Jacob Salmela
# Based on: http://derflounder.wordpress.com/2014/01/16/managing-oracles-java-exception-site-list/
# List of each server to be added to the Java whitelist (one per line in single quotes)
servers=('http://www.pearsonaccess.com/cs/Satellite?pagename=Pearson/QuickLink/mn'
'https://www.testnav.com/'
'https://proctorcaching.pearsonaccess.com/ems/systemCheck/systemCheck.jsp?acc=mn'
'https://testnav.com/mn/testnav-7.5.22.36/'
@jacobsalmela
jacobsalmela / open-testnav-system-check.sh
Last active August 29, 2015 14:08
Opens the system check page for TestNav
# Open system check site
killall Safari > /dev/null
osascript -e 'tell application "Safari"
activate
set the URL of the front document to "https://proctorcaching.pearsonaccess.com/ems/systemCheck/systemCheck.jsp?acc=mn"
end tell'
@jacobsalmela
jacobsalmela / click-start-test-button.sh
Last active August 29, 2015 14:08
Starts the system check for TestNav
# Click full-screen button twice so all computers have the Safari window in the same position
osascript -e 'tell application "System Events"
set frontmost of process "Safari" to true
tell process "Safari"
click button 4 of window 1
end tell
end tell'
# Sleep for a bit seconds to make sure full screen is fully-activated
sleep 4
@jacobsalmela
jacobsalmela / open-sample-test-site.sh
Last active August 29, 2015 14:08
Opens the sample test site for TestNav
# Open sample test site
killall Safari > /dev/null
osascript -e 'tell application "Safari"
activate
set the URL of the front document to "http://testnav.com/mnqc"
end tell'