Skip to content

Instantly share code, notes, and snippets.

echo 'cya'
@cfebs
cfebs / README.md
Last active July 14, 2018 07:58
A demonstration of the dangers of window.onload and iframes

Instructions

Download server.js and run node server.js (tested with node v6.10.1)

Visit http://localhost:3000/

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title></title>
<style>
.row {
font-family: monospace;
display: block;
$ time curl -v -H'Pragma: akamai-x-cache-on, akamai-x-cache-remote-on, akamai-x-check-cacheable, akamai-x-get-cache-key, akamai-x-get-ssl-client-session-id, ak
amai-x-get-true-cache-key, akamai-x-get-request-id' https://secure-a.vimeocdn.com/js/froogaloop2.min.js >/dev/null
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Trying 23.192.55.218...
* TCP_NODELAY set
* Connected to secure-a.vimeocdn.com (23.192.55.218) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
delay=0.1
while true
do
clear
printf '%s\n' \
"ROFL:ROFL:LOL:" \
" _^___" \
" L __/ [] \\" \
" O ===__ \\" \
" L \\________]" \
curl \
--request PUT \
--header "X-Consul-Token: ${MASTERKEY}" \
--data \
'{
"Name": "vault-ge1",
"Type": "client",
"Rules": "{\"key\":{\"vault/\":{\"policy\":\"write\"}},\"node\":{\"\":{\"policy\":\"write\"}},\"service\":{\"vault\":{\"policy\":\"write\"}},\"agent\":{\"\":{\"policy\":\"write\"}},\"session\":{\"\":{\"policy\":\"write\"}}}"
}' http://127.0.0.1:8500/v1/acl/create
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title></title>
</head>
<body>
<video src="https://gistcdn.githack.com/cfebs/5362154caad74f0a7d4c7640d7ac7d6a/raw/2f93dcd66954f6a9c830637f8d26674323eb626e/vid.mp4" loop="1" autoplay="1" />
</body>
@cfebs
cfebs / rofl.sh
Created September 22, 2017 13:17
delay=0.1
while true
do
clear
printf '%s\n' \
"ROFL:ROFL:LOL:" \
" _^___" \
" L __/ [] \\" \
" O ===__ \\" \
" L \\________]" \
@cfebs
cfebs / export1.html
Last active September 20, 2017 01:18
Canvas record
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title></title>
<style>
#draw{
}
</style>
</head>