Results 1 to 10 of 11
-
8th Nov 2009, 01:57 AM #1OPRespected DeveloperWebsite's:
X4B.orgPHP UNRAR (good for rapidleech)
A simple php rar extractor, made for Mr-R-T for rapidleech v22 trial 2 which doesnt have rar/unrar support yet. You can change the files dir with the first variable in the script. Not my best work, took 9 mins.
PHP Code:<?php
/*
Simple RAR Extractor
If running in rapidleech you may also need to add
<files rar.php>
allow from all
</files>
to .htaccess
*/
$dir = 'files';
if($_POST['file']){
$file = new WFile_rar($_POST['file']);
$files = $file->extract(array($_POST['password']));
echo 'Extraction run<br /><br />';
}
echo '<table>';
$files = scandir($dir);
foreach($files as $f){
if($f{0}!=='.'&&stripos($f,'.rar')){
echo '<tr><form action="rar.php" method="post"><input type="hidden" name="file" value="',$dir,'/',$f,'" /><td>',$f,'</td><td>Password: <input type="text" name="password" /></td><td><input type="submit" value="Extract" /></td></form></tr>';
}
}
echo '</table>';
class WFile_rar {
public $do = array('extract');
public $ext = 'rar';
private $files = array();
private function _tdir($name) {
global $core;
mkdir ( $file );
if (! chmod ( $file, 0777 ))
die ( 'chmod() failed on file ' . $file );
clearstatcache ();
if (is_writable ( $file ))
return $file; //File is writable, continue
$core->error ( 'File is not writable: ' . $file, ERR_ERROR );
return false;
}
private function _extract($to,$pass=false) {
if($this->name){
$password = '-p-';
if($pass){
$password = '-p'.escapeshellarg($pass);
}
exec('unrar e -o+ '.$password.' '.escapeshellarg($this->name).' '.$to.' 2>&1',$output);
foreach($output as $o){
if(strpos($o,'password incorrect')!==false||strpos($o,'CRC failed in')!==false){
return 'password';
}
}
//Archive extracted successfully
$this->files = scandir($to); //Get folder contents (extracted archive)
return true;
}
return false;
}
function extract($passwords){
global $core;
$password = '';
$to = dirname($this->name);
$ret = $this->_extract($to);
if($ret==='password'){//RAR is passworded
$password = false;
foreach($passwords as $pass){
$r = $this->_extract($to,$pass);
if($r===true){
$password = $pass;
break;
}
}
}
if($password===false&&$ret==='password'){
die('Password couldnt be guessed');
return false;
}
foreach($this->files as $k=>$f){
$this->files[$k] = $f;
}
if($ret===true){//Most likely not passworded - else catch anyway
return array(false,$this->files);
}else if(trim($password)!==''){//Passworded
return array(trim($password),$this->files);
}
return false;
}
function WFile_rar($name){
$n = pathinfo($name);
$this->name = $name;
}
}
?>SplitIce Reviewed by SplitIce on . PHP UNRAR (good for rapidleech) A simple php rar extractor, made for Mr-R-T for rapidleech v22 trial 2 which doesnt have rar/unrar support yet. You can change the files dir with the first variable in the script. Not my best work, took 9 mins. <?php /* Simple RAR Extractor If running in rapidleech you may also need to add <files rar.php> allow from all Rating: 5
-
8th Nov 2009, 02:12 AM #2Member
Nice work
It's amazing, being in a community can cause hate. Competitors or not - DDOS isn't cool :)
-
8th Nov 2009, 02:15 AM #3Member
thanks
* :: Trusted Sellers:: jayfella ~ddpanda~ desiboy~~` ~~SmartzKool ~~ RippeR ~~ george101
-
8th Nov 2009, 02:22 AM #4
-
8th Nov 2009, 02:40 AM #5Member
looks good split
Please follow signature rules
-
8th Nov 2009, 03:23 AM #6Member
coolz
-
8th Nov 2009, 03:26 AM #7OPRespected DeveloperWebsite's:
X4B.org
-
8th Nov 2009, 03:26 AM #8MemberWebsite's:
nappz.net
-
8th Nov 2009, 03:36 AM #9OPRespected DeveloperWebsite's:
X4B.org
-
7th Dec 2010, 11:22 AM #10Member
can this work without rpaidleech? hope you add more features
Sponsored Links
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
rar unrar in rapidleech
By Gempis in forum Technical Help Desk SupportReplies: 21Last Post: 21st Nov 2011, 07:56 AM -
[Other] good RapidLeech with small storage , rar/unrar ,paying alertpay
By abens24 in forum ArchiveReplies: 9Last Post: 3rd May 2011, 05:25 PM -
can't unrar on rapidleech
By leonight in forum Technical Help Desk SupportReplies: 12Last Post: 14th Jan 2011, 02:11 PM -
How to unrar in rapidleech..?
By torrfriend in forum Technical Help Desk SupportReplies: 1Last Post: 26th Dec 2010, 08:36 AM -
RapidLeech Unrar
By Raven in forum Technical Help Desk SupportReplies: 15Last Post: 3rd Jul 2010, 02:49 AM
themaCreator - create posts from...
Version 3.45 released. Open older version (or...