Skip to content

Instantly share code, notes, and snippets.

View sgarver's full-sized avatar
💭
Computing...

Stephen Garver sgarver

💭
Computing...
View GitHub Profile
@sgarver
sgarver / selenium-version.nse
Last active May 17, 2025 16:40
Scan and report version of running selenium instance
--[[
Check for running instances of Selenium Server susceptible to SeleniumGreed crypto-miner.
Additional Info:
https://sgarver.github.io/2024/09/01/selenium-service-version-detection.html
Example:
nmap -sV --script selenium-version.nse 127.0.0.1
]]--
@sgarver
sgarver / ivanti-unpatched.nse
Last active May 17, 2025 16:45
Detect out-dated version of Ivanti Connect Secure
--[[
Detect out-dated version of Ivanti Connect Secure
Additional info:
https://sgarver.github.io/2024/09/15/check-ivanti-for-legacy-status.html
Note:
Logic inspired by the check function cound in the ivanti_connect_secure_rce_cve_2024_21893 msf module:
exploit/linux/http/ivanti_connect_secure_rce_cve_2024_21893
@sgarver
sgarver / scopes.sh
Last active May 17, 2025 15:59
Connect to H1 API and set up H1 Program directories with scope urls
#!/bin/bash
# example:
# scopes.sh 1 && scopes.sh 2
# TODO: refactor to loop through each page
# get page $1 (first argument) of program handles where offers_bounties == true && submission_state == "open"
handles=`
curl -s "https://api.hackerone.com/v1/hackers/programs?page%5Bnumber%5D=$1&page%5Bsize%5D=100" \
xrandr --output HDMI-0 --rotate left
@sgarver
sgarver / Process Logos
Last active November 16, 2016 16:40
Auto trim convert to greyscale and resize to 450x450
magick mogrify -trim +repage -layers flatten -colorspace rgb -background white -alpha off -strip -colorspace GRAY -trim -resize 450x450 -gravity center -extent 450x450 -format jpg -quality 100 *.*
@sgarver
sgarver / Resizing Page Content to Fill the Viewport
Created January 22, 2015 15:56
Most websites use a footer, and if the page content is minimal this can lead to a large gap at the bottom of the page. There are many ways to fix this, although my personal preference is to use JavaScript.
var getMaxPageHeight = function () {
var body = document.body,
html = document.documentElement;
return Math.max( body.scrollHeight, body.offsetHeight, html.clientHeight, html.scrollHeight, html.offsetHeight );
};
var setWindowHeight = function () {
convert ~/images/background.png \
\( +clone overlay.png -alpha off -compose multiply -composite \) \
-compose In -composite result.png
@sgarver
sgarver / Update cursor theme in Ubuntu
Last active August 29, 2015 14:01
Linux Commands
sudo update-alternatives --config x-cursor-theme
/*!
* Dependencies: https://github.com/hazzik/livequery
*/
// setup temp selects for test
var testSelect =
'<select>' +
'<option value="volvo">Volvo</option>' +
'<option value="saab">Saab</option>' +
'<option value="mercedes">Mercedes</option>' +