-
Notifications
You must be signed in to change notification settings - Fork 480
/
Copy pathfd.php
33 lines (31 loc) · 1.05 KB
/
fd.php
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
<?php
$q = isset($_GET['q'])? $_GET['q']: '';
$q = str_replace(array("\r", "\n", "/", "\\", "<", "."), "", $q);
if( substr_count($q, "'") > 1) $q = str_replace("'", "", $q);
if( substr_count($q, '"') > 1) $q = str_replace('"', "", $q);
$host = $q . ".orange.ctf";
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8"/>
<script type="text/javascript">
if (window.top == window.self) {
window.self.location.href = "https://<?=$host;?>/oauth/authorize?client_id=1&scope=read&redirect_uri=https://twitter.com/orange_8361";
} else {
var data = JSON.stringify({
message: 'CTF.API.remote',
data: {
location: "https://<?=$host;?>/oauth/authorize?client_id=1&scope=read&redirect_uri=https://twitter.com/orange_8361"
}
});
window.parent.postMessage(
data,
"https://<?=$host;?>"
);
}
</script>
</head>
<body>
</body>
</html>