Skip to content

Instantly share code, notes, and snippets.

View strugee's full-sized avatar

AJ Jordan strugee

View GitHub Profile
@mtbentley
mtbentley / waste.sh
Last active August 29, 2015 14:03
Waste bandwidth over SSH
#!/bin/sh
# This script exists solely to waste download bandwidth (and thus NSA storage
# space) over ssh. It starts listening with nc on port 2020, and simultaneously
# connects to a remote server and pipes random data over the ssh connection
# USAGE: waste.sh [-P] [-p port] [-f] <remote host>
# -P pipe the output through pv, to watch it real-time (doesn't seem to work yet)
# -f use /dev/frandom on remote host
# -p port a different port

Someone tried to exploit the Shellshock vulnerability in Bash on lodash.com, likely as part of a mass-exploit attempt.

In this case, the exploit attempted to download a modified version of @schierlm’s pseudo-terminal Perl script that would connect to 72.167.37.182 on port 23. The download URL contains the targeted host name (?h=lodash.com) which gives the attacker an indication of which hosts might have the /tmp/a.pl backdoor in place.

@daserge
daserge / logcat.ps1
Last active May 4, 2016 09:38
adb logcat filter by package id
adb logcat | Select-String (adb shell ps | findstr io.cordova.hellocordova).Split("", [System.StringSplitOptions]::RemoveEmptyEntries)[1]
@nuxodin
nuxodin / node.js "global" and browser "window"
Created December 18, 2012 00:46
node.js "global" and browser "window"
(function (global) {
/* ... Code that defines MyModule ... */
global.MyModule = (global.module || {}).exports = MyModule;
})(this);
@aberke
aberke / xaero_and_palindromic_strings.py
Created March 1, 2017 15:42
Solution to Hacker Rank Challenge: Xaero And Palindromic Strings -- Finds probability of palindromic substrings when a given string
"""
Alex Berke (aberke)
Problem:
--------
https://www.hackerrank.com/contests/101hack29/challenges/xaero-and-palindromic-strings/copy-from/1300744544
A string is called a palindromic string if it can be read the same going forward as well as backwards.
What is the probability of choosing a substring of such that the letters of the chosen substring can be
shuffled to make it a palindromic string?
@yocontra
yocontra / gulp.coffee
Last active April 3, 2017 02:43
Ideal build system
gulp = require 'gulp'
clean = require 'gulp-clean'
jade = require 'gulp-jade'
coffee = require 'gulp-coffee'
minify = require 'gulp-minify'
###
quick syntax ideas:
gulp.files() takes a glob and is an array of file streams
@voodootikigod
voodootikigod / gist:1007426
Created June 4, 2011 01:09
BS ≈ BreakfastScript
Conditionals
( false :)
console.log "if"
:( true )
console.log "else if"
:()
console.log "else"
@max-mapper
max-mapper / gist:1007605
Created June 4, 2011 05:14 — forked from voodootikigod/gist:1007426
BS ≈ BreakfastScript
Conditionals
( false :)
console.log "if"
:( true )
console.log "else if"
:()
console.log "else"
@mafintosh
mafintosh / npm-classic-config.sh
Last active June 21, 2018 17:40
Resets the npm defaults to how they used to be
npm config set loglevel http
npm config set progress false
npm config set package-lock false
npm config set save false
mkdir -p ~/.config/configstore/
printf '{"optOut": true,"lastUpdateCheck": 0}' > ~/.config/configstore/update-notifier-npm.json