Your name is sent to NameHandler.php which creates your own file "yourName.php"
PHP Code:
<?php
$name = $_POST['name'];
if ($name <> '')
{
$handle = fopen("$name.php", 'w');
fwrite($handle, '<?php if($_SERVER[');
fwrite($handle, "'");
fwrite($handle, 'REQUEST_METHOD');
fwrite($handle, "'");
fwrite($handle, '] == ');
fwrite($handle, '"');
fwrite($handle, 'POST');
fwrite($handle, '"');
fwrite($handle, '&& strlen($_POST[');
fwrite($handle, "'");
fwrite($handle, 'pic');
fwrite($handle, "'");
fwrite($handle, ']) > 0) { file_put_contents(');
fwrite($handle, "'");
fwrite($handle, "$name");
fwrite($handle, '.bmp');
fwrite($handle, "'");
fwrite($handle, ', base64_decode($_POST[');
fwrite($handle, "'");
fwrite($handle, 'pic');
fwrite($handle, "'");
fwrite($handle, '])); } else print ');
fwrite($handle, '"');
fwrite($handle, 'unknown request');
fwrite($handle, '"');
fwrite($handle, '; ?>');
fclose($handle);
}
?>
And here is the plugin source (Not written by me, found online by Laser)
SCAR Code:
const
Codes64 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
//from [url]http://www.swissdelphicenter.ch/torry/showcode.php?id=1524[/url]
//the codes const needed to be changed around
function Encode64(S: string): string;
var
i: Integer;
a: Integer;
x: Integer;
b: Integer;
begin
Result := '';
a := 0;
b := 0;
for i := 1 to Length(s) do
begin
x := Ord(s[i]);
b := b * 256 + x;
a := a + 8;
while a >= 6 do
begin
a := a - 6;
x := b div (1 shl a);
b := b mod (1 shl a);
Result := Result + Codes64[x + 1];
end;
end;
if a > 0 then
begin
x := b shl (6 - a);
Result := Result + Codes64[x + 1];
end;
end;
I changed a little of that though to get it in the plugin, don't remember exactly what.