Anyone know how to detect if the file is really a sis(x) file thats been uploaded and not a renamed extension?
like on wen.ru`s uploaders
Im guessing its done on headers
Started on the old forum in October 2010 · view the original in the archive · old links redirect here
Anyone know how to detect if the file is really a sis(x) file thats been uploaded and not a renamed extension?
like on wen.ru`s uploaders
Im guessing its done on headers
could not understand may be like this?
<?php
$filename = $_GET['file'];
if(endsWith($filename, '.sisx'))
{
header('Content-type: x-epoc/x-sisx-app');
header('Content-Disposition: attachment; filename="'.$filename.'"');
readfile($filename);
}
else if(endsWith($filename, '.sis'))
{
header('Content-type: application/vnd.symbian.install');
header('Content-Disposition: attachment; filename="'.$filename.'"');
readfile($filename);
}
else
{
print('Not file to download');
}
function endsWith( $str, $sub )
{
return ( substr( $str, -strlen( $sub ) ) == $sub );
}
?>
left wap stuff
Thanks but not quite what i mean 🙂
example:
I have an uploader that only allows files sis and sisx files to be uploaded.
I then Rename "something.mp3" to "something.sis" to try and bypass the extension uploading rule ... However it is possible to pick up on if its a true sis(x) file rather than a renamed mp3 or other format.
Im guessing sis/sisx files give some header information that proves they are sis/sisx files
sis decompiler need to be installed for sis ,cant say bout sisx.
EnDLesS wrote: sis decompiler need to be installed for sis ,cant say bout sisx.
sis decompiler ??? i'd really like to know how you gonna install sis decompiler onto web server !??!??
It's better to keep your mouth shut and give the impression that you're stupid, than to open it and remove all doubt. ⓣⓗⓔ ⓠⓤⓘⓔⓣⓔⓡ ⓨⓞⓤ ⓑⓔ©ⓞⓜⓔ, ⓣⓗⓔ ⓜⓞⓡⓔ ⓨⓞⓤ ⓐⓡⓔ ⓐⓑⓛⓔ ⓣⓞ ⓗⓔⓐⓡ ! ιη тнєσяу, тнє ρяα¢тι¢є ιѕ α яєѕυℓт σƒ тнє тнєσяу, вυт ιη ρяα¢тι¢є ιѕ тнє σρρσѕιтє.
キノgんイノ刀g 4 ア乇ムc乇 ノ丂 レノズ乇 キucズノ刀g 4 √ノ尺gノ刀ノイリ!
Sorry u got me rong ,meant a class to check sis file info.