-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1,094 changed files
with
9,313 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<html> | ||
|
||
<head> | ||
<title>DOM Based XSS</title> | ||
</head> | ||
|
||
<body> | ||
<script type="module" src="./sink.js"></script> | ||
</body> | ||
|
||
</html> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import { payload } from './source.js'; | ||
|
||
document.write(payload); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
var payload = document.baseURI; | ||
|
||
export { payload }; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<html> | ||
|
||
<head> | ||
<title>DOM Based XSS</title> | ||
</head> | ||
|
||
<body> | ||
<script type="module" src="./sink.js"></script> | ||
</body> | ||
|
||
</html> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { payload } from './source.js'; | ||
|
||
setTimeout(function () { | ||
trigger(payload); | ||
}, 10); | ||
|
||
// Sync trigger. | ||
document.write(payload); | ||
|
||
// Async trigger. | ||
function trigger(payload) { | ||
document.write(payload); | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
/* | ||
* Return the value of the first cookie with the given name. | ||
*/ | ||
function lookupCookie(name) { | ||
var parts = document.cookie.split(/\s*;\s*/); | ||
var nameEq = name + '='; | ||
for (var i = 0; i < parts.length; i++) { | ||
if (parts[i].indexOf(nameEq) == 0) { | ||
return parts[i].substr(nameEq.length); | ||
} | ||
} | ||
} | ||
|
||
// Pre-seed the cookie, if it has not been set yet. | ||
if (!lookupCookie('badValue')) { | ||
document.cookie = 'badValue="a"'; | ||
} | ||
|
||
var payload = lookupCookie('badValue'); | ||
|
||
export { payload }; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<html> | ||
|
||
<head> | ||
<title>DOM Based XSS</title> | ||
</head> | ||
|
||
<body> | ||
<script type="module" src="./sink.js"></script> | ||
</body> | ||
|
||
</html> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { payload } from './source.js'; | ||
|
||
setTimeout(function () { | ||
trigger(payload); | ||
}, 10); | ||
|
||
var div = document.createElement('div'); | ||
document.documentElement.appendChild(div); | ||
|
||
// Sync trigger. | ||
div.innerHTML = payload; | ||
|
||
// Async trigger. | ||
function trigger(payload) { | ||
div.innerHTML = payload; | ||
}; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
/* | ||
* Return the value of the first cookie with the given name. | ||
*/ | ||
function lookupCookie(name) { | ||
var parts = document.cookie.split(/\s*;\s*/); | ||
var nameEq = name + '='; | ||
for (var i = 0; i < parts.length; i++) { | ||
if (parts[i].indexOf(nameEq) == 0) { | ||
return parts[i].substr(nameEq.length); | ||
} | ||
} | ||
} | ||
|
||
// Pre-seed the cookie, if it has not been set yet. | ||
if (!lookupCookie('badValue')) { | ||
document.cookie = 'badValue="a"'; | ||
} | ||
|
||
var payload = lookupCookie('badValue'); | ||
|
||
export { payload }; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<html> | ||
|
||
<head> | ||
<title>DOM Based XSS</title> | ||
</head> | ||
|
||
<body> | ||
<script type="module" src="./sink.js"></script> | ||
</body> | ||
|
||
</html> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import { payload } from './source.js'; | ||
|
||
document.write(payload); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
var payload = document.documentURI; | ||
|
||
export { payload }; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<html> | ||
|
||
<head> | ||
<title>DOM Based XSS</title> | ||
</head> | ||
|
||
<body> | ||
<script type="module" src="./sink.js"></script> | ||
</body> | ||
|
||
</html> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { payload } from './source.js'; | ||
|
||
// Sync trigger. | ||
document.write(payload); | ||
|
||
setTimeout(function () { | ||
trigger(payload); | ||
}, 10); | ||
|
||
// Async trigger. | ||
function trigger(payload) { | ||
document.write(payload); | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
if (document.referrer == "") { | ||
// If the referrer is not set, we set the referrer by reloading the page. | ||
location.href = location.href; | ||
} else { | ||
var payload = document.referrer; | ||
} | ||
|
||
export { payload }; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<html> | ||
|
||
<head> | ||
<title>DOM Based XSS</title> | ||
</head> | ||
|
||
<body> | ||
<script type="module" src="./sink.js"></script> | ||
</body> | ||
|
||
</html> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { payload } from './source.js'; | ||
|
||
setTimeout(function () { | ||
trigger(payload); | ||
}, 10); | ||
|
||
// Sync trigger. | ||
eval(payload); | ||
|
||
// Async trigger. | ||
function trigger(payload) { | ||
eval(payload); | ||
}; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
if (document.referrer == "") { | ||
// If the referrer is not set, we set the referrer by reloading the page. | ||
location.href = location.href; | ||
} else { | ||
var payload = document.referrer; | ||
} | ||
|
||
export { payload }; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<html> | ||
|
||
<head> | ||
<title>DOM Based XSS</title> | ||
</head> | ||
|
||
<body> | ||
<script type="module" src="./sink.js"></script> | ||
</body> | ||
|
||
</html> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { payload } from './source.js'; | ||
|
||
setTimeout(function () { | ||
trigger(payload); | ||
}, 10); | ||
|
||
var div = document.createElement('div'); | ||
document.documentElement.appendChild(div); | ||
|
||
// Sync trigger. | ||
div.innerHTML = payload; | ||
|
||
// Async trigger. | ||
function trigger(payload) { | ||
div.innerHTML = payload; | ||
}; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
if (document.referrer == "") { | ||
// If the referrer is not set, we set the referrer by reloading the page. | ||
location.href = location.href; | ||
} else { | ||
var payload = document.referrer; | ||
} | ||
|
||
export { payload }; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<html> | ||
|
||
<head> | ||
<title>DOM Based XSS</title> | ||
</head> | ||
|
||
<body> | ||
<script type="module" src="./sink.js"></script> | ||
</body> | ||
|
||
</html> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import { payload } from './source.js'; | ||
|
||
document.write(payload); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
var payload = document.URL; | ||
|
||
export { payload }; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<html> | ||
|
||
<head> | ||
<title>DOM Based XSS</title> | ||
</head> | ||
|
||
<body> | ||
<script type="module" src="./sink.js"></script> | ||
</body> | ||
|
||
</html> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import { payload } from './source.js'; | ||
|
||
document.write(payload); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
var payload = document.URLUnencoded; | ||
|
||
export { payload }; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<html> | ||
|
||
<head> | ||
<title>DOM Based XSS</title> | ||
</head> | ||
|
||
<body> | ||
<script type="module" src="./sink.js"></script> | ||
</body> | ||
|
||
</html> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { payload } from './source.js'; | ||
|
||
setTimeout(function () { | ||
trigger(payload); // Using the async trigger. | ||
|
||
// Clean up the localStorage to avoid causing side-effect on subsequent tests. | ||
localStorage.clear(); | ||
}, 10); | ||
|
||
// Sync trigger. | ||
eval(payload); | ||
|
||
// Async trigger. | ||
function trigger(payload) { | ||
eval(payload); | ||
}; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
if (!localStorage['badValue']) { | ||
localStorage['badValue'] = Math.random(); | ||
} | ||
var payload = localStorage['badValue']; | ||
|
||
export { payload }; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<html> | ||
|
||
<head> | ||
<title>DOM Based XSS</title> | ||
</head> | ||
|
||
<body> | ||
<script type="module" src="./sink.js"></script> | ||
</body> | ||
|
||
</html> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { payload } from './source.js'; | ||
|
||
setTimeout(function () { | ||
trigger(payload); // Using the async trigger. | ||
|
||
// Clean up the localStorage to avoid causing side-effect on subsequent tests. | ||
localStorage.clear(); | ||
}, 10); | ||
|
||
// Sync trigger. | ||
document.write(payload); | ||
|
||
// Async trigger. | ||
function trigger(payload) { | ||
document.write(payload); | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
if (!localStorage.getItem('badValue')) { | ||
localStorage.setItem('badValue', Math.random()); | ||
} | ||
|
||
var payload = localStorage.getItem('badValue'); // Using sync trigger. | ||
|
||
export { payload }; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<html> | ||
|
||
<head> | ||
<title>DOM Based XSS</title> | ||
</head> | ||
|
||
<body> | ||
<script type="module" src="./sink.js"></script> | ||
</body> | ||
|
||
</html> |
Oops, something went wrong.