Skip to content
Permalink
Browse files

add original source for alert man

  • Loading branch information
akiym committed Nov 4, 2015
1 parent d237ee7 commit 11a96d2758ab3867dae5b47409e2f6f5d14bdeb3
Showing with 55 additions and 0 deletions.
  1. +55 −0 02/alert_man_orig.html
@@ -0,0 +1,55 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>alert man</title>
</head>
<body>
<h1>alert man</h1>
<form id="form">
<input type="text" id="text" />
<input type="submit" value="tweet" />
</form>
<p>Your tweet:</p>
<ul id="tweets"></ul>
<script>
// <img src=# onerror=alert(/XSS/.source)>
function appendTweet(tweet) {
t = tweet.replace(/['"]/g, '');
li = document.createElement('li');
li.innerHTML = tweet;
document.getElementById('tweets').appendChild(li);
};
appendTweet('here is your tweet!');
f = 0;
a = window.alert;
window.alert = function(text) {
if (!f) a(text);
if (text === 'XSS') {
if (!f) {
f = 1;
window.setTimeout(function() {
f = 0;
}, 100);
if (li) li.innerHTML = t;
} else {
f = 0;
cs = [5010175210, 5010175222, 5010175227, 5010175166, 5010175224, 5010175218, 5010175231, 5010175225, 5010175166, 5010175223, 5010175213, 5010175140, 5010175166, 5010175199, 5010175194, 5010175197, 5010175178, 5010175192, 5010175169, 5010175191, 5010175169, 5010175146, 5010175187, 5010175169, 5010175146, 5010175218, 5010175149, 5010175180, 5010175210, 5010175169, 5010175187, 5010175146, 5010175216];
t = '';
for (i = 0; i < cs.length; i++) {
t += String.fromCharCode(cs[i] ^ 0x123456789 + 123456789);
}
appendTweet('<b>'+t+'</b>');
}
} else {
f = 0;
}
};
document.getElementById('form').onsubmit = function() {
tweet = document.getElementById('text').value
appendTweet(tweet);
return false;
};
</script>
</body>
</html>

0 comments on commit 11a96d2

Please sign in to comment.
You can’t perform that action at this time.