I've found this in many compromised PHP boxes.
You can also find it online by searching for the hash.
I want to write up an article about tearing it apart and what we can learn from it.
I've found this in many compromised PHP boxes.
You can also find it online by searching for the hash.
I want to write up an article about tearing it apart and what we can learn from it.
# all GET requests will serve static files from root | |
# all !GET requests will get passed to the server running at 4001 | |
server { | |
listen 80; | |
server_name site.com; | |
root /var/www/site.com; | |
index index.html; | |
error_page 404 /404.html; | |
location / { | |
if ($request_method != GET) { |
docker has different drivers so you do like
docker-machine create --driver=DRIVERNAME MACHINENAME
so like there's an ec2 one that'll spool up ec2 machines with docker
docker run --name nuez-db -e MYSQL_USER=nuez-app -e MYSQL_PASSWORD=nuez+1 -e MYSQL_DATABASE=nuez -e MYSQL_ROOT_PASSWORD=root+1 -p 3306:3306 -d nuez-db
// the basic idea | |
function connect() { | |
const map = {} | |
const connection = makeConnection() | |
connection.on('data', data => { | |
const id = parseId(data) | |
map[id].resolve(data) | |
}) | |
connection.on('end', () => { | |
Object.keys(map).forEach(id => map[id].reject('end')) |
// with inspiration from: https://github.com/vitaliy-bobrov/remarkable-extlink | |
// for use with: https://github.com/jonschlinkert/remarkable | |
const md = new Remarkable() | |
function externalize(mark) { | |
const linkRegex = /href="([^"]*)"/ | |
const fix = (link = '') => { | |
if (link.indexOf('http') !== 0) { | |
return 'http://' + link |
<!-- | |
THIS IS A JUNK DRAFT, KEPT FOR A REFERENCE, DON'T USE THIS IDEA | |
--> | |
<div class="component-form-field component-form-field-image"> | |
<label for="{{id}}">{{label}}</label> | |
<input | |
ref:file | |
bind:value="file" | |
on:change="upload(event)" | |
type="file" |
the idea being a fully modernized version of Sindre's promise-fun package:
export default mediator => { | |
mediator.provide('game/get-single', ({ gameId }) => { | |
return mediator.call('database', `SELECT * FROM game WHERE game.id = ${gameId}`) | |
}) | |
} |
import fetch from 'whatwg-fetch' | |
// TODO need to actually use encode/decode on parameters | |
function generateQueryParameters({ filter, include, fields }) { | |
const fieldParameters = (fields || []) | |
.map(field => { | |
return `fields[${field.name}]=${field.keys.join(',')}` | |
}) | |
.join('&') |