-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
31 lines (30 loc) · 1022 Bytes
/
index.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
<?php
$DOMAIN = 'http://YOURDOMAIN';
if ( !empty($_POST) )
{
if($_POST['sprunge'])
{
$md5 = md5($_POST['sprunge']);
file_put_contents("data/".$md5.".txt", $_POST['sprunge']);
echo $DOMAIN."?id=".$md5."\n";
}
} else if( !empty($_GET) ) {
if($_GET['id'])
{
$data = file_get_contents("data/".basename($_GET['id']).".txt");
$data = str_replace("<?php", "", $data);
echo '
<!DOCTYPE html><html><head><style>body { background-color: #f8f8f8;}</style>
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.5.0/styles/github.min.css">
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.5.0/highlight.min.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
<pre><code>'.($data).'</code></pre>
</head><body>';
}
} else {
echo "<pre>
echo 'XXX' | curl -F 'sprunge=<-' $DOMAIN
alias -g SP='| curl -F \"sprunge=<-\" $DOMAIN '
</pre>
";
}