Skip to content

Instantly share code, notes, and snippets.

@PseudoSky
PseudoSky / README.md
Last active Nov 9, 2016
TFIDF Analysis and Search Tools
View README.md

Setup

You're going to need
lodash
NMAP Script List

  • Load up lodash.js into the chrome inspector (or own html/js files)
  • Load nmap-scripts.json data into a variable named nmap
  • Load contextualizer.js

Step 1

@PseudoSky
PseudoSky / nmap-scripts.json
Created Nov 9, 2016
Security Tools Help & Data
View nmap-scripts.json
[
{
"link": "https://nmap.org/nsedoc/scripts/acarsd-info.html",
"name": "acarsd-info",
"info": "Retrieves information from a listening acarsd daemon. Acarsd decodes ACARS (Aircraft Communication Addressing and Reporting System) data in real time. The information retrieved by this script includes the daemon version, API version, administrator e-mail address and listening frequency."
},
{
"link": "https://nmap.org/nsedoc/scripts/address-info.html",
"name": "address-info",
"info": "Shows extra information about IPv6 addresses, such as embedded MAC or IPv4 addresses when available."
@PseudoSky
PseudoSky / getUrls.js
Last active Oct 19, 2016
Various Web Crawl Data
View getUrls.js
var entries=[]
function getUrls(site, pages, start){
_.range(pages||100).map((page) => $http.get('https://api.wikireverse.org/site_search/'+site+'/sites?page='+((start||0)+page)).success( (r) => {entries=entries.concat(r);}))
}
getUrls('wordpress.com',200,500)
// Make them unique
_.keyBy(entries, 'host')
@PseudoSky
PseudoSky / graph-crawl.js
Created Oct 8, 2016
Facebook Graph API Crawl (throttled)
View graph-crawl.js
function store(url,v){
window.localStorage[url]=v;
}
var query= _.throttle(function getPage(url){
$http.get(url).then( d => {
store(url,JSON.stringify(d));
if(d.data.paging && d.data.paging.next){
getPage(d.data.paging.next);
}
@PseudoSky
PseudoSky / url-matchers.js
Created Sep 26, 2016
RegExp and utilities for grabbing parts of a path or url.
View url-matchers.js
function getPathParts(path,i) {
return path.match(/^((http[s]?|ftp):\/)?\/?([^:\/\s]+)(:([^\/]*))?((\/[\w\/-]+)*\/)([\w\-\.]+[^#?\s]+)(\?([^#]*))?(#(.*))?$/i)[i];
}
// https://gist.github.com/url-matchers.js -> url-matchers.js
function getFileName(url){
return getPathParts(url, 8);
}
// https://gist.github.com/url-matchers.js -> gist.github.com
View spacing-shortcuts.css
.m-2 { margin: -2em !important; }
.ml-2 { margin-left: -2em !important; }
.mr-2 { margin-right: -2em !important; }
.mt-2 { margin-top: -2em !important; }
.mb-2 { margin-bottom: -2em !important; }
View downcase.sublime-macro
[
{
"args": null,
"command": "lower_case"
}
]
@PseudoSky
PseudoSky / .bash_profile
Last active Dec 12, 2017
dot files and environment (you should NEVER blindly use peoples dot files)
View .bash_profile
export PATH=/usr/local/lib:/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin
. ~/dot/snowbash
. ~/dot/completions
genpath
export PATH="/usr/local/bin:$PATH";
export NODE_ENV="development"
export NVM_DIR="/usr/local/nvm"
@PseudoSky
PseudoSky / lodash-mixins.js
Created May 21, 2016
My precious lodash secrets.
View lodash-mixins.js
// ---------------------------------------------------------------------------//
// -------------------------------- Helpers --------------------------------- //
// ---------------------------------------------------------------------------//
function ignoreEqual(obj_v,src_v){
if(!obj_v || src_v == obj_v){
return null;
}
if(obj_v && src_v!= obj_v){
return obj_v;
View user-project-mapreduce.py
from pandas import *
import numpy as np
from mrjob.job import MRJob
from mrjob.step import MRStep
from mrjob.protocol import JSONValueProtocol
def dist( p1, p2 ):
# Get the list of shared_items
if len(p1) == 0 or len(p2) == 0: return [-1,[]]
You can’t perform that action at this time.