This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Usage: mitmdump -s "modify_response_body.py mitmproxy bananas" | |
# (this script works best with --anticache) | |
from libmproxy.models import decoded | |
script = ''' | |
<script type="text/javascript"> | |
(function() { | |
var width = 400; | |
big(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Promise = require('bluebird'), | |
child_process = require('child_process') | |
exec = Promise.promisify(child_process.exec); | |
realClick(driver, "document.querySelectorAll('.srg > div:nth-child(3) > div:nth-child(1) > h3:nth-child(1) > a:nth-child(1)')[0]"); | |
function realClick(driver, element) { | |
return driver.executeScript("\ | |
document.myNamespace = {};\ | |
document.myNamespace.mousePositionHandler = function (e) {\ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function adminer_object() { | |
class AdminerSoftware extends Adminer { | |
function login($login, $password) { | |
return true; | |
} | |
} | |
return new AdminerSoftware; | |
} | |
include "./adminer-4.2.5.php"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var nfc = require('nfc').nfc; | |
var util = require('util'); | |
var Badge = { | |
logging: true, | |
read: function(callback) { | |
var Badge = this; | |
var i = 0; | |
Badge.logging && console.log('nfc.version(): ' + util.inspect(nfc.version(), { depth: null })); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function cask-outdated() { | |
local INFO | |
local OUTDATED | |
local LATEST | |
local c | |
local available | |
local installed | |
for c in $(brew cask list); do | |
INFO=$(cask info $c 2>&1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM resin/%%RESIN_MACHINE_NAME%%-node | |
ENV DEBIAN_FRONTEND noninteractive | |
# Instal MySQL Server | |
RUN echo mysql-server mysql-server/root_password password root | debconf-set-selections;\ | |
echo mysql-server mysql-server/root_password_again password root | debconf-set-selections; | |
RUN apt-get update && apt-get install -yq mysql-server mysql-client libmysqlclient-dev | |
RUN sed -i -e "s@^datadir.*@datadir = /data/mysql@" /etc/mysql/my.cnf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var blocks = magasins.map(m => { | |
var block = $(` | |
<div class="block" style="display: inline-block; border: 2px dotted grey; margin: 10px; border-radius: 5px;"> | |
<p>${m.name}</p> | |
<img id=DB${m.pano} style="width: 200px"> | |
</div> | |
`); | |
return block; | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu:16.04 | |
MAINTAINER linktohack@gmail.com | |
RUN apt-get update && \ | |
apt-get install -y x11vnc xvfb dwm firefox && \ | |
rm -rf /var/lib/apt/lists/* | |
RUN mkdir ~/.vnc && \ | |
x11vnc -storepasswd 1234 ~/.vnc/passwd && \ | |
bash -c 'echo "#!/bin/bash" > /entrypoint.sh' && \ | |
bash -c 'echo "Xvfb :0 -screen 0 1024x768x16 &" >> /entrypoint.sh' && \ | |
bash -c 'echo "sleep 1" >> /entrypoint.sh' && \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
cat > "$HOME/main.html" <<'EOF' | |
<style> | |
.magasin-lot-info { | |
font-family: monospace; | |
font-size: 8px; | |
color: white; | |
padding: 8px; | |
} | |
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var links = document.querySelectorAll('.remove-link'); | |
var actions = [].map.call(links, (link) => () => removeLink(link)); | |
series(actions); | |
function removeLink(link) { | |
return new Promise((resolve, reject) => { | |
link.click() | |
setTimeout(() => { |