forked from NewEraCracker/php-work
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbase64_encoder.php
More file actions
36 lines (34 loc) · 1.2 KB
/
Copy pathbase64_encoder.php
File metadata and controls
36 lines (34 loc) · 1.2 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
<?php
/*
Author: NewEraCracker
License: Public Domain
*/
?>
SiMPLE PHP ENCODER BY NEWERACRACKER [v0.0.7]<br />
<br />
Encoding: base64_encode(gzdeflate($text,9));<br />
Decoding: gzinflate(base64_decode($text));<br />
<br />
<form action="" method="post">
<textarea name="text" cols=100 rows=20></textarea>
<br />Encode <input type="radio" name="type" value="encode" checked> | <input type="radio" name="type" value="decode"> Decode
<br /><input type="submit" value="Go !" name="submitcmd"/>
</form><br />
<?php
if (isset($_POST['text'], $_POST['type']))
{
$text = get_magic_quotes_gpc() ? stripslashes( (string) $_POST['text']) : (string) $_POST['text'];
if ($_POST['type']=='encode')
{
$encoded = @base64_encode(gzdeflate($text,9));
echo 'DECODED: <br /><textarea cols=100 rows=5>'.htmlspecialchars($text).'</textarea><br />';
echo 'ENCODED: <br /><textarea cols=100 rows=5>'.htmlspecialchars($encoded).'</textarea><br />';
}
elseif ($_POST['type']=='decode')
{
$decoded = @gzinflate(base64_decode($text));
echo 'ENCODED: <br /><textarea cols=100 rows=5>'.htmlspecialchars($text).'</textarea><br />';
echo 'DECODED: <br /><textarea cols=100 rows=5>'.htmlspecialchars($decoded).'</textarea><br />';
}
}
?>