Skip to content

Instantly share code, notes, and snippets.

View stevemcquaid's full-sized avatar

Stephen McQuaid stevemcquaid

View GitHub Profile
# Lint the Code (Run static-analysis
FROM builder as linter
WORKDIR /workspace
ARG GO111MODULE=on
# Install deps
RUN go get github.com/golangci/golangci-lint/cmd/golangci-lint@v1.26.0
RUN go get honnef.co/go/tools/cmd/staticcheck@2020.1.4
# Fail if any files are needing to be gofmt'd
RUN fmtFiles=$(go fmt ./...); test -z $fmtFiles || (echo "**** Need to run go fmt on: $fmtFiles ****" && exit 1)
RUN go vet ./...
# Lint the Code (Run static-analysis
FROM builder as linter
WORKDIR /workspace
ARG GO111MODULE=on
# Install deps
RUN go get github.com/golangci/golangci-lint/cmd/golangci-lint@v1.26.0
RUN go get honnef.co/go/tools/cmd/staticcheck@2020.1.4
# Fail if any files are needing to be gofmt'd
RUN fmtFiles=$(go fmt ./...); test -z $fmtFiles || (echo "**** Need to run go fmt on: $fmtFiles ****" && exit 1)
RUN go vet ./...
@stevemcquaid
stevemcquaid / fb_profile_extractor.rb
Created January 23, 2019 02:17 — forked from unp/fb_profile_extractor.rb
Extracts user names and profile URLs from Facebook group members' page
require 'nokogiri'
require 'csv'
doc = File.open("members.htm") do |f|
html = Nokogiri.HTML(f)
CSV.open("users.csv", "w") do |csv|
csv << ['Name', 'Profile Link']
users = html.css('.uiProfileBlockContent').map do |profile_block|
link = profile_block.css('a').first['href'].match(/(https:\/\/www.facebook.com\/.*)\?/)[1]
name = profile_block.css('a').first.text.strip
#!/bin/bash
# This script should work on ubuntu 16.04 machines
# Enable ssh access for my machines
function get_public_keys () {
mkdir -m 700 -p ~/.ssh
for user in "$@"
do
curl -s https://github.com/"$user".keys >> ~/.ssh/authorized_keys
{
"editor.selectionClipboard": false,
"editor.fontSize": 11,
"window.zoomLevel": 1,
"editor.wordWrap": "on",
// Place your settings in this file to overwrite default and user settings. {
// Controls if quick suggestions should show up while typing
"editor.quickSuggestions": false,
[2017-04-15 02:37:14,219] {/var/www/hotpoint/venv/local/lib/python2.7/site-packages/flask/app.py:1423} ERROR - Exception on /videos/ [GET]
Traceback (most recent call last):
File "/var/www/hotpoint/venv/local/lib/python2.7/site-packages/flask/app.py", line 1817, in wsgi_app
response = self.full_dispatch_request()
File "/var/www/hotpoint/venv/local/lib/python2.7/site-packages/flask/app.py", line 1477, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/var/www/hotpoint/venv/local/lib/python2.7/site-packages/flask/app.py", line 1381, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/var/www/hotpoint/venv/local/lib/python2.7/site-packages/flask/app.py", line 1475, in full_dispatch_request
rv = self.dispatch_request()
echo "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDYapwL1wXHcetJqChyONdke16Uf0cVIrbun41TCg4zxYywJzOCPEMVikGbccm7CNXf4LZPj0vikLBgHE3Vq5fv9D/BjB0QCoOpLPOSjprgEHoRHuff+Djf4MjMJel+1gBnOjhk+Ze9axRqmRU2pHB73FBEHyU4tzeAgpzBe95gZsqtBQSE50w62MqLJpbWI6V/akMJ/OaoyRjOKkE+MsNjQEQAvJSEzlRy/rwdEHHoa0YE5fWTakog6E9g+tPlGYPPdTIeX0Ao/dMqPrwi6aHXz76OfNfTONuVuxa6dLXHA0Q8GPnxcoRz3WM4oEZYLaZwM7/20+h6cSyOWCV/GL44pN6XBkoHMyMegwCLUNZWgr8FzTun8G9b8DTTc5U1D31qM0O0JZvaIP093rvkXVwe9bA/swjG/kYkL/w/QvIQdRcLRl5nFurphVBqzY2rUjEmvm4nqRjmQKsUXhhlstM+p6fAFtW1vmrAE3t9e7E9mcuN23lffo3dOliwteL4c8bL8z4UD2UfzWkBiomQpOBNIpXwX5JSQF+u4Tjx/oV+xdHfl4D1R1c5I0ylR18E70yVOEO+dyn5C4XnDILZl2AQp3eKihlyXB6O6pNuGR+NZgZ2K/u7ZWHv8ZHdW6/HtmjuQg+Y7PhCWfG7PeryYEDzaWaJEP17lA/4Lsm0istSQQ== steve@Stephens-MBP" >> ~/.ssh/authorized_keys
#!/bin/bash
#
# Nginx (Debian-based distros + Gentoo) - Root Privilege Escalation PoC Exploit
# nginxed-root.sh (ver. 1.0)
#
# CVE-2016-1247
#
# Discovered and coded by:
#
rsync --archive --compress --size-only --log-file=rsync-log.txt --stats /path/to/destination path/to/paste/location
--archive == -rlptgoD
-r recursive
-l preserve links
-p preserve permissions (also updates permission on not transferred files)
-t preserve time (also updates time on not transferred files)
-g preserve group
-o preserve owner
-D preserve device and special files
/server add SERVERLABEL SERVERURL -autoconnect
/secure set SERVERLABEL_PASSWORD 12345678
/set irc.server.SERVERLABEL.command "/msg &bitlbee identify ${sec.data.SERVERLABEL_PASSWORD}"
/set irc.server.SERVERLABEL.nicks USERNAME
/set irc.server.SERVERLABEL.realname USERNAME
/set irc.server.SERVERLABEL.username USERNAME
/set irc.server.SERVERLABEL.sasl_username USERNAME
/set irc.server.SERVERLABEL.password ${sec.data.SERVERLABEL_PASSWORD}
/set irc.server.SERVERLABEL.sasl_password ${sec.data.SERVERLABEL_PASSWORD}