--- torrentflux-2.3.orig/html/searchEngines/isoHuntEngine.php +++ torrentflux-2.3/html/searchEngines/isoHuntEngine.php @@ -1,407 +1,816 @@ mainURL = "isohunt.com"; + $this->altURL = "isohunt.com"; + $this->mainTitle = "isoHunt"; + $this->engineName = "isoHunt"; + + $this->author = "kboy"; + $this->version = "1.05"; + $this->updateURL = "http://www.torrentflux.com/forum/index.php/topic,878.0.html"; + + $this->Initialize($cfg); + + } + + //---------------------------------------------------------------- + // Function to Make the Request (overriding base) + function makeRequest($request) + { + return parent::makeRequest($request, true); + } + + //---------------------------------------------------------------- + // Function to get Latest.. + function getLatest() + { + $request = "/latest.php?mode=bt"; + + if (!empty($this->pg)) + { + $request .= "&pg=" . $this->pg; + } + + if ($this->makeRequest($request)) + { + return $this->parseResponse(true); + } + else + { + return $this->msg; + } + } + + //---------------------------------------------------------------- + // Function to perform Search. + function performSearch($searchTerm) + { + // This is what isohunt is looking for in a request. + // http://isohunt.com/torrents.php?ihq=test&ext=&op=and + + // create the request string. + $searchTerm = str_replace(" ", "+", $searchTerm); + $request = "/torrents?ihq=".$searchTerm; + //$request .= "&ext=&op=and"; + if (!empty($this->pg)) + { + $request .= "&ihs1=18&iho1=d&iht=-1&ihp=" . $this->pg; + } + + // make the request if successful call the parse routine. + if ($this->makeRequest($request)) + { + return $this->parseResponse(false); + } + else + { + return $this->msg; + } + + } + + //---------------------------------------------------------------- + // Function to parse the response. + function parseResponse($latest = true) + { + $output = $this->tableHeader(); + + $thing = $this->htmlPage; + + // Strip out those Nasty Iframes. + $thing = eregi_replace("",'',$thing); + + // We got a response so display it. + // Chop the front end off. + if ($latest) + { + $start = strrpos($thing, "New torrents on isoHunt"); + } else { + $start = strrpos($thing, "isoHunt Rank"); + } + + $thing = substr($thing, $start, strlen($thing) - $start); + + if ($latest) + { + $end = strrpos($thing, "adclick"); + } else { + $end = strrpos($thing, "ยป"); + } + + $thing = substr($thing, 0, $end); + $tmpList = $thing; + //echo $tmpList; + + if (strpos($tmpList,"/download/") || strpos($tmpList,"torrent_details")) + { + // ok so now we have the listing. + $tmpListArr = split("",$tmpList); + + array_pop($tmpListArr); + $bg = $this->cfg["bgLight"]; + + + foreach($tmpListArr as $key =>$value) + { + //echo $value; + $buildLine = true; + if (strpos($value,"/download/") || strpos($value,"torrent_details")) + { + $ts = new isoHunt($value,$latest); + + // Determine if we should build this output + if (is_int(array_search($ts->CatName,$this->catFilter))) + { + $buildLine = false; + } + + if ($this->hideSeedless == "yes") + { + if($ts->Seeds == "N/A" || $ts->Seeds == "0") + { + $buildLine = false; + } + } + + if (!empty($ts->torrentFile) && $buildLine) { + + $output .= trim($ts->BuildOutput($bg)); + + // ok switch colors. + if ($bg == $this->cfg["bgLight"]) + { + $bg = $this->cfg["bgDark"]; + } + else + { + $bg = $this->cfg["bgLight"]; + } + } + + } + } + // set thing to end of this table. + $thing = substr($thing,strpos($thing,"")); + if (!is_integer(strpos($thing,"name=ihLogin"))) + { + $thing = ""; + } + } + + $output .= ""; + + // is there paging at the bottom? + if (strpos($this->htmlPage, "") != false) + { + // Yes, then lets grab it and display it! ;) + + $thing = substr($this->htmlPage,strpos($this->htmlPage,"
")+strlen("
")); + $pages = substr($thing,0,strpos($thing,"
")); + + $pages = str_replace("  ",'',strip_tags($pages,"")); + + $tmpPageArr = split("",$pages); + array_pop($tmpPageArr); + + $pagesout = ''; + foreach($tmpPageArr as $key => $value) + { + $value .= "  "; + $tmpVal = substr($value,strpos($value,"/torrents/"),strpos($value,"\>")-1); + $pgNum = substr($tmpVal,strpos($tmpVal,"ihp=")+strlen("ihp=")); + $pagesout .= str_replace($tmpVal,"XXXURLXXX".$pgNum,$value); + } + if(strpos($this->curRequest,"LATEST")) + { + $pages = str_replace("XXXURLXXX",$this->searchURL()."&LATEST=1&pg=",$pagesout); + } + else + { + $pages = str_replace("XXXURLXXX",$this->searchURL()."&searchterm=".$_REQUEST["searchterm"]."&pg=",$pagesout); + } + $pages = strip_tags($pages,""); + $output .= "
".$pages."
"; + } + + return $output; + } + } + + // This is a worker class that takes in a row in a table and parses it. + class isoHunt + { + var $torrentName = ""; + var $torrentDisplayName = ""; + var $torrentFile = ""; + var $torrentSize = ""; + var $torrentStatus = ""; + var $CatId = ""; + var $CatName = ""; + var $fileCount = ""; + var $Seeds = ""; + var $Peers = ""; + var $Data = ""; + + var $dateAdded = ""; + var $dwnldCount = ""; + + function isoHunt( $htmlLine , $latest = true) + { + if (strlen($htmlLine) > 0) + { + + $this->Data = $htmlLine; + + // Fix messed up end td's once in a while. + $htmlLine = eregi_replace("<(.)*1ff8(.)*/td>",'',$htmlLine); + + // Chunck up the row into columns. + $tmpListArr = split("",$htmlLine); + + array_pop($tmpListArr); + + //Age Type Torrent Names MB F S L D + if(count($tmpListArr) > 5) + { + if ($latest) + { + // Latest Request // + if(strpos($tmpListArr["3"],"[DL]")) + { + + //$tmpListArr["1"] = $this->cleanLine($tmpListArr["1"]); // Age + $this->CatName = $this->cleanLine($tmpListArr["2"]); // Type + + $tmpStr = $tmpListArr["3"]; // TorrentName and Download Link + // move to the [DL] area. and remove [REL] line + $tmpStr = substr($tmpStr,strpos($tmpStr,"[DL]")+strlen("[DL]"), strpos($tmpStr,"[REL]")); + $tmpStr = substr($tmpStr,strpos($tmpStr,"href=\"")+strlen("href=\"")); // Download Link + $this->torrentFile = "http://isohunt.com".substr($tmpStr,0,strpos($tmpStr,"\"")); + $tmpStr = substr($tmpStr,strpos($tmpStr,"title=\"")+strlen("title=\"")); + $tmpStr = substr($tmpStr,0,strpos($tmpStr,"\"")); + $tmpStr = substr($tmpStr,strpos($tmpStr,'\'')); + $this->torrentName = str_replace("'",'',$tmpStr); + + $this->torrentSize = $this->cleanLine($tmpListArr["4"]); // MB + $this->fileCount = $this->cleanLine($tmpListArr["5"]); // Files + $this->Seeds = $this->cleanLine($tmpListArr["6"]); // Seeds + $this->Peers = $this->cleanLine($tmpListArr["7"]); // Peers / Leechers + $this->dwnldCount = $this->cleanLine($tmpListArr["8"]); // Download Count + } + else + { + $this->CatName = $this->cleanLine($tmpListArr["1"]); // Type + + $tmpStr = $tmpListArr["0"]; // TorrentName and Download Link + $tmpStr = substr($tmpStr,strpos($tmpStr,"torrent_details/")); + $this->torrentFile = "http://isohunt.com/download/".substr($tmpStr,0,strpos($tmpStr,"'")); + + $this->torrentName = $this->cleanLine($tmpListArr["2"]); + + $this->torrentSize = $this->cleanLine($tmpListArr["3"]); // MB + $this->fileCount = $this->cleanLine($tmpListArr["4"]); // Files + $this->Seeds = $this->cleanLine($tmpListArr["5"]); // Seeds + $this->Peers = $this->cleanLine($tmpListArr["6"]); // Peers / Leechers + $this->dwnldCount = $this->cleanLine($tmpListArr["7"]); // Download Count + } + } + else + { + // Search Request // + + if(strpos($tmpListArr["2"],"[DL]")) + { + $this->CatName = $this->cleanLine($tmpListArr["0"]); // Type + + //$tmpListArr["1"] = $this->cleanLine($tmpListArr["1"]); // Age + + $tmpStr = $tmpListArr["2"]; // TorrentName and Download Link + // move to the [DL] area. and remove [REL] line + $tmpStr = substr($tmpStr,strpos($tmpStr,"[DL]")+strlen("[DL]"), strpos($tmpStr,"[REL]")); + $tmpStr = substr($tmpStr,strpos($tmpStr,"href=\"")+strlen("href=\"")); // Download Link + $this->torrentFile = "http://isohunt.com".substr($tmpStr,0,strpos($tmpStr,"\"")); + $tmpStr = substr($tmpStr,strpos($tmpStr,"title=\"")+strlen("title=\"")); + $tmpStr = substr($tmpStr,0,strpos($tmpStr,"\"")); + $tmpStr = substr($tmpStr,strpos($tmpStr,'\'')); + $this->torrentName = str_replace(array("'","Download .torrent here: "),'',$tmpStr); + + } + else + { + + $tmpStr = $tmpListArr["0"]; // Download ID and Type + $this->CatName = $this->cleanLine($tmpStr); // Download ID and Type + $tmpStr = substr($tmpStr,strpos($tmpStr,"torrent_details/")+strlen("torrent_details/")); + + $this->torrentFile = "http://isohunt.com/download/".substr($tmpStr,0,strpos($tmpStr,",")-1); + + //$tmpListArr["1"] = $this->cleanLine($tmpListArr["1"]); // Age + + $this->torrentName = $this->cleanLine($tmpListArr["2"]); + + } + + $this->torrentSize = $this->cleanLine($tmpListArr["3"]); // MB + $this->Seeds = $this->cleanLine($tmpListArr["4"]); // Seeds + $this->Peers = $this->cleanLine($tmpListArr["5"]); // Peers / Leechers + + $this->torrentDisplayName = $this->torrentName; + + } + + if ($this->Peers == '') + { + $this->Peers = "N/A"; + if (empty($this->Seeds)) $this->Seeds = "N/A"; + } + + if ($this->Seeds == '') $this->Seeds = "N/A"; + + $this->torrentDisplayName = str_replace(".torrent",'',$this->torrentName); + if(strlen($this->torrentDisplayName) > 50) + { + $this->torrentDisplayName = substr($this->torrentDisplayName,0,50)."..."; + } + + } + } + } + + function cleanLine($stringIn,$tags='') + { + if(empty($tags)) + return trim(str_replace(array(" "," ")," ",strip_tags($stringIn))); + else + return trim(str_replace(array(" "," ")," ",strip_tags($stringIn,$tags))); + } + + function dumpArray($arrIn) + { + foreach($arrIn as $key => $value) + { + echo "\nkey(".$key.")"."value(".$value.")"; + } + } + //---------------------------------------------------------------- + // Function to build output for the table. + function BuildOutput($bg) + { + $output = "\n"; + $output .= "
torrentFile."\">torrentName."\" border=0>\n"; + $output .= " torrentFile."\" title=\"".$this->torrentName."\">".$this->torrentDisplayName."\n"; + $output .= " ". $this->CatName ."\n"; + $output .= " ".$this->torrentSize."\n"; + $output .= " ".$this->Seeds."\n"; + $output .= " ".$this->Peers."\n"; + $output .= "\n"; + + return $output; + + } + } + + ?> + --- torrentflux-2.3.orig/html/searchEngines/mininovaEngine.php +++ torrentflux-2.3/html/searchEngines/mininovaEngine.php @@ -1,314 +1,650 @@ mainURL = "mininova.org"; + $this->altURL = "mininova.org"; + $this->mainTitle = "mininova"; + $this->engineName = "mininova"; + + $this->author = "sloan"; - $this->version = "1.01"; + + $this->version = "1.03"; + $this->updateURL = "http://www.torrentflux.com/forum/index.php/topic,1501.0.html"; + + $this->Initialize($cfg); + + } + function populateMainCategories() + { + $this->mainCatalog[0] = "(all types)"; + $this->mainCatalog[1] = "Anime"; + $this->mainCatalog[2] = "Books"; + $this->mainCatalog[3] = "Games"; + $this->mainCatalog[4] = "Movies"; + $this->mainCatalog[5] = "Music"; + $this->mainCatalog[6] = "Other"; + $this->mainCatalog[7] = "Pictures"; + $this->mainCatalog[8] = "Software"; + $this->mainCatalog[9] = "TV Shows"; + } + + //---------------------------------------------------------------- + // Function to Make the Request (overriding base) + function makeRequest($request) + { + return parent::makeRequest($request, true); + } + + //---------------------------------------------------------------- + // Function to get Latest.. + function getLatest() + { + $request = "/latest.php?mode=bt"; + + if (!empty($this->pg)) + { + $request .= "&pg=" . $this->pg; + } + + if ($this->makeRequest($request)) + { + return $this->parseResponse(true); + } + else + { + return $this->msg; + } + } + + //---------------------------------------------------------------- + // Function to perform Search. + function performSearch($searchTerm) + { + // This is what mininova is looking for in a request. + // http://www.mininova.org/search/?search=test + + // create the request string. + $searchTerm = str_replace(" ", "+", $searchTerm); + $request = "/search/?search=".$searchTerm; + + if (!empty($this->pg)) + { + $request .= "&ihs1=18&iho1=d&iht=-1&ihp=" . $this->pg; + } + + $request .= "&submit=Torrents"; + + // make the request if successful call the parse routine. + if ($this->makeRequest($request)) + { + return $this->parseResponse(false); + } + else + { + return $this->msg; + } + + } + + //---------------------------------------------------------------- + // Function to parse the response. + function parseResponse($latest = true) + { + + $output = $this->tableHeader(); + + $thing = $this->htmlPage; + + // Strip out those Nasty Iframes. + $thing = eregi_replace("",'',$thing); + - // We got a response so display it. - // Chop the front end off. - + + if ($latest) + + { + + $thing = substr($thing,strpos($thing,"10 most downloaded")); + + $thing = substr($thing,strpos($thing,"Leechers<")); + $thing = substr($thing,strpos($thing,""))) + + { + + $curCat = substr($thing,strpos($thing,"catname")); + + $curCat = substr($curCat,0,strpos($curCat,"")); + + $curCat = substr($curCat,strpos($curCat,"href")); + + $curCatId = substr($curCat,strpos($curCat,"cat/")+strlen("cat/")); + + $curCatId = substr($curCatId,0,strpos($curCatId,"\"")); + + $curCatId = str_replace("=","",$curCatId); + + $curCat = substr($curCat,strpos($curCat,">")+1); + + $curCat = substr($curCat,0,strpos($curCat,"<")); + + + $tmpList = substr($thing,0,strpos($thing,"")); + + // ok so now we have the listing. + $tmpListArr = split("",$tmpList); + + $bg = $this->cfg["bgLight"]; + + foreach($tmpListArr as $key =>$value) + { + + //echo $value; + $buildLine = true; + if (strpos($value,'catFilter); -print_r($ts->CatName); -print_r("-->"); + + + if ($this->hideSeedless == "yes") + { + if($ts->Seeds == "---") + { + $buildLine = false; + } + } + + if (!empty($ts->torrentFile) && $buildLine) { + + $output .= trim($ts->BuildOutput($bg)); + + // ok switch colors. + if ($bg == $this->cfg["bgLight"]) + { + $bg = $this->cfg["bgDark"]; + } + else + { + $bg = $this->cfg["bgLight"]; + } + } + + } + } - + + } + // set thing to end of this table. + $thing = substr($thing,strpos($thing,"")); + + + $output .= ""; + + + + return $output; + } + } + + // This is a worker class that takes in a row in a table and parses it. + class mininova + { + var $torrentName = ""; + var $torrentDisplayName = ""; + var $torrentFile = ""; + var $torrentSize = ""; + var $torrentStatus = ""; + var $CatId = ""; + var $CatName = ""; + var $fileCount = ""; + var $Seeds = ""; + var $Peers = ""; + var $Data = ""; + + var $dateAdded = ""; + var $dwnldCount = ""; + - function mininova( $htmlLine , $latest = true) + + function mininova( $htmlLine , $latest = true, $curCat="", $curCatId="") + { + + if (strlen($htmlLine) > 0) + { + + $this->Data = $htmlLine; + + + // Chunck up the row into columns. + $tmpListArr = split("",$htmlLine); + array_pop($tmpListArr); -//print_r($tmpListArr); + + + //Age Type Torrent Names MB S L + if(count($tmpListArr) > 4) + { + if ($latest) + { + // Latest Request // - - $this->CatName = $this->cleanLine($tmpListArr["1"]); // Type - $tmpStr = substr($tmpListArr["2"],strpos($tmpListArr["2"],"/tor/")+5); + + $this->MainCategory = $curCat; // Type + + $this->MainId = $curCatId; // Type + + $tmpStr = substr($tmpListArr["1"],strpos($tmpListArr["1"],"/tor/")+5); + $this->torrentFile = "http://www.mininova.org/get/".substr($tmpStr,0,strpos($tmpStr,'">')); - $this->torrentName = $this->cleanLine($tmpListArr["2"]); // Name - - $this->torrentSize = $this->cleanLine($tmpListArr["3"]); // MB - $this->Seeds = $this->cleanLine($tmpListArr["4"]); // Seeds - $this->Peers = $this->cleanLine($tmpListArr["5"]); // Leechers - + + $this->torrentName = $this->cleanLine($tmpListArr["1"]); // Name + + + + $this->torrentSize = $this->cleanLine($tmpListArr["2"]); // MB + + $this->Seeds = $this->cleanLine($tmpListArr["3"]); // Seeds + + $this->Peers = $this->cleanLine($tmpListArr["4"]); // Leechers + } + else + { + // Search Request // - - + $this->CatName = $this->cleanLine($tmpListArr["1"]); // Type + $tmpStr = substr($tmpListArr["2"],strpos($tmpListArr["2"],"/tor/")+5); + $this->torrentFile = "http://www.mininova.org/get/".substr($tmpStr,0,strpos($tmpStr,'">')); + $this->torrentName = $this->cleanLine($tmpListArr["2"]); // Name + + $this->torrentSize = $this->cleanLine($tmpListArr["3"]); // MB + $this->Seeds = $this->cleanLine($tmpListArr["4"]); // Seeds + $this->Peers = $this->cleanLine($tmpListArr["5"]); // Leechers - - $this->torrentDisplayName = $this->torrentName; - + } + + if ($this->Peers == '') + { + $this->Peers = "N/A"; + if (empty($this->Seeds)) $this->Seeds = "N/A"; + } + + if ($this->Seeds == '') $this->Seeds = "N/A"; + + $this->torrentDisplayName = str_replace(".torrent",'',$this->torrentName); + if(strlen($this->torrentDisplayName) > 50) + { + $this->torrentDisplayName = substr($this->torrentDisplayName,0,50)."..."; + } + + } + } + } + + function cleanLine($stringIn,$tags='') + { + if(empty($tags)) + return trim(str_replace(array(" "," ")," ",strip_tags($stringIn))); + else + return trim(str_replace(array(" "," ")," ",strip_tags($stringIn,$tags))); + } + + function dumpArray($arrIn) + { + foreach($arrIn as $key => $value) + { + echo "\nkey(".$key.")"."value(".$value.")"; + } + } + //---------------------------------------------------------------- + // Function to build output for the table. + function BuildOutput($bg) + { + $output = "\n"; + $output .= " torrentFile."\">torrentName."\" border=0>\n"; + $output .= " torrentFile."\" title=\"".$this->torrentName."\">".$this->torrentDisplayName."\n"; + $output .= " ". $this->CatName ."\n"; + $output .= " ".$this->torrentSize."\n"; + $output .= " ".$this->Seeds."\n"; + $output .= " ".$this->Peers."\n"; + $output .= "\n"; + + return $output; + + } + } + + ?> + --- torrentflux-2.3.orig/html/searchEngines/PirateBayEngine.php +++ torrentflux-2.3/html/searchEngines/PirateBayEngine.php @@ -1,503 +1,1082 @@ mainURL = "thepiratebay.org"; + $this->altURL = "thepiratebay.org"; + $this->mainTitle = "The PirateBay"; + $this->engineName = "PirateBay"; + + $this->author = "kboy"; - $this->version = "1.05"; + + $this->version = "1.06"; + $this->updateURL = "http://www.torrentflux.com/forum/index.php/topic,1125.0.html"; + + $this->Initialize($cfg); + } + + function populateMainCategories() + { + $this->mainCatalog["000"] = "Top100"; + $this->mainCatalog["100"] = "Audio"; + $this->mainCatalog["200"] = "Video"; + $this->mainCatalog["300"] = "Applications"; + $this->mainCatalog["400"] = "Games"; + $this->mainCatalog["500"] = "Porn"; - $this->mainCatalog["600"] = "E-books"; + + $this->mainCatalog["600"] = "Other"; + } + + //---------------------------------------------------------------- + // Function to Get Sub Categories + function getSubCategories($mainGenre) + { + $output = array(); + + switch ($mainGenre) + { + case "100" : + $output["101"] = "Music"; + $output["102"] = "Audio books"; + $output["103"] = "Sound clips"; + $output["199"] = "Other"; + break; + case "200" : + $output["201"] = "Movies"; + $output["202"] = "Movies DVDR"; + $output["203"] = "Music videos"; + $output["204"] = "Movie clips"; + $output["205"] = "TV shows"; + $output["206"] = "Handheld"; + $output["299"] = "Other"; + break; + case "300" : + $output["301"] = "Windows"; + $output["302"] = "Mac"; + $output["303"] = "UNIX"; + $output["304"] = "Handheld"; + $output["399"] = "Other OS"; + break; + case "400" : + $output["401"] = "PC"; + $output["402"] = "Mac"; + $output["403"] = "PS2"; + $output["404"] = "XBOX"; + $output["405"] = "Gamecube"; + $output["406"] = "Handheld"; + $output["499"] = "Other"; + break; + case "500" : + $output["501"] = "Movies"; + $output["502"] = "Movies DVDR"; + $output["503"] = "Pictures"; + $output["504"] = "Games"; + $output["599"] = "Other"; + break; + case "600" : + $output["601"] = "E-books"; + $output["602"] = "Comics"; + $output["603"] = "Pictures"; + $output["604"] = "Covers"; + $output["699"] = "Other"; + break; + } + + return $output; + + } + + //---------------------------------------------------------------- + // Function to Make the Request (overriding base) + function makeRequest($request) + { + return parent::makeRequest($request, false); + } + + //---------------------------------------------------------------- + // Function to get Latest.. + function getLatest() + { + //recent.php + //top100.php + + if ($_REQUEST["mainGenre"] == "000") + { + $request = "/top/all"; + } + else + { + if (array_key_exists("subGenre",$_REQUEST)) + { + $request = "/brwsearch.php?b=1&c=".$_REQUEST["subGenre"]; + } + elseif (array_key_exists("mainGenre",$_REQUEST)) + { + if ($_REQUEST["mainGenre"] == "000") + { + $request = "/top/all"; + } else { + $request = "/brwsearch.php?b=1&c=0&d=".$_REQUEST["mainGenre"]; + } + } + else + { + $request = "/recent.php?orderby=se"; + } + if (!empty($this->pg)) + { + $request .= "&page=" . $this->pg; + } + } + + if ($this->makeRequest($request)) + { + return $this->parseResponse(); + } + else + { + return $this->msg; + } + + } + + //---------------------------------------------------------------- + // Function to perform Search. + function performSearch($searchTerm) + { + if (array_key_exists("subGenre",$_REQUEST)) + { + $request = "/brwsearch.php?b=1&c=".$_REQUEST["subGenre"]; + } + elseif (array_key_exists("mainGenre",$_REQUEST)) + { + $request = "/brwsearch.php?b=1&c=0&d=".$_REQUEST["mainGenre"]; + } + else + { + $request = "/search.php?orderby=".$searchTerm; + } + + if(strlen($searchTerm) > 0) + { + $searchTerm = str_replace(" ", "+", $searchTerm); + $request .= "&q=".$searchTerm; + } + + $request .= "&audio=&video=&apps=&games=&porn=&other=&what=search&orderby="; + + if (!empty($this->pg)) + { + $request .= "&page=" . $this->pg; + } + + if ($this->makeRequest($request)) + { + return $this->parseResponse(); + } + else + { + return $this->msg; + } + } + + //---------------------------------------------------------------- + // Override the base to show custom table header. + // Function to setup the table header + function tableHeader() + { + $output = ""; + + $output .= "
\n"; + $output .= "cfg["table_header_bg"]."\">"; + $output .= " "; + $output .= " "; + $output .= " "; + $output .= " "; + $output .= " "; + $output .= " "; + $output .= " "; + $output .= "\n"; + + return $output; + } + + //---------------------------------------------------------------- + // Function to parse the response. + function parseResponse() + { + $output = $this->tableHeader(); + + $thing = $this->htmlPage; + + // We got a response so display it. + // Chop the front end off. - $thing = str_replace("Recent Torrents","Search results",$thing); + - while (is_integer(strpos($thing,"Search results"))) - { - $thing = substr($thing,strpos($thing,"Search results")); - $thing = substr($thing,strpos($thing,"")); - $thing = substr($thing,strpos($thing,"")); - - $tmpList = substr($thing,0,strpos($thing,"",$tmpList); - - $bg = $this->cfg["bgLight"]; - - foreach($tmpListArr as $key =>$value) - { - $buildLine = true; - if (strpos($value,"static.thepiratebay.org")) - { - - $ts = new pBay($value); - - // Determine if we should build this output - if (is_int(array_search($ts->CatName,$this->catFilter))) - { - $buildLine = false; - } - - if ($this->hideSeedless == "yes") - { - if($ts->Seeds == "N/A" || $ts->Seeds == "0") - { - $buildLine = false; - } - } - - if (!empty($ts->torrentFile) && $buildLine) { - - $output .= trim($ts->BuildOutput($bg, $this->searchURL())); - - // ok switch colors. - if ($bg == $this->cfg["bgLight"]) - { - $bg = $this->cfg["bgDark"]; - } - else - { - $bg = $this->cfg["bgLight"]; - } - } - - } - } - } - - $output .= "
 Torrent Name  ("; + + $tmpURI = str_replace(array("?hideSeedless=yes","&hideSeedless=yes","?hideSeedless=no","&hideSeedless=no"),"",$_SERVER["REQUEST_URI"]); + + // Check to see if Question mark is there. + if (strpos($tmpURI,'?')) + { + $tmpURI .= "&"; + } + else + { + $tmpURI .= "?"; + } + + if($this->hideSeedless == "yes") + { + $output .= "Show Seedless"; + } + else + { + $output .= "Hide Seedless"; + } + + $output .= ")Category  SizeDate AddedSeedsPeers
"; - - // is there paging at the bottom? - if (strpos($thing, "&page=") != false) - { - // Yes, then lets grab it and display it! ;) - $thing = substr($thing,strpos($thing,"")+1); - $pages = substr($thing,0,strpos($thing,"")); - if (strpos($pages,"prev") > 0) - { - $tmpStr = substr($pages,0,strpos($pages,"")+1); - $pages = $tmpStr."Prev".$pages; - - if (strpos($pages,"next") > 0) - { - $pages = substr($pages,0,strpos($pages,""; - } - } - elseif (strpos($pages,"next") > 0) - { - $pages = substr($pages,0,strpos($pages,""; - } - - if(strpos($this->curRequest,"LATEST")) - { - $pages = str_replace("?",$this->searchURL()."&LATEST=1&",$pages); - $pages = str_replace("/recent.php","",$pages); - } - else - { - $pages = str_replace("?",$this->searchURL()."&",$pages); - $pages = str_replace("/search.php",'',$pages); - } - - $pages = str_replace("page=","pg=",$pages); - $pages = str_replace("d=","cat=",$pages); - $pages = str_replace("c=","subGenre=",$pages); - $pages = str_replace("q=","searchterm=", $pages); - $pages = str_replace("orderby=","",$pages); - - $pages = str_replace("&&","&",$pages); - - $pages = str_replace("/brwsearch.php","",$pages); - - $output .= "
".$pages."
"; - } + + if (is_integer(strpos($thing,"Your search did not match any torrents"))) + + { + + $this->msg = "Your search did not match any torrents"; + + + + } else { + + + + while (is_integer(strpos($thing,"searchRresults"))) + + { + + $thing = substr($thing,strpos($thing,"searchRresults")); + + $thing = substr($thing,strpos($thing,"")); + + $thing = substr($thing,strpos($thing,"")); + + + + $tmpList = substr($thing,0,strpos($thing,"")); + + + + // ok so now we have the listing. + + $tmpListArr = split("",$tmpList); + + + + $bg = $this->cfg["bgLight"]; + + + + foreach($tmpListArr as $key =>$value) + + { + + $buildLine = true; + + if (strpos($value,"static.thepiratebay.org")) + + { + + + + $ts = new pBay($value); + + + + // Determine if we should build this output + + if (is_int(array_search($ts->CatName,$this->catFilter))) + + { + + $buildLine = false; + + } + + + + if ($this->hideSeedless == "yes") + + { + + if($ts->Seeds == "N/A" || $ts->Seeds == "0") + + { + + $buildLine = false; + + } + + } + + + + if (!empty($ts->torrentFile) && $buildLine) { + + + + $output .= trim($ts->BuildOutput($bg, $this->searchURL())); + + + + // ok switch colors. + + if ($bg == $this->cfg["bgLight"]) + + { + + $bg = $this->cfg["bgDark"]; + + } + + else + + { + + $bg = $this->cfg["bgLight"]; + + } + + } + + + + } elseif (strpos($value,"torrents.thepiratebay.org")) { + + $ts = new pBay($value); + + + + // Determine if we should build this output + + if (is_int(array_search($ts->CatName,$this->catFilter))) + + { + + $buildLine = false; + + } + + + + if ($this->hideSeedless == "yes") + + { + + if($ts->Seeds == "N/A" || $ts->Seeds == "0") + + { + + $buildLine = false; + + } + + } + + + + if (!empty($ts->torrentFile) && $buildLine) { + + + + $output .= trim($ts->BuildOutput($bg, $this->searchURL())); + + + + // ok switch colors. + + if ($bg == $this->cfg["bgLight"]) + + { + + $bg = $this->cfg["bgDark"]; + + } + + else + + { + + $bg = $this->cfg["bgLight"]; + + } + + } + + } + + + + } + + } + + + + $output .= ""; + + + + // is there paging at the bottom? + + if (strpos($thing, "&page=") != false) + + { + + // Yes, then lets grab it and display it! ;) + + $thing = substr($thing,strpos($thing,"")+1); + + $pages = substr($thing,0,strpos($thing,"")); + + if (strpos($pages,"prev") > 0) + + { + + $tmpStr = substr($pages,0,strpos($pages,"")+1); + + $pages = $tmpStr."Prev".$pages; + + + + if (strpos($pages,"next") > 0) + + { + + $pages = substr($pages,0,strpos($pages,""; + + } + + } + + elseif (strpos($pages,"next") > 0) + + { + + $pages = substr($pages,0,strpos($pages,""; + + } + + + + if(strpos($this->curRequest,"LATEST")) + + { + + $pages = str_replace("?",$this->searchURL()."&LATEST=1&",$pages); + + $pages = str_replace("/recent.php","",$pages); + + } + + else + + { + + $pages = str_replace("?",$this->searchURL()."&",$pages); + + $pages = str_replace("/search.php",'',$pages); + + } + + + + $pages = str_replace("page=","pg=",$pages); + + $pages = str_replace("d=","cat=",$pages); + + $pages = str_replace("c=","subGenre=",$pages); + + $pages = str_replace("q=","searchterm=", $pages); + + $pages = str_replace("orderby=","",$pages); + + + + $pages = str_replace("&&","&",$pages); + + + + $pages = str_replace("/brwsearch.php","",$pages); + + + + $output .= "
".$pages."
"; + + } + + return $output; + } + } + + // This is a worker class that takes in a row in a table and parses it. + class pBay + { + var $torrentName = ""; + var $torrentDisplayName = ""; + var $torrentFile = ""; + var $torrentSize = ""; + var $torrentStatus = ""; + var $CatName = ""; + var $CatId = ""; + var $MainId = ""; + var $MainCategory = ""; + var $SubId = ""; + var $SubCategory = ""; + var $Seeds = ""; + var $Peers = ""; + var $Data = ""; + + var $dateAdded = ""; + var $dwnldCount = ""; + + function pBay( $htmlLine ) + { + if (strlen($htmlLine) > 0) + { + + $this->Data = $htmlLine; + + // Chunck up the row into columns. + $tmpListArr = split("",$htmlLine); + + if(count($tmpListArr) > 6) + { + // Cat Id + $tmpStr = substr($tmpListArr["0"],strpos($tmpListArr["0"],"c=")+2); + $this->CatId = substr($tmpStr,0,strpos($tmpStr,"\"")); + + $this->CatName = $this->cleanLine($tmpListArr["0"]); // Cat Name + + if (strpos($this->CatName,">")) + { + $this->MainCategory = trim(substr($this->CatName,0,strpos($this->CatName,">"))); + $this->MainId = substr($this->CatId,0,1) . "00"; + $this->SubCategory = trim(substr($this->CatName,strpos($this->CatName,">")+1)); + $this->SubId = $this->CatId; + } + else + { + $this->MainCategory = $this->CatName; + $this->MainId = $this->CatId; + } + + $this->torrentName = $this->cleanLine($tmpListArr["1"]); // TorrentName + + $this->dateAdded = $this->cleanLine($tmpListArr["2"]); // Date Added + + $tmpStr = ""; + $tmpStr = substr($tmpListArr["3"],strpos($tmpListArr["3"],"href=\"")+strlen("href=\"")); // Download Link + $this->torrentFile = substr($tmpStr,0,strpos($tmpStr,"\"")); + + $this->torrentSize = $this->cleanLine($tmpListArr["4"]); // Size of File + + $this->Seeds = $this->cleanLine($tmpListArr["5"]); // Seeds + $this->Peers = $this->cleanLine($tmpListArr["6"]); // Peers + + + if ($this->Peers == '') + { + $this->Peers = "N/A"; + if (empty($this->Seeds)) $this->Seeds = "N/A"; + } + if ($this->Seeds == '') $this->Seeds = "N/A"; + + $this->torrentDisplayName = $this->torrentName; + if(strlen($this->torrentDisplayName) > 50) + { + $this->torrentDisplayName = substr($this->torrentDisplayName,0,50)."..."; + } + + } + } + + } + + function cleanLine($stringIn,$tags='') + { + if(empty($tags)) + return trim(str_replace(array(" "," ")," ",strip_tags($stringIn))); + else + return trim(str_replace(array(" "," ")," ",strip_tags($stringIn,$tags))); + } + + //---------------------------------------------------------------- + // Function to build output for the table. + function BuildOutput($bg, $searchURL) + { + $output = "\n"; + $output .= " torrentFile."\">torrentName."\" border=0>\n"; + $output .= " torrentFile."\" title=\"".$this->torrentName."\">".$this->torrentDisplayName."\n"; + + if (strlen($this->MainCategory) > 1){ + if (strlen($this->SubCategory) > 1){ + $mainGenre = "MainId."\">".$this->MainCategory.""; + $subGenre = "SubId."\">".$this->SubCategory.""; + $genre = $mainGenre."-".$subGenre; + }else{ + $genre = "MainId."\">".$this->MainCategory.""; + } + }else{ + $genre = "SubId."\">".$this->SubCategory.""; + } + + $output .= " ". $genre ."\n"; + + $output .= " ".$this->torrentSize."\n"; + $output .= " ".$this->dateAdded."\n"; + $output .= " ".$this->Seeds."\n"; + $output .= " ".$this->Peers."\n"; + $output .= "\n"; + + return $output; + + } + } + + ?> + --- torrentflux-2.3.orig/html/searchEngines/TorrentSpyEngine.php +++ torrentflux-2.3/html/searchEngines/TorrentSpyEngine.php @@ -1,540 +1,1082 @@ mainURL = "torrentspy.com"; + $this->altURL = "www.torrentspy.com"; + $this->mainTitle = "TorrentSpy"; + $this->engineName = "TorrentSpy"; + + $this->author = "kboy"; + $this->version = "1.04"; + $this->updateURL = "http://www.torrentflux.com/forum/index.php/topic,874.0.html"; + $this->Initialize($cfg); + } + + function populateMainCategories() + { + + $this->mainCatalog["11"] = "Adult"; + $this->mainCatalog["6"] = "Anime"; + $this->mainCatalog["1"] = "Applications"; + $this->mainCatalog["2"] = "Games"; + $this->mainCatalog["13"] = "Handheld"; + $this->mainCatalog["7"] = "Hentai"; + $this->mainCatalog["8"] = "Linux"; + $this->mainCatalog["9"] = "Macintosh"; + $this->mainCatalog["10"] = "Misc"; + $this->mainCatalog["3"] = "Music"; + $this->mainCatalog["14"] = "Non-English"; + $this->mainCatalog["12"] = "Unsorted/Other"; + $this->mainCatalog["4"] = "Videos"; + + } + + //---------------------------------------------------------------- + // Function to Get Sub Categories + function getSubCategories($mainGenre) + { + $output = array(); + + if (strpos($mainGenre,'/')) + { + $request = '/directory/' . $mainGenre; + } + else + { + $request = '/directory.asp?mode=main&id=' . $mainGenre; + } + + $mainGenreName = $this->GetMainCatName($mainGenre); + + if ($this->makeRequest($request)) + { + $thing = $this->htmlPage; + + while (is_integer(strpos($thing,"href=\"/directory/"))) + { + + $thing = substr($thing,strpos($thing,"href=\"/directory/")+strlen("href=\"/directory/")); + $tmpStr = str_replace(array("%2f","+")," ",substr($thing,0,strpos($thing,"\""))); + $tmpStr = str_replace("%2d","-",$tmpStr); + $subid = $tmpStr; + $thing = substr($thing,strpos($thing,">")+strlen(">")); + $subname = trim(substr($thing,0,strpos($thing,"<"))); + + if($subname != $mainGenreName) + { + $output[$subid] = $subname; + } + + } + } + + return $output; + } + + //---------------------------------------------------------------- + // Function to Make the Request (overriding base) + function makeRequest($request) + { + if (strpos($request,"search.asp")) + { + return parent::makeRequest($request, true); + } + else + { + return parent::makeRequest($request, false); + } + } + + //---------------------------------------------------------------- + // Function to get Latest.. + function getLatest() + { + $request = '/latest.asp'; + + // Added mode to support yesterday request. + if (array_key_exists("mode",$_REQUEST)) + { + $request .='?mode='.$_REQUEST["mode"]; + if (array_key_exists("id",$_REQUEST)) + { + $request .= '&id=' . $_REQUEST["id"]; + } + if (!empty($this->pg)) + { + $request .= '&pg=' . $this->pg; + } + } + elseif (array_key_exists("subGenre",$_REQUEST)) + { + if (strpos($_REQUEST["subGenre"],"/")>0) + { + $request ='/directory.asp?mode=sub&id=' . substr($_REQUEST["subGenre"],0,strpos($_REQUEST["subGenre"],"/")); + } + else + { + $request ='/directory.asp?mode=sub&id=' . $_REQUEST["subGenre"]; + } + + if (!empty($this->pg)) + { + $request .= '&pg=' . $this->pg; + } + } + elseif (!empty($this->pg)) + { + $request .= '?pg=' . $this->pg; + } + + if ($this->makeRequest($request)) + { + return $this->parseResponse(); + } + else + { + return $this->msg; + } + } + + //---------------------------------------------------------------- + // Function to perform Search. + function performSearch($searchTerm) + { + if (array_key_exists("directory",$_REQUEST)) + { + $request = "/directory/" . str_replace("%2F","/",urlencode($_REQUEST["directory"])); + if (!empty($this->pg)) + { + $request .= "?pg=" . $this->pg; + } + } + elseif (array_key_exists("getMain",$_REQUEST)) + { + $request = '/directory'; + } + elseif (array_key_exists("mainGenre",$_REQUEST)) + { + if (strpos($_REQUEST["mainGenre"],'/')) + { + $request .= '/' . $_REQUEST["mainGenre"]; + } + else + { + if (!empty($this->pg)) + { + $request = '/directory.asp?mode=main&id=' . $_REQUEST["mainGenre"] . '&pg=' . $this->pg; + } + else + { + $request = '/directory.asp?mode=main&id=' . $_REQUEST["mainGenre"]; + } + } + } + elseif (array_key_exists("subGenre",$_REQUEST)) + { + if (strpos($_REQUEST["subGenre"],'/')) + { + $request = "/directory/" . $_REQUEST["subGenre"]; + } + else + { + if ($_REQUEST["subGenre"] != "") + { + if (!empty($this->pg)) + { + $request = '/directory.asp?mode=sub&id=' . $_REQUEST["subGenre"] . '&pg=' . $this->pg; + } + else + { + $request = '/directory.asp?mode=sub&id=' . $_REQUEST["subGenre"]; + } + } + } + } + else + { + $searchTerm = str_replace(" ", "+", $searchTerm); + + if ( $this->pg != '' && array_key_exists("db",$_REQUEST)) + { + $request = '/search.asp?h=&query=' . $searchTerm . '&pg=' . $this->pg . '&db=' . $_REQUEST["db"] . '&submit.x=24&submit.y=10'; + } + else + { + $request = '/search.asp?h=&query=' . $searchTerm . '&submit.x=24&submit.y=10'; + } + } + + if ($this->makeRequest($request)) + { + return $this->parseResponse(); + } + else + { + return $this->msg; + } + } + + //---------------------------------------------------------------- + // Function to parse the response. + function parseResponse() + { + $output = $this->tableHeader(); + + $thing = $this->htmlPage; + + if (strpos($thing, "experiencing high load") > 0) + { + $output .= "We're experiencing high load at this time. Please use the directory until further notice."; + }else{ + // We got a response so display it. + // Chop the front end off. + while (is_integer(strpos($thing,">Health<"))) + { + $thing = substr($thing,strpos($thing,">Health<")); + $thing = substr($thing,strpos($thing,"")); + // ok so now we have the listing. + $tmpListArr = split("",$tmpList); + + $langFile = _FILE; + + $bg = $this->cfg["bgLight"]; + + foreach($tmpListArr as $key =>$value) + { + $buildLine = true; + if (strpos($value,"/torrent/")) + { + $ts = new tSpy($value); + + // Determine if we should build this output + if (is_int(array_search($ts->MainCategory,$this->catFilter))) + { + $buildLine = false; + } + + if ($this->hideSeedless == "yes") + { + if($ts->Seeds == "N/A" || $ts->Seeds == "0") + { + $buildLine = false; + } + } + + if (!empty($ts->torrentFile) && $buildLine) { + + $output .= trim($ts->BuildOutput($bg,$langFile,$this->searchURL())); + + // ok switch colors. + if ($bg == $this->cfg["bgLight"]) + { + $bg = $this->cfg["bgDark"]; + } + else + { + $bg = $this->cfg["bgLight"]; + } + } + + } + } + // set thing to end of this table. + $thing = substr($thing,strpos($thing,"")); + } + } + + $output .= ""; + + // is there paging at the bottom? + if (strpos($thing, "

Pages (") !== false) + { + // Yes, then lets grab it and display it! ;) + $thing = substr($thing,strpos($thing,"

Pages (")+strlen("

")); + $pages = substr($thing,0,strpos($thing,"

")); + $page1 = substr($pages,0,strpos($pages,"')+1); + $pages = $page1.$page2; + + if (strpos($pages,"directory")) + { + $pages = str_replace("?","&",$pages); + $pages = str_replace("/directory/", $this->searchURL()."&directory=", $pages); + } + elseif (strpos($pages, "search.asp?")) + { + $pages = str_replace("search.asp?", $this->searchURL()."&", $pages); + } + elseif (strpos($pages, "/search/")) + { + $pages = str_replace("&","&",$pages); + $pages = str_replace("?","&",$pages); + $pages = str_replace("/search/", $this->searchURL()."&searchterm=", $pages); + } + elseif (strpos($pages,"latest.asp?")) + { + $pages = str_replace("latest.asp?mode=", $this->searchURL()."&LATEST=1&mode=", $pages); + if (!array_key_exists("mode",$_REQUEST)) + { + $pages .= "
searchURL()."&LATEST=1&mode=yesterday\" title=\"Yesterday's Latest\">Yesterday's Latest"; + } + elseif (! $_REQUEST["mode"] == "yesterday") + { + $pages .= "
searchURL()."&LATEST=1&mode=yesterday\" title=\"Yesterday's Latest\">Yesterday's Latest"; + } + else + { + $pages .= "
Yesterday's Latest"; + } + } + + $output .= "
".$pages."

"; + } + elseif(array_key_exists("LATEST",$_REQUEST)) + { + $pages = ''; + if (!array_key_exists("mode",$_REQUEST)) + { + $pages .= "
searchURL()."&LATEST=1&mode=yesterday\" title=\"Yesterday's Latest\">Yesterday's Latest"; + } + elseif (! $_REQUEST["mode"] == "yesterday") + { + $pages .= "
searchURL()."&LATEST=1&mode=yesterday\" title=\"Yesterday's Latest\">Yesterday's Latest"; + } + else + { + $pages .= "
Yesterday's Latest"; + } + + $output .= "
".$pages."

"; + } + + return $output; + } + } + + // This is a worker class that takes in a row in a table and parses it. + class tSpy + { + var $torrentName = ""; + var $torrentDisplayName = ""; + var $torrentFile = ""; + var $torrentStatus = ""; + var $MainId = ""; + var $MainCategory = ""; + var $SubId = ""; + var $SubCategory = ""; + var $torrentSize = ""; + var $fileCount = ""; + var $Seeds = ""; + var $Peers = ""; + var $Data = ""; + + function tSpy( $htmlLine ) + { + if (strlen($htmlLine) > 0) + { + + $this->Data = $htmlLine; + + // Chunck up the row into columns. + $tmpListArr = split("",$htmlLine); + + if(count($tmpListArr) > 5) + { + //$tmpListArr["0"]; // Torrent Name, Download Link, Status + + $this->torrentDisplayName = $this->cleanLine($tmpListArr["0"]); // TorrentName + + $tmpStr = substr($tmpListArr["0"],strpos($tmpListArr["0"],"/torrent/")+strlen("/torrent/")); // Download Link + $this->torrentFile = "http://www.torrentspy.com/download.asp?id=" . substr($tmpStr,0,strpos($tmpStr,"/")); + + $tmpStatus = substr($tmpStr,strpos($tmpStr,"title=\"")+strlen("title=\"")); + $tmpStatus = substr($tmpStatus,0,strpos($tmpStatus,">")); + + if (strpos($tmpStatus,"password")) + { + $this->torrentStatus = "P"; + }elseif (strpos($tmpStatus,"register")) + { + $this->torrentStatus = "R"; + } + + $tmpStr = substr($tmpStr,strpos($tmpStr,">")+strlen(">")); + + if(strpos($tmpStr,"/torrent/") > 0) + { + $tmpStr = substr($tmpStr,strpos($tmpStr,"/torrent/")+strlen("/torrent/")); + } + + $tmpStr = substr($tmpStr,strpos($tmpStr,"title=\"")+strlen("title=\"")); + $this->torrentName = substr($tmpStr,0,strpos($tmpStr,"\"")); + + $tmpStr = $tmpListArr["1"]; // Categories + if(strpos($tmpStr,"mode=")){ + $tmpStr = substr($tmpStr,strpos($tmpStr,"mode=main&id=")+strlen("mode=main&id=")); + $this->MainId = substr($tmpStr,0,strpos($tmpStr,"\"")); + }else{ + $tmpStr = substr($tmpStr,strpos($tmpStr,"/directory/")+strlen("/directory/")); + $this->MainId = substr($tmpStr,0,strpos($tmpStr,"/")); + } + $tmpStr = substr($tmpStr,strpos($tmpStr,"title=\"")+strlen("title=\"")); + $this->MainCategory = substr($tmpStr,0,strpos($tmpStr,"\"")); + + if(strpos($tmpStr,"mode=")){ + $tmpStr = substr($tmpStr,strpos($tmpStr,"mode=sub&id=")+strlen("mode=sub&id=")); + $this->SubId = substr($tmpStr,0,strpos($tmpStr,"\"")); + }else{ + $tmpStr = substr($tmpStr,strpos($tmpStr,"/directory/")+strlen("/directory/")); + $this->SubId = substr($tmpStr,0,strpos($tmpStr,"/")); + } + $tmpStr = substr($tmpStr,strpos($tmpStr,"title=\"")+strlen("title=\"")); + $this->SubCategory = substr($tmpStr,0,strpos($tmpStr,"\"")); + + $this->torrentSize = $this->cleanLine($tmpListArr["2"]); // Size of File + $this->fileCount = $this->cleanLine($tmpListArr["3"]); // File Count + $this->Seeds = $this->cleanLine($tmpListArr["4"]); // Seeds + $this->Peers = $this->cleanLine($tmpListArr["5"]); // Peers + //$tmpListArr["6"] = $this->cleanLine($tmpListArr["6"]); // Health + + if ($this->Peers == '') + { + $this->Peers = "N/A"; + if (empty($this->Seeds)) $this->Seeds = "N/A"; + } + if ($this->Seeds == '') $this->Seeds = "N/A"; + + if(strlen($this->torrentDisplayName) > 50) + { + $this->torrentDisplayName = substr($this->torrentDisplayName,0,50)."..."; + } + + } + } + + } + + function cleanLine($stringIn,$tags='') + { + if(empty($tags)) + return trim(str_replace(array(" "," ")," ",strip_tags($stringIn))); + else + return trim(str_replace(array(" "," ")," ",strip_tags($stringIn,$tags))); + } + + //---------------------------------------------------------------- + // Function to build output for the table. + function BuildOutput($bg,$langFILE, $searchURL = '') + { + $output = "\n"; + $output .= " torrentFile."\">torrentName." - ".$this->fileCount." ".$langFILE."\" border=0>\n"; + $output .= " torrentFile."\" title=\"".$this->torrentName."\">".$this->torrentDisplayName.""; + switch ($this->torrentStatus) + { + case "R": + $output .= " R"; + break; + case "P": + $output .= " P"; + break; + } + $output .= "\n"; + + if (strlen($this->MainCategory) > 1){ + if (strlen($this->SubCategory) > 1){ + $mainGenre = "MainId."\">".$this->MainCategory.""; + $subGenre = "SubId."\">".$this->SubCategory.""; + $genre = $mainGenre."-".$subGenre; + }else{ + $genre = "MainId."\">".$this->MainCategory.""; + } + }else{ + $genre = "SubId."\">".$this->SubCategory.""; + } + + $output .= " ". $genre ."\n"; + $output .= " ".$this->torrentSize."\n"; + $output .= " ".$this->Seeds."\n"; + $output .= " ".$this->Peers."\n"; + $output .= "\n"; + + return $output; + + } + } + + ?> + --- torrentflux-2.3.orig/html/searchEngines/DemonoidEngine.php +++ torrentflux-2.3/html/searchEngines/DemonoidEngine.php @@ -0,0 +1,2182 @@ +mainURL = "www.demonoid.com"; + + + $this->altURL = "www.demonoid.com"; + + + $this->mainTitle = "Demonoid"; + + + $this->engineName = "Demonoid"; + + + + + + $this->author = "moldavite"; + + + $this->version = "1.06"; + + + $this->updateURL = "http://www.torrentflux.com/forum/index.php/topic,1210.0.html"; + + + + + + $this->Initialize($cfg); + + + } + + + + + + function populateMainCategories() + + + { + + + $this->mainCatalog["0"] = "(all types)"; + + + $this->mainCatalog["9"] = "Anime"; + + + $this->mainCatalog["5"] = "Applications"; + + + $this->mainCatalog["17"] = "Audio Books"; + + + $this->mainCatalog["11"] = "Books"; + + + $this->mainCatalog["10"] = "Comics"; + + + $this->mainCatalog["4"] = "Games"; + + + $this->mainCatalog["6"] = "Misc"; + + + $this->mainCatalog["1"] = "Movies"; + + + $this->mainCatalog["2"] = "Music"; + + + $this->mainCatalog["13"] = "Music Videos"; + + + $this->mainCatalog["8"] = "Pictures"; + + + $this->mainCatalog["3"] = "TV"; + + + } + + + + + + //---------------------------------------------------------------- + + + // Function to Get Sub Categories + + + function getSubCategories($mainGenre) + + + { + + + $output = array(); + + + + + + switch ($mainGenre) + + + { + + + case "1" : + + + $output["1:ALL"] = "All"; + + + $output["1:6"] = "Action"; + + + $output["1:7"] = "Adventure"; + + + $output["1:8"] = "Animation"; + + + $output["1:9"] = "Biography"; + + + $output["1:10"] = "Comedy"; + + + $output["1:180"] = "Concerts"; + + + $output["1:181"] = "Crime"; + + + $output["1:11"] = "Documentary"; + + + $output["1:12"] = "Drama"; + + + $output["1:13"] = "Family"; + + + $output["1:14"] = "Fantasy"; + + + $output["1:15"] = "Film-Noir"; + + + $output["1:17"] = "Horror"; + + + $output["1:18"] = "Musical"; + + + $output["1:19"] = "Mystery"; + + + $output["1:65"] = "Other"; + + + $output["1:20"] = "Romance"; + + + $output["1:21"] = "Sci-Fi"; + + + $output["1:22"] = "Short film"; + + + $output["1:23"] = "Sports"; + + + $output["1:24"] = "Thriller"; + + + $output["1:182"] = "Trailers"; + + + $output["1:25"] = "War"; + + + $output["1:26"] = "Western"; + + + break; + + + case "2" : + + + $output["2:All"] = "All"; + + + $output["2:183"] = "Alternative"; + + + $output["2:34"] = "Blues"; + + + $output["2:185"] = "Christian"; + + + $output["2:27"] = "Classical"; + + + $output["2:186"] = "Comedy"; + + + $output["2:44"] = "Contemporary African"; + + + $output["2:36"] = "Country"; + + + $output["2:39"] = "Dance / Disco"; + + + $output["2:37"] = "Electro / Techno"; + + + $output["2:28"] = "Gospel"; + + + $output["2:43"] = "Hip-Hop / Rap"; + + + $output["2:38"] = "Industrial"; + + + $output["2:184"] = "J-Pop"; + + + $output["2:29"] = "Jazz"; + + + $output["2:30"] = "Latin American"; + + + $output["2:40"] = "Melodic"; + + + $output["2:35"] = "Metal"; + + + $output["2:63"] = "Other"; + + + $output["2:31"] = "Pop"; + + + $output["2:42"] = "Punk"; + + + $output["2:41"] = "Reggae"; + + + $output["2:33"] = "Rhythm and blues"; + + + $output["2:32"] = "Rock"; + + + $output["2:188"] = "Soul"; + + + $output["2:190"] = "Soundtrack"; + + + $output["2:191"] = "Trance"; + + + break; + + + case "3" : + + + $output["3:All"] = "All"; + + + $output["3:192"] = "Action"; + + + $output["3:193"] = "Adventure"; + + + $output["3:194"] = "Animation"; + + + $output["3:195"] = "Biography"; + + + $output["3:196"] = "Comedy"; + + + $output["3:213"] = "Concerts"; + + + $output["3:214"] = "Crime"; + + + $output["3:197"] = "Documentary"; + + + $output["3:198"] = "Drama"; + + + $output["3:199"] = "Family"; + + + $output["3:200"] = "Fantasy"; + + + $output["3:201"] = "Film-Noir"; + + + $output["3:203"] = "Horror"; + + + $output["3:202"] = "Musical"; + + + $output["3:204"] = "Mystery"; + + + $output["3:212"] = "Other"; + + + $output["3:205"] = "Romance"; + + + $output["3:206"] = "Sci-Fi"; + + + $output["3:207"] = "Short film"; + + + $output["3:208"] = "Sports"; + + + $output["3:259"] = "Talk show"; + + + $output["3:209"] = "Thriller"; + + + $output["3:215"] = "Trailers"; + + + $output["3:210"] = "War"; + + + $output["3:211"] = "Western"; + + + break; + + + case "4" : + + + $output["4:All"] = "All"; + + + $output["4:177"] = "DOS"; + + + $output["4:176"] = "Dreamcast"; + + + $output["4:178"] = "Emulators"; + + + $output["4:167"] = "GameBoy"; + + + $output["4:175"] = "GameCube"; + + + $output["4:162"] = "Linux"; + + + $output["4:163"] = "Macintosh"; + + + $output["4:168"] = "Mobile phone"; + + + $output["4:261"] = "Nintendo DS"; + + + $output["4:164"] = "Palm"; + + + $output["4:170"] = "Playstation 1"; + + + $output["4:171"] = "Playstation 2"; + + + $output["4:172"] = "Playstation 3"; + + + $output["4:165"] = "PocketPC"; + + + $output["4:169"] = "PSP"; + + + $output["4:166"] = "Windows"; + + + $output["4:173"] = "XBox"; + + + $output["4:174"] = "XBox 360"; + + + break; + + + case "5" : + + + $output["5:All"] = "All"; + + + $output["5:2"] = "Linux"; + + + $output["5:3"] = "Macintosh"; + + + $output["5:118"] = "Mobile phone"; + + + $output["5:5"] = "Palm"; + + + $output["5:4"] = "PocketPC"; + + + $output["5:1"] = "Windows"; + + + break; + + + case "6" : + + + $output["6:All"] = "All"; + + + break; + + + case "8" : + + + $output["8:All"] = "All"; + + + $output["8:66"] = "Art"; + + + $output["8:67"] = "Commercial"; + + + $output["8:69"] = "Glamour"; + + + $output["8:73"] = "Other"; + + + $output["8:68"] = "Photojournalism"; + + + $output["8:70"] = "Snapshots"; + + + $output["8:71"] = "Sports"; + + + $output["8:72"] = "Wildlife"; + + + break; + + + case "9" : + + + $output["9:All"] = "All"; + + + $output["9:111"] = "Action"; + + + $output["9:220"] = "Adventure"; + + + $output["9:112"] = "Comedy"; + + + $output["9:113"] = "Drama"; + + + $output["9:114"] = "Fantasy"; + + + $output["9:115"] = "Horror"; + + + $output["9:221"] = "Other"; + + + $output["9:117"] = "Romance"; + + + $output["9:116"] = "Sci-Fi"; + + + + + + break; + + + case "10" : + + + $output["10:All"] = "All"; + + + $output["10:159"] = "Action / Adventure"; + + + $output["10:227"] = "Crime"; + + + $output["10:160"] = "Drama"; + + + $output["10:223"] = "Fantasy"; + + + $output["10:228"] = "Historical fiction"; + + + $output["10:224"] = "Horror"; + + + $output["10:161"] = "Illustrated novel"; + + + $output["10:229"] = "Other"; + + + $output["10:226"] = "Real-Life"; + + + $output["10:225"] = "Sci-Fi"; + + + $output["10:222"] = "Super Hero"; + + + break; + + + case "11" : + + + $output["11:All"] = "All"; + + + $output["11:119"] = "Action"; + + + $output["11:120"] = "Adventure"; + + + $output["11:122"] = "Childrens"; + + + $output["11:137"] = "Computers"; + + + $output["11:123"] = "Contemporary"; + + + $output["11:124"] = "Fantasy"; + + + $output["11:125"] = "General"; + + + $output["11:126"] = "Horror"; + + + $output["11:127"] = "Humor"; + + + $output["11:128"] = "Literary"; + + + $output["11:129"] = "Mainstream"; + + + $output["11:138"] = "Misc. Educational"; + + + $output["11:130"] = "Mystery"; + + + $output["11:230"] = "Other"; + + + $output["11:131"] = "Paranormal"; + + + $output["11:132"] = "Romance"; + + + $output["11:260"] = "RPG"; + + + $output["11:133"] = "Sci-Fi"; + + + $output["11:121"] = "Self-help"; + + + $output["11:134"] = "Suspense"; + + + $output["11:135"] = "Thriller"; + + + $output["11:136"] = "Western"; + + + break; + + + case "13" : + + + $output["13:All"] = "All"; + + + $output["13:251"] = "Alternative"; + + + $output["13:239"] = "Blues"; + + + $output["13:253"] = "Christian"; + + + $output["13:232"] = "Classical"; + + + $output["13:254"] = "Comedy"; + + + $output["13:249"] = "Contemporary African"; + + + $output["13:241"] = "Country"; + + + $output["13:244"] = "Dance / Disco"; + + + $output["13:242"] = "Electro / Techno"; + + + $output["13:233"] = "Gospel"; + + + $output["13:248"] = "Hip-Hop / Rap"; + + + $output["13:243"] = "Industrial"; + + + $output["13:252"] = "J-Pop"; + + + $output["13:234"] = "Jazz"; + + + $output["13:235"] = "Latin American"; + + + $output["13:245"] = "Melodic"; + + + $output["13:240"] = "Metal"; + + + $output["13:250"] = "Other"; + + + $output["13:236"] = "Pop"; + + + $output["13:247"] = "Punk"; + + + $output["13:246"] = "Reggae"; + + + $output["13:256"] = "Reggae"; + + + $output["13:238"] = "Rhythm and blues"; + + + $output["13:237"] = "Rock"; + + + $output["13:255"] = "Soul"; + + + $output["13:257"] = "Soundtrack"; + + + $output["13:258"] = "Trance"; + + + break; + + + case "17" : + + + $output["17:All"] = "All"; + + + $output["17:140"] = "Action"; + + + $output["17:139"] = "Adventure"; + + + $output["17:142"] = "Childrens"; + + + $output["17:157"] = "Computers"; + + + $output["17:143"] = "Contemporary"; + + + $output["17:144"] = "Fantasy"; + + + $output["17:145"] = "General"; + + + $output["17:146"] = "Horror"; + + + $output["17:147"] = "Humor"; + + + $output["17:148"] = "Literary"; + + + $output["17:149"] = "Mainstream"; + + + $output["17:158"] = "Misc. Educational"; + + + $output["17:150"] = "Mystery"; + + + $output["17:231"] = "Other"; + + + $output["17:151"] = "Paranormal"; + + + $output["17:152"] = "Romance"; + + + $output["17:153"] = "Sci-Fi"; + + + $output["17:141"] = "Self-help"; + + + $output["17:154"] = "Suspense"; + + + $output["17:155"] = "Thriller"; + + + $output["17:156"] = "Western"; + + + break; + + + } + + + + + + return $output; + + + + + + } + + + + + + //---------------------------------------------------------------- + + + // Function to Make the Request (overriding base) + + + function makeRequest($request) + + + { + + + return parent::makeRequest($request, false); + + + } + + + + + + //---------------------------------------------------------------- + + + // Function to get Latest.. + + + function getLatest() + + + { + + + $request = '/files/'; + + + + + + if (array_key_exists("mainGenre",$_REQUEST) && array_key_exists("subGenre",$_REQUEST)) + + + { + + + $request = "/files/?category=".$_REQUEST["mainGenre"]."&subcategory=".$_REQUEST["subGenre"]."&language=0&seeded=0&external=2&query=&uid=0"; + + + + + + } + + + elseif (array_key_exists("subGenre",$_REQUEST)) + + + { + + + $splitted = explode(":", $_REQUEST['subGenre']); + + + $request = "/files/?category=".$splitted[0]."&subcategory=".$splitted[1]."&language=0&seeded=0&external=2&query=&uid=0"; + + + + + + } + + + else + + + { + + + $request = "/files/"; + + + + + + } + + + + + + if (!empty($this->pg)) + + + { + + + if(strpos($request,"?")) + + + { + + + $request .= "&page=" . $this->pg; + + + } + + + else + + + { + + + $request .= "?page=" . $this->pg; + + + } + + + } + + + + + + + + + if ($this->makeRequest($request)) + + + { + + + return $this->parseResponse(); + + + } + + + else + + + { + + + return $this->msg; + + + } + + + } + + + + + + //---------------------------------------------------------------- + + + // Function to perform Search. + + + function performSearch($searchTerm) + + + { + + + if (array_key_exists("mainGenre",$_REQUEST) && array_key_exists("subGenre",$_REQUEST)) + + + { + + + $request = "/files/?category=".$_REQUEST['mainGenre']."&subcategory=".$_REQUEST["subGenre"]."&language=0&seeded=0&external=2&query=&uid=0"; + + + + + + } + + + // elseif (array_key_exists("mainGenre",$_REQUEST)) + + + // { + + + // $request = "/torrents/?category=".$_REQUEST["mainGenre"]."&subcategory=All&language=0&seeded=0&external=2&query=&uid=0"; + + + + + + // } + + + else + + + { + + + $request = "/files/?query=".$searchTerm; + + + + + + } + + + + + + if(strlen($searchTerm) > 0) + + + { + + + $searchTerm = str_replace(" ", "+", $searchTerm); + + + } + + + + + + if (!empty($this->pg)) + + + { + + + $request .= "&page=" . $this->pg; + + + } + + + + + + if ($this->makeRequest($request)) + + + { + + + return $this->parseResponse(); + + + } + + + else + + + { + + + return $this->msg; + + + } + + + } + + + + + + //---------------------------------------------------------------- + + + // Override the base to show custom table header. + + + // Function to setup the table header + + + function tableHeader() + + + { + + + $output = ""; + + + + + + $output .= "
\n"; + + + + + //v1.05 Update Starts here + + + if (is_integer(strpos($this->htmlPage,"class=user_box>"))) + + + { + + + $userinfo = substr($this->htmlPage,strpos($this->htmlPage,"")); + + + $userinfo = substr($userinfo,strpos($userinfo,"
")+strlen("
")); + + + $userinfo = str_replace("","",$userinfo); + + + $userinfo = str_replace("","",$userinfo); + + + $userinfo = str_replace("
","",$userinfo); + + + $output .= "cfg["table_header_bg"]."\">"; + + + $output .= ""; + + + } + + + //v1.05 Update Ends here + + + + + + $output .= "cfg["table_header_bg"]."\">"; + + + $output .= " "; + + + $output .= " "; + + + $output .= " "; + + + $output .= " "; + + + $output .= " "; + + + $output .= " "; + + + $output .= "\n"; + + + + + + return $output; + + + } + + + + + + //---------------------------------------------------------------- + + + // Function to parse the response. + + + function parseResponse() + + + { + + + + + + $output = $this->tableHeader(); + + + + + + if (is_integer(strpos($this->htmlPage,"class=\"added_today\">"))) + + + { + + + $dateheader = substr($this->htmlPage,strpos($this->htmlPage,"")); + + + $output .= "\n"; + + + } + + + + + + $thing = $this->htmlPage; + + + + + $thing = str_replace("","")); + + + + + + $tmplist = substr($thing,0,strpos($thing,"",$tmplist); + + + $bg = $this->cfg["bgLight"]; + + + foreach($tmpListArr as $key =>$value) + + + { + + + + + + $buildLine = true; + + + if (strpos($value,"www.demonoid.com")) + + + { + + + + + + $ts = new dmnd($value); + + + + + + // Determine if we should build this output + + + if (is_int(array_search($ts->MainId,$this->catFilter))) + + + { + + + $buildLine = false; + + + } + + + + + + if ($this->hideSeedless == "yes") + + + { + + + if($ts->Seeds == "N/A" || $ts->Seeds == "0") + + + { + + + $buildLine = false; + + + } + + + } + + + + + + if (!empty($ts->torrentFile) && $buildLine) { + + + + + + $output .= trim($ts->BuildOutput($bg, $this->searchURL())); + + + + + + // ok switch colors. + + + if ($bg == $this->cfg["bgLight"]) + + + { + + + $bg = $this->cfg["bgDark"]; + + + } + + + else + + + { + + + $bg = $this->cfg["bgLight"]; + + + } + + + } + + + + + + } + + + } + + + } + + + + + + $output .= "
")+strlen("")); + + + $userinfo = substr($userinfo,0,strpos($userinfo,"
".$userinfo."
 Torrent Name  ("; + + + + + + $tmpURI = str_replace(array("?hideSeedless=yes","&hideSeedless=yes","?hideSeedless=no","&hideSeedless=no"),"",$_SERVER["REQUEST_URI"]); + + + + + + //Check to see if Question mark is there. + + + if (strpos($tmpURI,'?')) + + + { + + + $tmpURI .= "&"; + + + } + + + else + + + { + + + $tmpURI .= "?"; + + + } + + + + + + if($this->hideSeedless == "yes") + + + { + + + $output .= "Show Seedless"; + + + } + + + else + + + { + + + $output .= "Hide Seedless"; + + + } + + + + + + $output .= ")Category  SizeSeedsPeers
")+strlen("")); + + + $dateheader = substr($dateheader,0,strpos($dateheader,"
".$dateheader."
",$thing); + + + $thing = substr($thing,strpos($thing,"
"; + + + + + + // is there paging at the bottom? + + + if (strpos($thing, "&page=") != false) + + + + + + { + + + // Yes, then lets grab it and display it! ;) + + + $thing = substr($thing,strpos($thing,"")+1); + + + $pages = substr($thing,0,strpos($thing,"")); + + + + + + if(strpos($this->curRequest,"LATEST")) + + + { + + + + + + $pages = str_replace("http://www.demonoid.com/files/?",$this->searchURL()."&LATEST=1&",$pages); + + + + + + } + + + else + + + { + + + + + + $pages = str_replace("http://www.demonoid.com/files/?",$this->searchURL()."&",$pages); + + + } + + + + + + $pages = str_replace("page=","pg=",$pages); + + + $pages = str_replace("subcategory=","subGenre=",$pages); + + + $pages = str_replace("category=","mainGenre=",$pages); + + + $pages = str_replace("&&","&",$pages); + + + + + + $output .= "
".$pages."
"; + + + } + + + + + + return $output; + + + } + + +} + + + + + + + + +// This is a worker class that takes in a row in a table and parses it. + + +class dmnd + + +{ + + + var $torrentName = ""; + + + var $torrentDisplayName = ""; + + + var $torrentFile = ""; + + + var $torrentSize = ""; + + + var $torrentStatus = ""; + + + var $CatName = ""; + + + var $CatId = ""; + + + var $MainId = ""; + + + var $MainCategory = ""; + + + var $SubId = ""; + + + var $SubCategory = ""; + + + var $Seeds = ""; + + + var $Peers = ""; + + + var $Data = ""; + + + + + + var $dateAdded = ""; + + + var $dwnldCount = ""; + + + + + + + + + function dmnd( $htmlLine ) + + + { + + + if (strlen($htmlLine) > 0) + + + { + + + $this->Data = $htmlLine; + + + $tmpListArr = explode("",$htmlLine); + + + + + + if(count($tmpListArr) >= 13) + + + { + + + + + + // Category Id + + + $tmpStr = ""; + + + $tmpStr = substr($tmpListArr["0"],strpos($tmpListArr["0"],"category=")+strlen("category=")); + + + $this->CatId = substr($tmpStr,0,strpos($tmpStr,"&")); + + + + + + //Category Name + + + $tmpStr = ""; + + + $tmpStr = substr($tmpListArr["0"],strpos($tmpListArr["0"],"title=\"")+strlen("title=\"")); + + + $this->CatName = substr($tmpStr,0,strpos($tmpStr,"\"")); + + + + + + //SubCategory ID + + + $tmpStr = ""; + + + $tmpStr = substr($tmpListArr["2"],strpos($tmpListArr["2"],"subcategory=")+strlen("subcategory=")); + + + $this->SubId = substr($tmpStr,0,strpos($tmpStr,"&")); + + + + + + //SubCategory Name + + + $tmpStr = ""; + + + $tmpStr = substr($tmpListArr["2"],strpos($tmpListArr["2"],"subcategory\"")+strlen("subcategory\">")); + + + $this->SubCategory = substr($tmpStr,0,strpos($tmpStr,"<")); + + + + + + //validate Subcategory ID + + + if (!is_numeric($this->SubId)){ + + + $this->SubId = "0"; + + + $this->SubCategory = "All"; + + + } + + + + + + //Set Category + + + $this->MainCategory = $this->CatName; + + + $this->MainId = $this->CatId; + + + $this->SubId = $this->CatId.":".$this->SubId; + + + + + + // TorrentName + + + $this->torrentName = $this->cleanLine($tmpListArr["1"]); + + + + + + // Download Link + + + $tmpStr = ""; + + + $tmpStr = substr($tmpListArr["4"],strpos($tmpListArr["4"],"href=\"")+strlen("href=\"")); + + + $this->torrentFile = substr($tmpStr,0,strpos($tmpStr,"\"")); + + + + + + // Size of File + + + $this->torrentSize = $this->cleanLine($tmpListArr["7"]); + + + + + + // Seeds + + + $this->Seeds = $this->cleanLine($tmpListArr["10"]); + + + + + + // Peers + + + $this->Peers = $this->cleanLine($tmpListArr["11"]); + + + + + + if ($this->Peers == '') + + + { + + + $this->Peers = "N/A"; + + + if (empty($this->Seeds)) $this->Seeds = "N/A"; + + + } + + + if ($this->Seeds == '') $this->Seeds = "N/A"; + + + + + + //set torrent display name + + + $this->torrentDisplayName = $this->torrentName; + + + if(strlen($this->torrentDisplayName) > 50) + + + { + + + $this->torrentDisplayName = substr($this->torrentDisplayName,0,50)."..."; + + + } + + + + + + //Check Date. + + + if (!empty($tmpListArr["12"])) { + + + $this->dateAdded = $this->cleanline($tmpListArr["12"]); + + + } + + + + + + } + + + + + + } + + + + + + } + + + + + + function cleanLine($stringIn,$tags='') + + + { + + + if(empty($tags)) + + + return trim(str_replace(array(" "," ")," ",strip_tags($stringIn))); + + + else + + + return trim(str_replace(array(" "," ")," ",strip_tags($stringIn,$tags))); + + + } + + + + + + + + + //---------------------------------------------------------------- + + + // Function to build output for the table. + + + function BuildOutput($bg, $searchURL) + + + { + + + $output = "\n"; + + + $output .= "
torrentFile."\">torrentName."\" border=0>\n"; + + + $output .= " torrentFile."\" title=\"".$this->torrentName."\">".$this->torrentDisplayName."\n"; + + + + + + if (strlen($this->MainCategory) > 1){ + + + if (strlen($this->SubCategory) > 1){ + + + $mainGenre = "MainId."\">".$this->MainCategory.""; + + + $subGenre = "SubId."\">".$this->SubCategory.""; + + + $genre = $mainGenre."-".$subGenre; + + + }else{ + + + $genre = "MainId."\">".$this->MainCategory.""; + + + } + + + }else{ + + + $genre = "SubId."\">".$this->SubCategory.""; + + + } + + + + + + $output .= " ". $genre ."\n"; + + + + + + $output .= " ".$this->torrentSize."\n"; + + + $output .= " ".$this->Seeds."\n"; + + + $output .= " ".$this->Peers."\n"; + + + $output .= "\n"; + + + if (!empty($this->dateAdded)){ + + + $output .= " ".$this->dateAdded."\n"; + + + } + + + + + + return $output; + + + + + + } + + +} + + + + + +?> + + --- torrentflux-2.3.orig/debian/po/templates.pot +++ torrentflux-2.3/debian/po/templates.pot @@ -0,0 +1,52 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: camrdale@gmail.com\n" +"POT-Creation-Date: 2007-03-10 13:29-0800\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: boolean +#. Description +#: ../torrentflux.templates:1001 +msgid "Should ${webserver} be restarted?" +msgstr "" + +#. Type: boolean +#. Description +#: ../torrentflux.templates:1001 +msgid "" +"Remember that in order to activate the new configuration ${webserver} has to " +"be restarted. You can also restart ${webserver} by manually executing invoke-" +"rc.d ${webserver} restart." +msgstr "" + +#. Type: note +#. Description +#: ../torrentflux.templates:2001 +msgid "Upgrading to 2.1 reverts configuration to default" +msgstr "" + +#. Type: note +#. Description +#: ../torrentflux.templates:2001 +msgid "" +"You are upgrading from a pre-2.1 version of torrentflux to a 2.1 or later " +"version. A major change in version 2.1 is that the configuration is now " +"stored in the database. This upgrade will update the database using default " +"values, and any changes you have made to the configuration file /etc/" +"torrentflux/config.php will NOT be used. This file will be saved so that you " +"can reference it later. After the upgrade is complete, you can adjust the " +"settings inside the program by logging in as an admin, and clicking on " +"\"admin\" and then \"settings\"." +msgstr "" --- torrentflux-2.3.orig/debian/po/de.po +++ torrentflux-2.3/debian/po/de.po @@ -0,0 +1,65 @@ +# translation of po-debconf template to German +# This file is distributed under the same license as the torrentflux package. +# Copyright (C): +# +# Matthias Julius , 2007. +msgid "" +msgstr "" +"Project-Id-Version: torrentflux 2.1-7\n" +"Report-Msgid-Bugs-To: camrdale@gmail.com\n" +"POT-Creation-Date: 2007-03-10 13:29-0800\n" +"PO-Revision-Date: 2007-02-23 21:58-0500\n" +"Last-Translator: Matthias Julius \n" +"Language-Team: German \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: KBabel 1.11.4\n" + +#. Type: boolean +#. Description +#: ../torrentflux.templates:1001 +msgid "Should ${webserver} be restarted?" +msgstr "Soll ${webserver} neu gestartet werden?" + +#. Type: boolean +#. Description +#: ../torrentflux.templates:1001 +msgid "" +"Remember that in order to activate the new configuration ${webserver} has to " +"be restarted. You can also restart ${webserver} by manually executing invoke-" +"rc.d ${webserver} restart." +msgstr "" +"Beachten Sie, dass ${webserver} neu gestartet werden muss, um die neue " +"Konfiguration zu aktivieren. Sie kรถnnen ${webserver} auch neu starten, indem " +"Sie ยปinvoke-rc.d ${webserver} restartยซ manuell ausfรผhren." + +#. Type: note +#. Description +#: ../torrentflux.templates:2001 +msgid "Upgrading to 2.1 reverts configuration to default" +msgstr "" +"Das Upgrade auf 2.1 setzt die Konfiguration auf die Voreinstellung zurรผck." + +#. Type: note +#. Description +#: ../torrentflux.templates:2001 +msgid "" +"You are upgrading from a pre-2.1 version of torrentflux to a 2.1 or later " +"version. A major change in version 2.1 is that the configuration is now " +"stored in the database. This upgrade will update the database using default " +"values, and any changes you have made to the configuration file /etc/" +"torrentflux/config.php will NOT be used. This file will be saved so that you " +"can reference it later. After the upgrade is complete, you can adjust the " +"settings inside the program by logging in as an admin, and clicking on " +"\"admin\" and then \"settings\"." +msgstr "" +"Sie fรผhren ein Upgrade von einer Version vor 2.1 von Torrentflux auf Version " +"2.1 oder spรคter durch. Eine bedeutende ร„nderung in Version 2.1 ist, dass die " +"Konfiguration jetzt in der Datenbank gespeichert ist. Dieses Upgrade wird " +"die Datenbank unter Verwendung voreingestellter Werte aktualisieren. " +"Jegliche ร„nderungen, die Sie an der Konfigurationsdatei /etc/torrentflux/" +"config.php vorgenommen haben, werden nicht verwendet. Diese Datei wird " +"gespeichert, sodass Sie sie spรคter referenzieren kรถnnen. Nachdem das Upgrade " +"abgeschlossen ist, kรถnnen Sie die Einstellungen anpassen, indem Sie sich als " +"admin anmelden und dann auf ยปadminยซ und dann ยปsettingsยซ klicken." --- torrentflux-2.3.orig/debian/po/cs.po +++ torrentflux-2.3/debian/po/cs.po @@ -0,0 +1,61 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: torrentflux\n" +"Report-Msgid-Bugs-To: camrdale@gmail.com\n" +"POT-Creation-Date: 2007-03-10 13:29-0800\n" +"PO-Revision-Date: 2006-04-20 21:08+0200\n" +"Last-Translator: Miroslav Kure \n" +"Language-Team: Czech \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: boolean +#. Description +#: ../torrentflux.templates:1001 +msgid "Should ${webserver} be restarted?" +msgstr "Mรก se ${webserver} restartovat?" + +#. Type: boolean +#. Description +#: ../torrentflux.templates:1001 +msgid "" +"Remember that in order to activate the new configuration ${webserver} has to " +"be restarted. You can also restart ${webserver} by manually executing invoke-" +"rc.d ${webserver} restart." +msgstr "" +"Aby se novรฉ nastavenรญ aktivovalo, musรญ se ${webserver} restartovat. " +"${webserver} takรฉ mลฏลพete restartovat ruฤnฤ› pล™รญkazem invoke-rc.d ${webserver} " +"restart." + +#. Type: note +#. Description +#: ../torrentflux.templates:2001 +msgid "Upgrading to 2.1 reverts configuration to default" +msgstr "Pล™echod na verzi 2.1 vrรกtรญ konfiguraci k vรฝchozรญmu nastavenรญ" + +#. Type: note +#. Description +#: ../torrentflux.templates:2001 +msgid "" +"You are upgrading from a pre-2.1 version of torrentflux to a 2.1 or later " +"version. A major change in version 2.1 is that the configuration is now " +"stored in the database. This upgrade will update the database using default " +"values, and any changes you have made to the configuration file /etc/" +"torrentflux/config.php will NOT be used. This file will be saved so that you " +"can reference it later. After the upgrade is complete, you can adjust the " +"settings inside the program by logging in as an admin, and clicking on " +"\"admin\" and then \"settings\"." +msgstr "" +"Pล™echรกzรญte z torrentfluxu starลกรญho neลพ verze 2.1 na verzi 2.1 nebo novฤ›jลกรญ. " +"Velkou zmฤ›nou verze 2.1 je uklรกdรกnรญ konfigurace v databรกzi. Tato aktualizace " +"nastavรญ do databรกze vรฝchozรญ hodnoty, tzn. moลพnรฉ zmฤ›ny ze souboru /etc/" +"torrentflux/config.php NEBUDOU pล™eneseny. Zmรญnฤ›nรฝ soubor bude zachovรกn, " +"abyste se jรญm mohli inspirovat. Po skonฤenรญ aktualizace mลฏลพete upravit " +"nastavenรญ rovnou v programu. Staฤรญ se pล™ihlรกsit jako sprรกvce, kliknout na " +"\"admin\" a potรฉ na \"nastavenรญ\"." --- torrentflux-2.3.orig/debian/po/fr.po +++ torrentflux-2.3/debian/po/fr.po @@ -0,0 +1,62 @@ +# French translation for torrentflux +# Copyright (C) 2006 Qrome http://www.torrentflux.com/contact.php +# +msgid "" +msgstr "" +"Project-Id-Version: torrentflux_2.1-1\n" +"Report-Msgid-Bugs-To: camrdale@gmail.com\n" +"POT-Creation-Date: 2007-03-10 13:29-0800\n" +"PO-Revision-Date: 2006-04-30 19:05+0100\n" +"Last-Translator: Gaetan CRAHAY \n" +"Language-Team: French \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=iso-8859-15\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: boolean +#. Description +#: ../torrentflux.templates:1001 +msgid "Should ${webserver} be restarted?" +msgstr "Faut-il red้marrer ${webserver} ?" + +#. Type: boolean +#. Description +#: ../torrentflux.templates:1001 +msgid "" +"Remember that in order to activate the new configuration ${webserver} has to " +"be restarted. You can also restart ${webserver} by manually executing invoke-" +"rc.d ${webserver} restart." +msgstr "" +"Pour activer la nouvelle configuration, le serveur ${webserver} doit ๊tre " +"red้marr้. Vous pouvez aussi le red้marrer vous-m๊me avec la commande " +"ซ invoke-rc.d ${webserver} restart ป." + +#. Type: note +#. Description +#: ../torrentflux.templates:2001 +msgid "Upgrading to 2.1 reverts configuration to default" +msgstr "Configuration r้initialis้e pour la mise เ niveau vers la version 2.1" + +#. Type: note +#. Description +#: ../torrentflux.templates:2001 +msgid "" +"You are upgrading from a pre-2.1 version of torrentflux to a 2.1 or later " +"version. A major change in version 2.1 is that the configuration is now " +"stored in the database. This upgrade will update the database using default " +"values, and any changes you have made to the configuration file /etc/" +"torrentflux/config.php will NOT be used. This file will be saved so that you " +"can reference it later. After the upgrade is complete, you can adjust the " +"settings inside the program by logging in as an admin, and clicking on " +"\"admin\" and then \"settings\"." +msgstr "" +"Vous mettez เ niveau d'une version ant้rieure เ la 2.1 vers une version 2.1 " +"ou sup้rieure. Depuis la version 2.1, la configuration est stock้e dans la " +"base de donn้es. Cette mise เ niveau va donc mettre เ jour celle-ci en " +"utilisant les valeurs par d้faut. Tous les changements que vous auriez pu " +"effectuer dans le fichier de configuration ซ /etc/torrentflux/config.php ป " +"NE seront PAS utilis้s. Ce fichier sera sauvegard้ pour que vous puissiez " +"ensuite le consulter. Apr่s la mise เ niveau, vous pourrez modifier les " +"param่tres en vous connectant dans le logiciel avec les privil่ges de " +"l'administrateur puis en cliquant sur ซ admin ป et enfin sur " +"ซ settings ป (r้glages)." --- torrentflux-2.3.orig/debian/po/pt.po +++ torrentflux-2.3/debian/po/pt.po @@ -0,0 +1,64 @@ +# Portuguese translation of torrentflux. +# This file is distributed under the same license as the torrentflux package. +# Rui Branco , 2006. +# +# +# +msgid "" +msgstr "" +"Project-Id-Version: torrentflux 2.1-1\n" +"Report-Msgid-Bugs-To: camrdale@gmail.com\n" +"POT-Creation-Date: 2007-03-10 13:29-0800\n" +"PO-Revision-Date: 2006-06-13 18:29+0100\n" +"Last-Translator: Rui Branco \n" +"Language-Team: Portuguese \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: boolean +#. Description +#: ../torrentflux.templates:1001 +msgid "Should ${webserver} be restarted?" +msgstr "Deverรก o ${webserver} ser reiniciado?" + +#. Type: boolean +#. Description +#: ../torrentflux.templates:1001 +msgid "" +"Remember that in order to activate the new configuration ${webserver} has to " +"be restarted. You can also restart ${webserver} by manually executing invoke-" +"rc.d ${webserver} restart." +msgstr "" +"Lembre-se que para que a nova configuraรงรฃo seja activada o ${webserver} tem " +"que ser reiniciado. Pode tambรฉm reiniciar o ${webserver} manualmente " +"executando rc.dยท${webserver} restart." + +#. Type: note +#. Description +#: ../torrentflux.templates:2001 +msgid "Upgrading to 2.1 reverts configuration to default" +msgstr "Actualizar para 2.1 volta ร  configuraรงรฃo por omissรฃo." + +#. Type: note +#. Description +#: ../torrentflux.templates:2001 +msgid "" +"You are upgrading from a pre-2.1 version of torrentflux to a 2.1 or later " +"version. A major change in version 2.1 is that the configuration is now " +"stored in the database. This upgrade will update the database using default " +"values, and any changes you have made to the configuration file /etc/" +"torrentflux/config.php will NOT be used. This file will be saved so that you " +"can reference it later. After the upgrade is complete, you can adjust the " +"settings inside the program by logging in as an admin, and clicking on " +"\"admin\" and then \"settings\"." +msgstr "" +"Estรก a actualizar uma versรฃo pre-2.1 do torrentflux para uma versรฃo 2.1 ou " +"superior. Uma grande alteraรงรฃo na versรฃo 2.1 รฉ que a configuraรงรฃo รฉ agora " +"guardada numa base de dados. Esta actualizaรงรฃo actualizarรก a base de dados " +"usando valores por omissรฃo, qualquer alteraรงรฃo que tenha efectuado no " +"ficheiro de configuraรงรฃo /etc/torrentflux/config.php NรƒO serรก utilizada. " +"Este ficheiro serรก guardado de modo a que o possa consultar mais tarde. " +"Depois de completar a actualizaรงรฃo, poderรก ajustar as opรงรตes dentro do " +"programa ao corre-lo como administrador, clicando em \"admin\" e depois em " +"\"settings\"." --- torrentflux-2.3.orig/debian/po/POTFILES.in +++ torrentflux-2.3/debian/po/POTFILES.in @@ -0,0 +1 @@ +[type: gettext/rfc822deb] torrentflux.templates --- torrentflux-2.3.orig/debian/doc/patches/btshowmetainfo.patch +++ torrentflux-2.3/debian/doc/patches/btshowmetainfo.patch @@ -0,0 +1,26 @@ +--- ./btshowmetainfo.py 2006-01-06 10:46:22.000000000 -0800 ++++ ./torrentflux-2.0beta1-patched/btshowmetainfo.py 2006-01-06 09:00:10.000000000 -0800 +@@ -4,10 +4,10 @@ + # modified for multitracker display by John Hoffman + # see LICENSE.txt for license information + +-from sys import * +-from os.path import * +-from sha import * +-from BitTornado.bencode import * ++from sys import argv ++from os.path import basename, splitext ++from sha import sha ++from BitTornado.bencode import bencode, bdecode + + NAME, EXT = splitext(basename(argv[0])) + VERSION = '20030621' +@@ -44,7 +44,7 @@ + path = '' + for item in file['path']: + if (path != ''): +- path = path + "/" ++ path = path + "/" + path = path + item + print ' %s (%d)' % (path, file['length']) + file_length += file['length'] --- torrentflux-2.3.orig/debian/doc/patches/tfQManager.patch +++ torrentflux-2.3/debian/doc/patches/tfQManager.patch @@ -0,0 +1,55 @@ +--- torrentflux~/html/TF_BitTornado/tfQManager.py 2006-04-06 17:36:50.000000000 -0700 ++++ torrentflux/html/TF_BitTornado/tfQManager.py 2006-04-09 22:22:40.000000000 -0700 +@@ -46,13 +46,11 @@ + # this will be used during the process Counts to ensure we are + # unique from other running instances. + +- ePath = execPath.split(" ") +- for x in ePath: +- if (re.search('btphptornado', x) > 0 ): +- btphp = x ++ ePath = execPath.split() ++ btphp = ePath[-1] + if __debug__: traceMsg("btphp ->"+btphp) + +- if (re.search('btphptornado', btphp) > 0 ): ++ if (1): + try: + while 1: + +@@ -191,7 +189,7 @@ + psLine = [] + line = "" + counter = 0 +- list = doCommand("ps x -o pid,ppid,command -ww | grep '" + btphp + "' | grep -v tfQManager | grep -v grep") ++ list = doCommand("ps x -o pid,ppid,command -ww | grep '" + btphp + "' | grep -v " + argv[0] + " | grep -v grep") + + try: + for c in list: +@@ -202,7 +200,7 @@ + + # look for the grep line + for line in psLine: +- if (re.search('btphptornado.py',line) > 0): ++ if (re.search(btphp,line) > 0): + # now see if this is the main process and not a child. + if (re.search(' 1 /',line) > 0): + counter += 1 +@@ -236,7 +234,7 @@ + psLine = [] + line = "" + counter = 0 +- list = doCommand("ps x -o pid,ppid,command -ww | grep '" + btphp + "' | grep -v tfQManager | grep -v grep") ++ list = doCommand("ps x -o pid,ppid,command -ww | grep '" + btphp + "' | grep -v " + argv[0] + " | grep -v grep") + + try: + for c in list: +@@ -247,7 +245,7 @@ + + # look for the grep line + for line in psLine: +- if (re.search('btphptornado.py',line) > 0): ++ if (re.search(btphp,line) > 0): + # now see if this is the main process and not a child. + if (re.search(' 1 /',line) > 0): + # look for the userName --- torrentflux-2.3.orig/debian/doc/patches/btphptornado.patch +++ torrentflux-2.3/debian/doc/patches/btphptornado.patch @@ -0,0 +1,12 @@ +--- ./btphptornado.py 2006-01-06 10:46:22.000000000 -0800 ++++ ./torrentflux-2.0beta1-patched/btphptornado.py 2006-01-06 09:00:09.000000000 -0800 +@@ -13,7 +13,8 @@ + pass + + from BitTornado.download_bt1 import BT1Download, defaults, parse_params, get_usage, get_response +-from BitTornado.RawServer import RawServer, UPnP_ERROR ++from BitTornado.RawServer import RawServer ++from BitTornado.SocketHandler import UPnP_ERROR + from random import seed + from socket import error as socketerror + from BitTornado.bencode import bencode --- torrentflux-2.3.orig/debian/dirs +++ torrentflux-2.3/debian/dirs @@ -0,0 +1,24 @@ +# Config directory +etc/torrentflux + +# Binary files +usr/bin + +# Web files +usr/share/torrentflux +usr/share/torrentflux/www + +# Documentation +usr/share/doc/torrentflux +usr/share/doc/torrentflux/patches +usr/share/doc/torrentflux/dbfiles + +# Downloads directory +var/cache/torrentflux + +# Database config files +usr/share/dbconfig-common/data/torrentflux/install +usr/share/dbconfig-common/data/torrentflux/upgrade/mysql + +# Lintian overrides +usr/share/lintian/overrides --- torrentflux-2.3.orig/debian/docs +++ torrentflux-2.3/debian/docs @@ -0,0 +1,5 @@ +debian/TODO.Debian +debian/NEWS.Debian + +# Patches used on python files distibuted with TorrentFlux +debian/doc/patches --- torrentflux-2.3.orig/debian/torrentflux.templates +++ torrentflux-2.3/debian/torrentflux.templates @@ -0,0 +1,20 @@ +Template: torrentflux/restart-webserver +Type: boolean +Default: false +_Description: Should ${webserver} be restarted? + Remember that in order to activate the new configuration + ${webserver} has to be restarted. You can also restart ${webserver} + by manually executing invoke-rc.d ${webserver} restart. + +Template: torrentflux/upgrade_to_21 +Type: note +_Description: Upgrading to 2.1 reverts configuration to default + You are upgrading from a pre-2.1 version of torrentflux to a 2.1 + or later version. A major change in version 2.1 is that the + configuration is now stored in the database. This upgrade will + update the database using default values, and any changes you have + made to the configuration file /etc/torrentflux/config.php will NOT + be used. This file will be saved so that you can reference it later. + After the upgrade is complete, you can adjust the settings + inside the program by logging in as an admin, and clicking on + "admin" and then "settings". --- torrentflux-2.3.orig/debian/control +++ torrentflux-2.3/debian/control @@ -0,0 +1,52 @@ +Source: torrentflux +Section: web +Priority: optional +Maintainer: Ubuntu MOTU Developers +XSBC-Original-Maintainer: Cameron Dale +Build-Depends: debhelper (>= 5.0.0), dpatch +Build-Depends-Indep: po-debconf, docbook-to-man, tofrodos +Standards-Version: 3.7.2 +XS-Vcs-Svn: svn://svn.debian.org/collab-maint/ext-maint/torrentflux/trunk + +Package: torrentflux +Architecture: all +Depends: ${misc:Depends}, libapache-mod-php4 (>= 4:4.1) | libapache2-mod-php4 (>= 4:4.1) | libapache-mod-php5 | libapache2-mod-php5, php4-mysql | php5-mysql | php5-mysqli, bittornado (>= 0.3.9b), python, libphp-adodb, dbconfig-common, zip, tar +Recommends: mysql-client +Suggests: mysql-server +Description: web based, feature-rich BitTorrent download manager + TorrentFlux is a PHP based BitTorrent controller that runs on a web + server. It can manage all of your BitTorrent downloads from anywhere + through a convenient and easy-to-use web interface. + . + TorrentFlux enables you to run BitTorrent downloads unattended on a + monitor-less or remote server 24 hours a day, while still maintaining + complete control from any web browser. Now you can control your + downloading on your firewall, or keep up with downloads while on + vacation. It uses the BitTornado client to download files, and also + requires a web server with PHP. + . + Some of the many features: + * Upload Torrents via URL or File Upload + * Start, Stop, and Delete Torrents with ease + * Advanced Torrent start options (ports, speeds, etc.) + * Multi-user interface + * RSS Feeds, download Torrents files with a click + * Run several torrents at once + * View Download Progress of all torrents at a glance + * View drive space at a glance + * View Torrent file meta information + * Built-in User management and Security + * Private Messaging + * Themes (selectable per user) + * Upload History + * Detailed User Administration + * Admin Searchable Logs + * Torrent Search (many popular sites) + * Language Support + * Make your own torrents + * Add torrents to a download Queue + * NFO / Text viewer + . + For a description of BitTorrent, see the bittornado package. + . + Homepage: http://www.torrentflux.com --- torrentflux-2.3.orig/debian/apache.conf +++ torrentflux-2.3/debian/apache.conf @@ -0,0 +1,6 @@ +Alias /torrentflux /usr/share/torrentflux/www + + + Options FollowSymLinks + AllowOverride Limit + --- torrentflux-2.3.orig/debian/btshowmetainfo.torrentflux.sgml +++ torrentflux-2.3/debian/btshowmetainfo.torrentflux.sgml @@ -0,0 +1,104 @@ + manpage.1'. You may view + the manual page with: `docbook-to-man manpage.sgml | nroff -man | + less'. A typical entry in a Makefile or Makefile.am is: + +manpage.1: manpage.sgml + docbook-to-man $< > $@ + + + The docbook-to-man binary is found in the docbook-to-man package. + Please remember that if you create the nroff version in one of the + debian/rules file targets (such as build), you will need to include + docbook-to-man in your Build-Depends control field. + + --> + + + Cameron"> + Dale"> + + April 7, 2006"> + + 1"> + camrdale@gmail.com"> + + BTSHOWMETAINFO.TORRENTFLUX"> + + + Debian"> + GNU"> + GPL"> +]> + + + +
+ &dhemail; +
+ + &dhfirstname; + &dhsurname; + + + 2006 + &dhusername; + + &dhdate; +
+ + &dhucpackage; + + &dhsection; + + + &dhpackage; + + a modified bittornado python file for use with torrentflux + + + DESCRIPTION + + This program should only be used via the torrentflux web interface. + + You should not use this program yourself. + + + + AUTHOR + + This manual page was written by &dhusername; <&dhemail;> for + the &debian; system (but may be used by others). Permission is + granted to copy, distribute and/or modify this document under + the terms of the &gnu; General Public License, Version 2 any + later version published by the Free Software Foundation. + + + On Debian systems, the complete text of the GNU General Public + License can be found in /usr/share/common-licenses/GPL. + + + +
+ + + + --- torrentflux-2.3.orig/debian/torrentflux.prerm +++ torrentflux-2.3/debian/torrentflux.prerm @@ -0,0 +1,56 @@ +#!/bin/sh + +set -e +#set -x + +. /usr/share/debconf/confmodule +. /usr/share/dbconfig-common/dpkg/prerm.mysql +dbc_go torrentflux $@ + +if [ "$1" = "remove" ] || [ "$1" = "purge" ]; then + # Webservers to check for + webservers="apache apache-ssl apache-perl apache2" + restart="" + + for webserver in $webservers; do + webserver=${webserver%,} + + # Remove the apache config snippet link + rm -f /etc/$webserver/conf.d/torrentflux.conf + + # Test for the webserver + test -x /usr/sbin/$webserver || continue + test -d /etc/$webserver/conf.d || continue + + # Prompt for webserver restart + db_reset torrentflux/restart-webserver || true + db_subst torrentflux/restart-webserver webserver "$webserver" + db_input torrentflux/restart-webserver high || true + db_go + db_get torrentflux/restart-webserver + if [ "$RET" = "true" ]; then + restart="$restart $webserver" + fi + done + + # Tell debconf to stop so it doesn't get confused + db_stop + + for webserver in $restart; do + webserver=${webserver%,} + + # Restart the webserver + if [ -x /usr/sbin/invoke-rc.d ]; then + invoke-rc.d $webserver restart >&2 + else + /etc/init.d/$webserver restart >&2 + fi + done +fi + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 --- torrentflux-2.3.orig/debian/rules +++ torrentflux-2.3/debian/rules @@ -0,0 +1,91 @@ +#!/usr/bin/make -f +# -*- makefile -*- +# Sample debian/rules that uses debhelper. +# This file was originally written by Joey Hess and Craig Small. +# As a special exception, when this file is copied by dh-make into a +# dh-make output file, you may use that output file without restriction. +# This special exception was added by Craig Small in version 0.37 of dh-make. + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +include /usr/share/dpatch/dpatch.make + +build: patch build-stamp + +build-stamp: btphptornado.torrentflux.1 btshowmetainfo.torrentflux.1 btmakemetafile.torrentflux.1 tfQManager.torrentflux.1 torrentflux.1 + dh_testdir + touch build-stamp + +%.1: debian/%.sgml + /usr/bin/docbook-to-man $< > debian/$@ + +clean: unpatch + dh_testdir + dh_testroot + rm -f build-stamp + rm -f debian/btphptornado.torrentflux.1 debian/btshowmetainfo.torrentflux.1 debian/btmakemetafile.torrentflux.1 debian/tfQManager.torrentflux.1 debian/torrentflux.1 + dh_clean + +install: patch build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + + +# Build architecture-independent files here. +binary-indep: build install +# We have nothing to do by default. + +# Build architecture-dependent files here. +binary-arch: build install + dh_testdir + dh_testroot + dh_installdebconf + dh_installchangelogs CHANGELOG + dh_installdocs + dh_install + dh_installman + + # Remove the .py from the end of each of these and add .torrentflux + # to remove any confusion with other bittorrent alternatives + ( cd debian/torrentflux/usr/bin && \ + for i in btphptornado btshowmetainfo btmakemetafile tfQManager; \ + do mv $$i.py $$i.torrentflux; done ) + + # Remove the unneeded adodb and BitTornado + rm -f -r debian/torrentflux/usr/share/torrentflux/www/adodb + rm -f -r debian/torrentflux/usr/share/torrentflux/www/TF_BitTornado + + # Convert all web files with dos line endings to unix line endings + find debian/torrentflux/usr/share/torrentflux/www \ + \( -iname "*.php" -o -iname "*.html" -o -iname "*.css" -o -iname "*.js" \ + -o -iname "*.txt" -o -iname ".htaccess" \) -print0 \ + | xargs -0 -n 1 fromdos + + # Add the lintian override file + cp debian/torrentflux.lintian-overrides debian/torrentflux/usr/share/lintian/overrides/torrentflux + + dh_compress + + # Remove the executable bit from all the files + ( cd debian/torrentflux && \ + for i in etc/ usr/; \ + do find $$i -type f | xargs chmod -x; done ) + + dh_fixperms + + # Fix the premissions on the downloads directory + chown www-data:www-data debian/torrentflux/var/cache/torrentflux + + # Fix the permissions on the config file + chown root:www-data debian/torrentflux/etc/torrentflux/apache.conf + + dh_installdeb + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install configure --- torrentflux-2.3.orig/debian/NEWS.Debian +++ torrentflux-2.3/debian/NEWS.Debian @@ -0,0 +1,13 @@ +torrentflux (2.1-1) unstable; urgency=low + + The configuration in pre-2.1 versions of TorrentFlux was contained in + a file in /etc/torrentflux/config.php. In 2.1, all the configuration + settings from this file have been moved into the database. You can + change the settings by logging in as an admin, clicking on "admin", and + then clicking on "settings". This change means that upgrading from + pre-2.1 to 2.1 or later will cause all the settings to revert to their + default values. The /etc/torrentflux/config.php file is saved so that + you can use it to help in modifying the default settings yourself. After + you have modified the settings, you can safely delete it. + + -- Cameron Dale Fri, 14 Apr 2006 15:13:06 -0800 --- torrentflux-2.3.orig/debian/watch +++ torrentflux-2.3/debian/watch @@ -0,0 +1,13 @@ +# Example watch control file for uscan +# Rename this file to "watch" and then you can run the "uscan" command +# to check for upstream updates and more. +# See uscan(1) for format + +# Compulsory line, this is a version 3 file +version=3 + +# Uncomment to find new files on sourceforge, for debscripts >= 2.9 +#http://prdownloads.sourceforge.net/torrentflux/torrentflux-(.*)\.tar\.gz + +#Try this Sourceforge one instead +http://sf.net/torrentflux/torrentflux-(.*)\.tar\.gz --- torrentflux-2.3.orig/debian/torrentflux.config +++ torrentflux-2.3/debian/torrentflux.config @@ -0,0 +1,26 @@ +#!/bin/sh + +set -e +#set -x + +# source debconf stuff +if [ -f /usr/share/debconf/confmodule ]; then + . /usr/share/debconf/confmodule +fi + +# source dbconfig-common stuff +if [ -f /usr/share/dbconfig-common/dpkg/config.mysql ]; then + . /usr/share/dbconfig-common/dpkg/config.mysql + dbc_go torrentflux $@ +fi + +if [ "$1" = "configure" ] +then + + # if we are upgrading from version < 2.1 warns the user + if [ "$2" ] && dpkg --compare-versions "$2" lt "2.1" + then + db_input high torrentflux/upgrade_to_21 || true + db_go + fi +fi --- torrentflux-2.3.orig/debian/torrentflux.lintian-overrides +++ torrentflux-2.3/debian/torrentflux.lintian-overrides @@ -0,0 +1,2 @@ +# torrentflux uses variable subsitution in debconf to ease translation (like phpmyadmin) +torrentflux binary: postinst-uses-db-input --- torrentflux-2.3.orig/debian/changelog +++ torrentflux-2.3/debian/changelog @@ -0,0 +1,164 @@ +torrentflux (2.3-2ubuntu1) gutsy; urgency=low + + * Depends on zip, tar (LP: #115396) + * Update maintainer field in debian/control + + -- Maurizio Moriconi Fri, 18 May 2007 11:53:47 +0200 + +torrentflux (2.3-2) unstable; urgency=low + + * Upgrade the database to the 2.3 style + + -- Cameron Dale Mon, 7 May 2007 11:34:28 -0700 + +torrentflux (2.3-1) unstable; urgency=low + + * New upstream release (Closes: #409706) + - many dpatches now no longer needed + * New German translation (Closes: #412160) + * Added tofrodos use to fix line endings in web files + * Updated search engine modules to latest + + -- Cameron Dale Sun, 22 Apr 2007 11:34:28 -0700 + +torrentflux (2.1-7) unstable; urgency=high + + * Add more security fixes (Closes: #400582) + - some missed previously (11_missed_security_fixes.dpatch) + - remote command execution in metaInfo.php, issue + CVE-2006-6331 (12_metaInfo_remote_command.dpatch) + - possible XSS vulnerability due to urldecode + (13_possible_xss_vulnerability.dpatch) + - remote command execution in maketorrent.php, + (14_maketorrent_remote_command.dpatch) + - more possible fixes just to be safe + (15_additional_possible_fixes.dpatch) + + -- Cameron Dale Sat, 16 Dec 2006 22:30:44 -0800 + +torrentflux (2.1-6) unstable; urgency=high + + * Sanitize file inputs (Closes: #399169) + - fixes: CVE-2006-6329, CVE-2006-6330 + * Update search engines to latest + + -- Cameron Dale Tue, 21 Nov 2006 22:30:44 -0800 + +torrentflux (2.1-5) unstable; urgency=high + + * Updated 06_sanitize_html_entities to fix the security + issue CVE-2006-5451, urgency set to high (Closes: #395099) + * Fixed the directroy traversal vulnerability (Closes: #395930) + - issue CVE-2006-5609 + + -- Cameron Dale Sat, 28 Oct 2006 16:40:53 -0700 + +torrentflux (2.1-4) unstable; urgency=medium + + * Fix minor XSS vulnerability in admin.php (Closes: #392501) + - issue CVE-2006-5227 + * Update the printed version number to match the website (Closes: #392601) + * Fix http_query_builder() error in SearchEngineBase.php + * Update the search engines from the forums + * Add new search engines from the forums + + -- Cameron Dale Sat, 14 Oct 2006 15:40:03 -0700 + +torrentflux (2.1-3) unstable; urgency=high + + * Change the config script to comply with policy 7.2 (Closes: #388238) + + -- Cameron Dale Sat, 23 Sep 2006 14:51:31 -0700 + +torrentflux (2.1-2) unstable; urgency=medium + + * New Czech translation from Miroslav Kure (Closes: #361121) + * New Portugese translation from Rui Branco (Closes: #373258) + * New French translation from Gaetan Crahay (Closes: #366495) + * Change the /usr/bin/env references to /usr/bin/python + * Update the standards version to 3.7.2 + * Move debhelper and dpatch to build-depends + * Change the postrm script to comply with policy 7.2 + + -- Cameron Dale Mon, 21 Aug 2006 17:47:03 -0700 + +torrentflux (2.1-1) unstable; urgency=low + + * New upstream release + * Updated dbconfig-common patch for new config file + * Remove config.php from etc as it is no longer a config file + * Add debconf note about updated config location + * Switch to docbook for man pages + * Add manpages for 2 new programs + * Update control for new release features + * Add dependency on mysql-client (temporarily avoids #353617) + * Use variable substitution in debconf templates (Closes: #360694) + * Add lintian override for postinst-uses-db-input + * Upgrade debhelper compatibility to v5 + * Add comments to debhelper files + * Fix watch file to work properly + * Change installed docs + * New patch 03_remove_initial_db_insert + * New patch 04_fix_python_filename_dependence + * Add documentation of the database install + + -- Cameron Dale Fri, 14 Apr 2006 15:13:06 -0800 + +torrentflux (2.0beta1-7) unstable; urgency=low + + * Fixed: copyright to mention sources more accurately + + -- Cameron Dale Mon, 20 Mar 2006 20:55:47 -0800 + +torrentflux (2.0beta1-6) unstable; urgency=low + + * Fixed: chown usage to use : instead of . + * Fixed: ownership and permissions of config files + * Move web install directory to usr/share/torrentflux/www + * Added: mention of adodb and bittornado in copyright file + * Removed: symlink in var/www to usr/share + * Fixed: torrentspy.php updated to work with new site design + * Fixed: escaping quotes in folder view + + -- Cameron Dale Sat, 17 Mar 2006 16:09:45 -0800 + +torrentflux (2.0beta1-5) unstable; urgency=low + + * Added: apache config snippet to link to usr/share directory + * Added: debconf questions for restarting webserver + * Removed: lintian override for no-debconf-templates + * Added: use po-debconf to make translations possible + + -- Cameron Dale Mon, 20 Feb 2006 16:09:45 -0800 + +torrentflux (2.0beta1-4) unstable; urgency=low + + * Fixed: moved install directory to usr/share from var/www + + -- Cameron Dale Sun, 19 Feb 2006 16:09:45 -0800 + +torrentflux (2.0beta1-3) unstable; urgency=low + + * Fixed: removed mention of adodb in copyright file + * Fixed: removed configure, configure-stamp and build-stamp from rules + * Removed: unecessary depends on php and apache + + -- Cameron Dale Wed, 1 Feb 2006 16:09:45 -0800 + +torrentflux (2.0beta1-2) unstable; urgency=low + + * Fixed: change owner of downloads directory instead of permissions + * Removed: adodb source + * Added: dependency on debian's libphp-adodb + * Fixed: added lintian override for no-debconf-templates + + -- Cameron Dale Sat, 21 Jan 2006 16:09:45 -0800 + +torrentflux (2.0beta1-1) unstable; urgency=low + + * Initial release Closes: #299008 + * Patch: modified python files to work with debian's patched bittornado + * Patch: modified index.html to prevent page refreshes faster than the torrent can start bug + * Started using dbconfig-common for database setup + + -- Cameron Dale Wed, 4 Jan 2006 16:09:45 -0800 --- torrentflux-2.3.orig/debian/tfQManager.torrentflux.sgml +++ torrentflux-2.3/debian/tfQManager.torrentflux.sgml @@ -0,0 +1,104 @@ + manpage.1'. You may view + the manual page with: `docbook-to-man manpage.sgml | nroff -man | + less'. A typical entry in a Makefile or Makefile.am is: + +manpage.1: manpage.sgml + docbook-to-man $< > $@ + + + The docbook-to-man binary is found in the docbook-to-man package. + Please remember that if you create the nroff version in one of the + debian/rules file targets (such as build), you will need to include + docbook-to-man in your Build-Depends control field. + + --> + + + Cameron"> + Dale"> + + April 7, 2006"> + + 1"> + camrdale@gmail.com"> + + TFQMANAGER.TORRENTFLUX"> + + + Debian"> + GNU"> + GPL"> +]> + + + +
+ &dhemail; +
+ + &dhfirstname; + &dhsurname; + + + 2006 + &dhusername; + + &dhdate; +
+ + &dhucpackage; + + &dhsection; + + + &dhpackage; + + a torrent queue manager for use with torrentflux + + + DESCRIPTION + + This program should only be used via the torrentflux web interface. + + You should not use this program yourself. + + + + AUTHOR + + This manual page was written by &dhusername; <&dhemail;> for + the &debian; system (but may be used by others). Permission is + granted to copy, distribute and/or modify this document under + the terms of the &gnu; General Public License, Version 2 any + later version published by the Free Software Foundation. + + + On Debian systems, the complete text of the GNU General Public + License can be found in /usr/share/common-licenses/GPL. + + + +
+ + + + --- torrentflux-2.3.orig/debian/torrentflux.postrm +++ torrentflux-2.3/debian/torrentflux.postrm @@ -0,0 +1,57 @@ +#!/bin/sh + +set -e +#set -x + +# source debconf stuff +if [ -f /usr/share/debconf/confmodule ]; then + . /usr/share/debconf/confmodule +fi +# source dbconfig-common stuff +if [ -f /usr/share/dbconfig-common/dpkg/postrm.mysql ]; then + . /usr/share/dbconfig-common/dpkg/postrm.mysql + dbc_go torrentflux $@ +fi + +# summary of how this script can be called: +# * `remove' +# * `purge' +# * `upgrade' +# * `failed-upgrade' +# * `abort-install' +# * `abort-install' +# * `abort-upgrade' +# * `disappear' overwrit>r> +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + purge) + + rm -f /etc/torrentflux/config-db.php + ucf --purge /etc/torrentflux/config-db.php +# if test -d /etc/torrentflux; then +# rmdir --ignore-fail-on-non-empty /etc/torrentflux +# fi + + rmdir --ignore-fail-on-non-empty /etc/torrentflux || true + + ;; + remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) + + + ;; + + *) + echo "postrm called with unknown argument \`$1'" >&2 + exit 1 + +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 --- torrentflux-2.3.orig/debian/torrentflux.sgml +++ torrentflux-2.3/debian/torrentflux.sgml @@ -0,0 +1,118 @@ + manpage.1'. You may view + the manual page with: `docbook-to-man manpage.sgml | nroff -man | + less'. A typical entry in a Makefile or Makefile.am is: + +manpage.1: manpage.sgml + docbook-to-man $< > $@ + + + The docbook-to-man binary is found in the docbook-to-man package. + Please remember that if you create the nroff version in one of the + debian/rules file targets (such as build), you will need to include + docbook-to-man in your Build-Depends control field. + + --> + + + Cameron"> + Dale"> + + April 7, 2006"> + + 1"> + camrdale@gmail.com"> + + TORRENTFLUX"> + + + Debian"> + GNU"> + GPL"> +]> + + + +
+ &dhemail; +
+ + &dhfirstname; + &dhsurname; + + + 2006 + &dhusername; + + &dhdate; +
+ + &dhucpackage; + + &dhsection; + + + &dhpackage; + + a PHP based, feature-rich Torrent download manager + + + DESCRIPTION + + This manual page documents briefly the + &dhpackage; webpage. + + This manual page was written for the &debian; distribution + because the original program does not have a manual page. + + This program works via your web browser, and so has no command line + options, simply point your browser to http://<server_name>/torrentflux and gaze in + wonder! + + + + SEE ALSO + + + bittorrent-downloader.bittornado1, + bittorrent-downloader1. + + + + AUTHOR + + This manual page was written by &dhusername; <&dhemail;> for + the &debian; system (but may be used by others). Permission is + granted to copy, distribute and/or modify this document under + the terms of the &gnu; General Public License, Version 2 any + later version published by the Free Software Foundation. + + + On Debian systems, the complete text of the GNU General Public + License can be found in /usr/share/common-licenses/GPL. + + + +
+ + + + --- torrentflux-2.3.orig/debian/compat +++ torrentflux-2.3/debian/compat @@ -0,0 +1 @@ +5 --- torrentflux-2.3.orig/debian/btphptornado.torrentflux.sgml +++ torrentflux-2.3/debian/btphptornado.torrentflux.sgml @@ -0,0 +1,104 @@ + manpage.1'. You may view + the manual page with: `docbook-to-man manpage.sgml | nroff -man | + less'. A typical entry in a Makefile or Makefile.am is: + +manpage.1: manpage.sgml + docbook-to-man $< > $@ + + + The docbook-to-man binary is found in the docbook-to-man package. + Please remember that if you create the nroff version in one of the + debian/rules file targets (such as build), you will need to include + docbook-to-man in your Build-Depends control field. + + --> + + + Cameron"> + Dale"> + + April 7, 2006"> + + 1"> + camrdale@gmail.com"> + + BTPHPTORNADO.TORRENTFLUX"> + + + Debian"> + GNU"> + GPL"> +]> + + + +
+ &dhemail; +
+ + &dhfirstname; + &dhsurname; + + + 2006 + &dhusername; + + &dhdate; +
+ + &dhucpackage; + + &dhsection; + + + &dhpackage; + + a modified bittornado python file for use with torrentflux + + + DESCRIPTION + + This program should only be used via the torrentflux web interface. + + You should not use this program yourself. + + + + AUTHOR + + This manual page was written by &dhusername; <&dhemail;> for + the &debian; system (but may be used by others). Permission is + granted to copy, distribute and/or modify this document under + the terms of the &gnu; General Public License, Version 2 any + later version published by the Free Software Foundation. + + + On Debian systems, the complete text of the GNU General Public + License can be found in /usr/share/common-licenses/GPL. + + + +
+ + + + --- torrentflux-2.3.orig/debian/torrentflux.postinst +++ torrentflux-2.3/debian/torrentflux.postinst @@ -0,0 +1,84 @@ +#!/bin/sh + +set -e +#set -x + +. /usr/share/debconf/confmodule +. /usr/share/dbconfig-common/dpkg/postinst.mysql +dbc_generate_include=php:/etc/torrentflux/config-db.php +dbc_go torrentflux $@ + +# summary of how this script can be called: +# * `configure' +# * `abort-upgrade' +# * `abort-remove' `in-favour' +# +# * `abort-deconfigure' `in-favour' +# `removing' +# + +case "$1" in + configure) + + chown root:www-data /etc/torrentflux/config-db.php + chmod 640 /etc/torrentflux/config-db.php + + # Webservers to test for + webservers="apache apache-ssl apache-perl apache2" + restart="" + + for webserver in $webservers; do + webserver=${webserver%,} + + # Test for the webserver + test -x /usr/sbin/$webserver || continue + test -d /etc/$webserver/conf.d || continue + + # Create link to config snippet + if [ ! -f /etc/$webserver/conf.d/torrentflux.conf ] && [ ! -h /etc/$webserver/conf.d/torrentflux.conf ]; then + ln -s /etc/torrentflux/apache.conf /etc/$webserver/conf.d/torrentflux.conf + fi + + # Prompt for restarting the webserver + db_reset torrentflux/restart-webserver || true + db_subst torrentflux/restart-webserver webserver "$webserver" + db_input high torrentflux/restart-webserver || true + db_go + db_get torrentflux/restart-webserver + if [ "$RET" = "true" ]; then + restart="$restart $webserver" + fi + done + + # Tell debconf to stop so it doesn't get confused + db_stop + + for webserver in $restart; do + webserver=${webserver%,} + + # Restart the webserver + if [ -x /usr/sbin/invoke-rc.d ]; then + invoke-rc.d $webserver restart >&2 + else + /etc/init.d/$webserver restart >&2 + fi + done + + ;; + + abort-upgrade|abort-remove|abort-deconfigure) + + ;; + + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 --- torrentflux-2.3.orig/debian/torrentflux.manpages +++ torrentflux-2.3/debian/torrentflux.manpages @@ -0,0 +1,5 @@ +debian/torrentflux.1 +debian/btphptornado.torrentflux.1 +debian/btshowmetainfo.torrentflux.1 +debian/btmakemetafile.torrentflux.1 +debian/tfQManager.torrentflux.1 --- torrentflux-2.3.orig/debian/TODO.Debian +++ torrentflux-2.3/debian/TODO.Debian @@ -0,0 +1,3 @@ +General + * Add support for PostgreSQL + * Add more patches from the forums --- torrentflux-2.3.orig/debian/README.Debian +++ torrentflux-2.3/debian/README.Debian @@ -0,0 +1,50 @@ +torrentflux for Debian +---------------------- + +1. Getting Started + +Using dbconfig-common for the database install is highly recommended. +If you have chosen not to use it, you can find the SQL files used to +install and upgrade the database in /usr/share/doc/torrentflux/dbfiles. +You will need to use these files to manually install/upgrade the +database yourself. + +Once the package is installed, point your browser to +http://localhost/torrentflux/ +TorrentFlux will ask you for a user name and password. These will +be used to create the admin user, who can then create other users. + +2. Web Servers + +By default, TorrentFlux will install itself to be used with any of the +Apache webservers you have installed (apache, apache-ssl, apache-perl, +and apache2). It will be available in any virtual servers of these as +well. To change this behaviour, edit the file +/etc/torrentflux/apache.conf +which is symlinked to from +/etc/[webserver]/conf.d/torrentflux.conf + +3. Additional Information + +There is a forum available at http://www.torrentflux.com/forum/ +with lots of tips and tricks to using torrentflux and bittorrent in +general. There are also some hacks available in the forums to expand on +the features available. + +An add-on package, rss-torrentflux, is available on sourceforge at +http://sourceforge.net/projects/rss-torrentflux which "automagically +adds Torrent-Files to TorrentFlux and even starts the Downloads for you!" +I've never tried it though. + +4. WARNING + +If you do plan on using some of these hacks, or want to use your own +version of bittornado, keep in mind that the python files in this package +have been slightly modified from the ones distributed with torrentflux +(the upstream source). Diffs for these patches have been included in the +/usr/share/doc/torrentflux/patches directory. These changes are very +minimal and shouldn't cause any problems, but if you have trouble using +other bittornado's, you may want to unpatch or use the upstream's python +files. + + -- Cameron Dale , Fri, 14 Apr 2006 21:19:52 -0800 --- torrentflux-2.3.orig/debian/patches/14_maketorrent_remote_command.dpatch +++ torrentflux-2.3/debian/patches/14_maketorrent_remote_command.dpatch @@ -0,0 +1,19 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 14_maketorrent_remote_command.dpatch by +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Fix a remote command execution in maketorrent.php. + +@DPATCH@ +diff -urNad torrentflux~/html/maketorrent.php torrentflux/html/maketorrent.php +--- torrentflux~/html/maketorrent.php 2006-12-09 15:45:47.000000000 -0800 ++++ torrentflux/html/maketorrent.php 2006-12-09 15:46:32.000000000 -0800 +@@ -97,7 +97,7 @@ + } + + // This is the command to execute +- $app = "nohup " . $cfg["pythonCmd"] . " -OO " . $cfg["btmakemetafile"] . " " . $announce . " " . escapeshellarg( $cfg['path'] . $file ) . " "; ++ $app = "nohup " . $cfg["pythonCmd"] . " -OO " . $cfg["btmakemetafile"] . " " . escapeshellarg($announce) . " " . escapeshellarg( $cfg['path'] . $file ) . " "; + + // Is there comments to add? + if( !empty( $comment ) ) --- torrentflux-2.3.orig/debian/patches/06_sanitize_html_entities.dpatch +++ torrentflux-2.3/debian/patches/06_sanitize_html_entities.dpatch @@ -0,0 +1,244 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 06_sanitize_html_entities.dpatch by +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Remove all XSS problems by sanitizing all input/output. + +@DPATCH@ +diff -urNad torrentflux~/html/admin.php torrentflux/html/admin.php +--- torrentflux~/html/admin.php 2006-10-28 02:08:22.000000000 -0700 ++++ torrentflux/html/admin.php 2006-10-28 02:08:27.000000000 -0700 +@@ -322,7 +322,7 @@ + $user_icon = "images/user.gif"; + } + +- $ip_info = $ip_resolved."
".$user_agent; ++ $ip_info = htmlentities($ip_resolved)."
".htmlentities($user_agent); + + $output .= ""; + if (IsUser($user_id)) +@@ -333,11 +333,11 @@ + { + $output .= "".$user_id."  "; + } +- $output .= "
".$action."
"; ++ $output .= "
".htmlentities($action, ENT_QUOTES)."
"; + $output .= "
"; +- $output .= $file; ++ $output .= htmlentities($file, ENT_QUOTES); + $output .= "
"; +- $output .= ""; ++ $output .= ""; + $output .= "
".date(_DATETIMEFORMAT, $time)."
"; + $output .= ""; + +@@ -395,7 +395,7 @@ + { + $selected = "selected"; + } +- echo ""; ++ echo ""; + } + } + ?> +@@ -413,7 +413,7 @@ + { + $selected = "selected"; + } +- echo ""; ++ echo ""; + } + ?> + +diff -urNad torrentflux~/html/functions.php torrentflux/html/functions.php +--- torrentflux~/html/functions.php 2006-10-28 02:08:22.000000000 -0700 ++++ torrentflux/html/functions.php 2006-10-28 02:08:27.000000000 -0700 +@@ -1193,7 +1193,7 @@ + echo ''; + echo ''; +diff -urNad torrentflux~/html/index.php torrentflux/html/index.php +--- torrentflux~/html/index.php 2006-04-06 17:44:06.000000000 -0700 ++++ torrentflux/html/index.php 2006-10-28 02:08:27.000000000 -0700 +@@ -31,14 +31,14 @@ + // set refresh option into the session cookie + if(array_key_exists("pagerefresh", $_GET)) + { +- if($_GET["pagerefresh"] == "false") ++ if(getRequestVar("pagerefresh") == "false") + { + $_SESSION['prefresh'] = false; + header("location: index.php"); + exit(); + } + +- if($_GET["pagerefresh"] == "true") ++ if(getRequestVar("pagerefresh") == "true") + { + $_SESSION["prefresh"] = true; + header("location: index.php"); +diff -urNad torrentflux~/html/maketorrent.php torrentflux/html/maketorrent.php +--- torrentflux~/html/maketorrent.php 2006-04-06 17:44:06.000000000 -0700 ++++ torrentflux/html/maketorrent.php 2006-10-28 02:08:27.000000000 -0700 +@@ -70,17 +70,17 @@ + + // Variable information + $tpath = $cfg["torrent_file_path"]; +- $tfile = $_POST['torrent']; +- $file = $_GET['path']; ++ $tfile = getRequestVar('torrent'); ++ $file = getRequestVar('path'); + $torrent = cleanFileName(StripFolders( trim($file) )) . ".torrent"; +- $announce = ( $_POST['announce'] ) ? $_POST['announce'] : "http://"; +- $ancelist = $_POST['announcelist']; +- $comment = $_POST['comments']; +- $peice = $_POST['piecesize']; +- $alert = ( $_POST['alert'] ) ? 1 : "''"; +- $private = ( $_POST['Private'] == "Private" ) ? true : false; +- $dht = ( $_POST['DHT'] == "DHT" ) ? true : false; +- ++ $announce = ( getRequestVar('announce') ) ? getRequestVar('announce') : "http://"; ++ $ancelist = getRequestVar('announcelist'); ++ $comment = getRequestVar('comments'); ++ $peice = getRequestVar('piecesize'); ++ $alert = ( getRequestVar('alert') ) ? 1 : "''"; ++ $private = ( getRequestVar('Private') == "Private" ) ? true : false; ++ $dht = ( getRequestVar('DHT') == "DHT" ) ? true : false; ++ + // Let's create the torrent + if( !empty( $announce ) && $announce != "http://" ) + { +@@ -196,10 +196,10 @@ + } + + // This is the torrent download prompt +- if( !empty( $_GET["download"] ) ) ++ if( isset( $_REQUEST["download"] ) ) + { +- $tfile = $_GET["download"]; +- ++ $tfile = getRequestVar("download"); ++ + // ../ is not allowed in the file name + if (!ereg("(\.\.\/)", $tfile)) + { +diff -urNad torrentflux~/html/metaInfo.php torrentflux/html/metaInfo.php +--- torrentflux~/html/metaInfo.php 2006-04-06 17:44:06.000000000 -0700 ++++ torrentflux/html/metaInfo.php 2006-10-28 02:08:27.000000000 -0700 +@@ -189,12 +189,12 @@ + + echo ""; + echo ""; +- echo ""; +- echo ""; ++ echo ""; ++ echo ""; + + if(array_key_exists('comment',$btmeta)) + { +- echo ""; ++ echo ""; + } + + echo ""; +@@ -238,14 +238,14 @@ + else + { + echo "
Metainfo File:".$torrent."
Directory Name:".$btmeta['info']['name']."
Announce URL:".$btmeta['announce']."
Directory Name:".htmlentities($btmeta['info']['name'], ENT_QUOTES)."
Announce URL:".htmlentities($btmeta['announce'], ENT_QUOTES)."
Comment:".$btmeta['comment']."
Comment:".htmlentities($btmeta['comment'], ENT_QUOTES)."
Created:".date("F j, Y, g:i a",$btmeta['creation date'])."

"; +- echo $btmeta['info']['name'].$torrent_size." (".formatBytesToKBMGGB($torrent_size).")"; ++ echo htmlentities($btmeta['info']['name'].$torrent_size." (".formatBytesToKBMGGB($torrent_size).")", ENT_QUOTES); + } + } + else + { + $result = shell_exec("cd " . $cfg["torrent_file_path"]."; " . $cfg["pythonCmd"] . " -OO " . $cfg["btshowmetainfo"]." \"".$torrent."\""); + echo "
";
+-        echo $result;
++        echo htmlentities($result, ENT_QUOTES);
+         echo "
"; + } + } +diff -urNad torrentflux~/html/profile.php torrentflux/html/profile.php +--- torrentflux~/html/profile.php 2006-04-06 17:44:06.000000000 -0700 ++++ torrentflux/html/profile.php 2006-10-28 02:08:27.000000000 -0700 +@@ -290,7 +290,7 @@ + global $cfg, $db; + DisplayHead($cfg["user"] . "'s "._PROFILE); + +- $cid = $_GET["cid"]; // Cookie ID ++ $cid = getRequestVar("cid"); // Cookie ID + + // Used for when editing a cookie + $hostvalue = $datavalue = ""; +@@ -507,7 +507,7 @@ + + // Delete selected cookie from user + case "deleteCookie": +- $cid = $_GET["cid"]; ++ $cid = getRequestVar("cid"); + deleteCookie( $cid ); + break; + +diff -urNad torrentflux~/html/settingsfunctions.php torrentflux/html/settingsfunctions.php +--- torrentflux~/html/settingsfunctions.php 2006-04-06 17:44:06.000000000 -0700 ++++ torrentflux/html/settingsfunctions.php 2006-10-28 02:08:27.000000000 -0700 +@@ -30,7 +30,19 @@ + { + if (array_key_exists($varName,$_REQUEST)) + { +- return trim($_REQUEST[$varName]); ++ if (is_array($_REQUEST[$varName])) ++ { ++ $tmpArr = $_REQUEST[$varName]; ++ foreach($tmpArr as $key => $value); ++ { ++ $tmpArr[$key] = htmlentities(trim($value), ENT_QUOTES); ++ } ++ ++ return $tmpArr; ++ ++ } else { ++ return htmlentities(trim($_REQUEST[$varName]), ENT_QUOTES); ++ } + } + else + { +@@ -52,9 +64,9 @@ + 'user_id' => $cfg['user'], + 'file' => $file, + 'action' => $action, +- 'ip' => $cfg['ip'], +- 'ip_resolved' => $host_resolved, +- 'user_agent' => $_SERVER['HTTP_USER_AGENT'], ++ 'ip' => htmlentities($cfg['ip'], ENT_QUOTES), ++ 'ip_resolved' => htmlentities($host_resolved, ENT_QUOTES), ++ 'user_agent' => htmlentities($_SERVER['HTTP_USER_AGENT'], ENT_QUOTES), + 'time' => $create_time + ); + +diff -urNad torrentflux~/html/viewnfo.php torrentflux/html/viewnfo.php +--- torrentflux~/html/viewnfo.php 2006-04-06 17:44:06.000000000 -0700 ++++ torrentflux/html/viewnfo.php 2006-10-28 02:08:27.000000000 -0700 +@@ -29,7 +29,7 @@ + + DisplayHead("View NFO"); + +-$file = $_GET["path"]; ++$file = getRequestVar("path"); + $folder = htmlspecialchars( substr( $file, 0, strrpos( $file, "/" ) ) ); + + if( ( $output = @file_get_contents( $cfg["path"] . $file ) ) === false ) +@@ -42,7 +42,7 @@ +
+
+ 
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Update btphptornado.py to match changes to btdownloadheadless.py in bittornado package.
+
+@DPATCH@
+diff -urNad --exclude=CVS --exclude=.svn ./html/TF_BitTornado/btphptornado.py /tmp/dpep-work.1TSzAh/bittornado/btdownloadheadless.py
+--- ./html/TF_BitTornado/btphptornado.py	2005-01-19 02:40:36.000000000 -0500
++++ /tmp/dpep-work.1TSzAh/bittornado/btdownloadheadless.py	2005-09-17 12:06:38.204453037 -0400
+@@ -13,7 +13,8 @@
+         pass
+     
+ from BitTornado.download_bt1 import BT1Download, defaults, parse_params, get_usage, get_response
+-from BitTornado.RawServer import RawServer, UPnP_ERROR
++from BitTornado.RawServer import RawServer
++from BitTornado.SocketHandler import UPnP_ERROR
+ from random import seed
+ from socket import error as socketerror
+ from BitTornado.bencode import bencode
+diff -urNad --exclude=CVS --exclude=.svn ./html/TF_BitTornado/btshowmetainfo.py /tmp/dpep-work.1TSzAh/bittornado/btshowmetainfo.py
+--- ./html/TF_BitTornado/btshowmetainfo.py	2005-01-19 02:40:36.000000000 -0500
++++ /tmp/dpep-work.1TSzAh/bittornado/btshowmetainfo.py	2005-09-17 12:06:38.205452858 -0400
+@@ -4,10 +4,10 @@
+ # modified for multitracker display by John Hoffman
+ # see LICENSE.txt for license information
+ 
+-from sys import *
+-from os.path import *
+-from sha import *
+-from BitTornado.bencode import *
++from sys import argv
++from os.path import basename, splitext
++from sha import sha
++from BitTornado.bencode import bencode, bdecode
+ 
+ NAME, EXT = splitext(basename(argv[0]))
+ VERSION = '20030621'
--- torrentflux-2.3.orig/debian/patches/11_missed_security_fixes.dpatch
+++ torrentflux-2.3/debian/patches/11_missed_security_fixes.dpatch
@@ -0,0 +1,135 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 11_missed_security_fixes.dpatch by  
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Add more security fixes missed in previous patches.
+
+@DPATCH@
+diff -urNad torrentflux~/html/admin.php torrentflux/html/admin.php
+--- torrentflux~/html/admin.php	2006-11-30 15:04:37.000000000 -0800
++++ torrentflux/html/admin.php	2006-11-30 15:04:37.000000000 -0800
+@@ -322,7 +322,7 @@
+             $user_icon = "images/user.gif";
+         }
+ 
+-        $ip_info = htmlentities($ip_resolved)."
".htmlentities($user_agent); ++ $ip_info = htmlentities($ip_resolved, ENT_QUOTES)."
".htmlentities($user_agent, ENT_QUOTES); + + $output .= ""; + if (IsUser($user_id)) +diff -urNad torrentflux~/html/dir.php torrentflux/html/dir.php +--- torrentflux~/html/dir.php 2006-11-30 15:04:37.000000000 -0800 ++++ torrentflux/html/dir.php 2006-11-30 15:04:37.000000000 -0800 +@@ -255,7 +255,15 @@ + echo "
"; + + if(!isset($dir)) $dir = ""; ++ ++if (!file_exists($cfg["path"].$dir)) ++{ ++ echo "".$dir." could not be found or is not valid."; ++} ++else ++{ + ListDirectory($cfg["path"].$dir); ++} + + DisplayFoot(); + +diff -urNad torrentflux~/html/functions.php torrentflux/html/functions.php +--- torrentflux~/html/functions.php 2006-11-30 15:04:37.000000000 -0800 ++++ torrentflux/html/functions.php 2006-11-30 15:04:37.000000000 -0800 +@@ -2133,7 +2133,7 @@ + $size = @filesize($file); + if ( $size == 0) + { +- $size = exec("ls -l \"".$file."\" | awk '{print $5}'"); ++ $size = exec("ls -l \"". escapeshellarg( $file ) ."\" | awk '{print $5}'"); + } + return $size; + } +diff -urNad torrentflux~/html/maketorrent.php torrentflux/html/maketorrent.php +--- torrentflux~/html/maketorrent.php 2006-11-30 15:04:35.000000000 -0800 ++++ torrentflux/html/maketorrent.php 2006-11-30 15:04:37.000000000 -0800 +@@ -108,7 +108,7 @@ + // Set the piece size + if( !empty( $peice ) ) + { +- $app .= "--piece_size_pow2 " . $peice . " "; ++ $app .= "--piece_size_pow2 " . escapeshellarg( $peice ) . " "; + } + + if( !empty( $ancelist ) ) +diff -urNad torrentflux~/html/metaInfo.php torrentflux/html/metaInfo.php +--- torrentflux~/html/metaInfo.php 2006-11-30 15:04:35.000000000 -0800 ++++ torrentflux/html/metaInfo.php 2006-11-30 15:04:37.000000000 -0800 +@@ -106,7 +106,7 @@ + { + global $cfg; + +- if (empty($torrent)) ++ if (empty($torrent) || !file_exists($cfg["torrent_file_path"].$torrent)) + { + echo _NORECORDSFOUND; + } +@@ -122,6 +122,13 @@ + $ftorrent=$cfg["torrent_file_path"].$torrent; + + $fp = fopen($ftorrent, "rd"); ++ if (!$fp) ++ { ++ // Not able to open file ++ echo _NORECORDSFOUND; ++ } ++ else ++ { + $alltorrent = fread($fp, filesize($ftorrent)); + fclose($fp); + +@@ -241,6 +248,7 @@ + echo htmlentities($btmeta['info']['name'].$torrent_size." (".formatBytesToKBMGGB($torrent_size).")", ENT_QUOTES); + } + } ++ } + else + { + $result = shell_exec("cd " . $cfg["torrent_file_path"]."; " . $cfg["pythonCmd"] . " -OO " . $cfg["btshowmetainfo"]." \"".$torrent."\""); +diff -urNad torrentflux~/html/setpriority.php torrentflux/html/setpriority.php +--- torrentflux~/html/setpriority.php 2006-11-03 01:10:36.000000000 -0800 ++++ torrentflux/html/setpriority.php 2006-11-30 15:04:37.000000000 -0800 +@@ -22,6 +22,8 @@ + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + ++include_once("settingsfunctions.php"); ++ + function getFile($var) + { + if ($var < 65535) +@@ -51,8 +53,8 @@ + $fileName = $cfg["torrent_file_path"].$alias.".prio"; + + $result = array(); +- +- $files = array_filter($_REQUEST['files'],"getFile"); ++ $files = array(); ++ $files = array_filter(getRequestVar('files'),"getFile"); + + // if there are files to get then process and create a prio file. + if (count($files) > 0) +diff -urNad torrentflux~/html/startpop.php torrentflux/html/startpop.php +--- torrentflux~/html/startpop.php 2006-11-03 01:10:36.000000000 -0800 ++++ torrentflux/html/startpop.php 2006-11-30 15:04:37.000000000 -0800 +@@ -29,6 +29,12 @@ + $torrent = getRequestVar('torrent'); + $displayName = $torrent; + ++if (!file_exists($cfg["torrent_file_path"].$torrent)) ++{ ++ echo $torrent." could not be found or does not exist."; ++ die(); ++} ++ + if(strlen($displayName) >= 55) + { + $displayName = substr($displayName, 0, 52)."..."; --- torrentflux-2.3.orig/debian/patches/12_metaInfo_remote_command.dpatch +++ torrentflux-2.3/debian/patches/12_metaInfo_remote_command.dpatch @@ -0,0 +1,43 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 12_metaInfo_remote_command.dpatch by +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Fix remote command execution vulnerability in metaInfo.php + +@DPATCH@ +diff -urNad torrentflux~/html/details.php torrentflux/html/details.php +--- torrentflux~/html/details.php 2006-11-03 01:10:36.000000000 -0800 ++++ torrentflux/html/details.php 2006-12-09 12:27:17.000000000 -0800 +@@ -29,7 +29,7 @@ + + global $cfg; + +-$torrent = getRequestVar('torrent'); ++$torrent = SecurityClean(getRequestVar('torrent')); + + DisplayHead(_TORRENTDETAILS); + +diff -urNad torrentflux~/html/metaInfo.php torrentflux/html/metaInfo.php +--- torrentflux~/html/metaInfo.php 2006-12-09 12:27:15.000000000 -0800 ++++ torrentflux/html/metaInfo.php 2006-12-09 12:31:04.000000000 -0800 +@@ -251,7 +251,7 @@ + } + else + { +- $result = shell_exec("cd " . $cfg["torrent_file_path"]."; " . $cfg["pythonCmd"] . " -OO " . $cfg["btshowmetainfo"]." \"".$torrent."\""); ++ $result = shell_exec("cd " . $cfg["torrent_file_path"]."; " . $cfg["pythonCmd"] . " -OO " . $cfg["btshowmetainfo"]." ".escapeshellarg($torrent)); + echo "
";
+         echo htmlentities($result, ENT_QUOTES);
+         echo "
"; +diff -urNad torrentflux~/html/startpop.php torrentflux/html/startpop.php +--- torrentflux~/html/startpop.php 2006-12-09 12:27:15.000000000 -0800 ++++ torrentflux/html/startpop.php 2006-12-09 12:29:07.000000000 -0800 +@@ -26,7 +26,7 @@ + include_once("functions.php"); + require_once("metaInfo.php"); + +-$torrent = getRequestVar('torrent'); ++$torrent = SecurityClean(getRequestVar('torrent')); + $displayName = $torrent; + + if (!file_exists($cfg["torrent_file_path"].$torrent)) --- torrentflux-2.3.orig/debian/patches/09_fix_directory_traversal.dpatch +++ torrentflux-2.3/debian/patches/09_fix_directory_traversal.dpatch @@ -0,0 +1,18 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 09_fix_directory_traversal.dpatch by +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Fix the directory traversal bug. + +@DPATCH@ +diff -urNad torrentflux~/html/dir.php torrentflux/html/dir.php +--- torrentflux~/html/dir.php 2006-04-06 17:36:50.000000000 -0700 ++++ torrentflux/html/dir.php 2006-10-28 11:49:28.000000000 -0700 +@@ -32,6 +32,7 @@ + $down = getRequestVar('down'); + $tar = getRequestVar('tar'); + $dir = stripslashes(urldecode(getRequestVar('dir'))); ++if (strpos(stripslashes($dir),"../")===false) {} else {echo "Can't go to parent directories!";exit;} + + // Are we to delete something? + if ($del != "") --- torrentflux-2.3.orig/debian/patches/05_change_env_to_python.dpatch +++ torrentflux-2.3/debian/patches/05_change_env_to_python.dpatch @@ -0,0 +1,43 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 05_change_env_to_python.dpatch by +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Change all the /usr/bin/env to /usr/bin/python. + +@DPATCH@ +diff -urNad torrentflux~/html/TF_BitTornado/btmakemetafile.py torrentflux/html/TF_BitTornado/btmakemetafile.py +--- torrentflux~/html/TF_BitTornado/btmakemetafile.py 2006-07-17 16:55:46.000000000 -0700 ++++ torrentflux/html/TF_BitTornado/btmakemetafile.py 2006-08-19 15:32:59.000000000 -0700 +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python + + # Written by Bram Cohen + # multitracker extensions by John Hoffman +diff -urNad torrentflux~/html/TF_BitTornado/btphptornado.py torrentflux/html/TF_BitTornado/btphptornado.py +--- torrentflux~/html/TF_BitTornado/btphptornado.py 2006-08-19 15:32:28.000000000 -0700 ++++ torrentflux/html/TF_BitTornado/btphptornado.py 2006-08-19 15:34:39.000000000 -0700 +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python + + # Written by Bram Cohen + # see LICENSE.txt for license information +diff -urNad torrentflux~/html/TF_BitTornado/btshowmetainfo.py torrentflux/html/TF_BitTornado/btshowmetainfo.py +--- torrentflux~/html/TF_BitTornado/btshowmetainfo.py 2006-08-19 15:32:28.000000000 -0700 ++++ torrentflux/html/TF_BitTornado/btshowmetainfo.py 2006-08-19 15:34:24.000000000 -0700 +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python + + # Written by Henry 'Pi' James and Loring Holden + # modified for multitracker display by John Hoffman +diff -urNad torrentflux~/html/TF_BitTornado/tfQManager.py torrentflux/html/TF_BitTornado/tfQManager.py +--- torrentflux~/html/TF_BitTornado/tfQManager.py 2006-08-19 15:32:28.000000000 -0700 ++++ torrentflux/html/TF_BitTornado/tfQManager.py 2006-08-19 15:34:53.000000000 -0700 +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python + + # Written by kboy + --- torrentflux-2.3.orig/debian/patches/15_additional_possible_fixes.dpatch +++ torrentflux-2.3/debian/patches/15_additional_possible_fixes.dpatch @@ -0,0 +1,126 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 15_additional_possible_fixes.dpatch by +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: No description. + +@DPATCH@ +diff -urNad torrentflux~/html/downloaddetails.php torrentflux/html/downloaddetails.php +--- torrentflux~/html/downloaddetails.php 2006-11-03 01:10:36.000000000 -0800 ++++ torrentflux/html/downloaddetails.php 2006-12-16 10:51:56.000000000 -0800 +@@ -31,7 +31,7 @@ + $torrentowner = getOwner($torrent); + $graph_width = ""; + $background = "#000000"; +-$alias = getRequestVar('alias'); ++$alias = SecurityClean(getRequestVar('alias')); + if (!empty($alias)) + { + // read the alias file +diff -urNad torrentflux~/html/functions.php torrentflux/html/functions.php +--- torrentflux~/html/functions.php 2006-12-16 10:50:05.000000000 -0800 ++++ torrentflux/html/functions.php 2006-12-16 10:51:56.000000000 -0800 +@@ -2097,7 +2097,7 @@ + } + + $btphp = "'" . $cmd1. "; HOME=".$cfg["path"]."; export HOME; nohup " . $pyCmd . " " .$cfg["btphpbin"] . " '"; +- $command = $pyCmd . " " . $cfg["tfQManager"] . " ".$cfg["torrent_file_path"]."queue/ ".$maxServerThreads." ".$maxUserThreads." ".$sleepInterval." ".$btphp." > /dev/null &"; ++ $command = $pyCmd . " " . $cfg["tfQManager"] . " ".$cfg["torrent_file_path"]."queue/ ".escapeshellarg($maxServerThreads)." ".escapeshellarg($maxUserThreads)." ".escapeshellarg($sleepInterval)." ".$btphp." > /dev/null &"; + //$command = $pyCmd . " " . $cfg["tfQManager"] . " ".$cfg["torrent_file_path"]."queue/ ".$maxServerThreads." ".$maxUserThreads." ".$sleepInterval." ".$btphp." > /dev/null2>&1 & &"; + + $result = exec($command); +@@ -2120,7 +2120,7 @@ + if($QmgrPID != "") + { + AuditAction($cfg["constants"]["QManager"], "Stopping PID:" . $QmgrPID); +- $result = exec("kill ".$QmgrPID); ++ $result = exec("kill ".escapeshellarg($QmgrPID)); + unlink($cfg["torrent_file_path"] . "queue/tfQManager.pid"); + } + } +diff -urNad torrentflux~/html/index.php torrentflux/html/index.php +--- torrentflux~/html/index.php 2006-12-16 10:50:05.000000000 -0800 ++++ torrentflux/html/index.php 2006-12-16 10:51:56.000000000 -0800 +@@ -192,7 +192,7 @@ + } + } + +- $torrent = urldecode($torrent); ++ //$torrent = urldecode($torrent); + $alias = getAliasName($torrent); + $owner = getOwner($torrent); + +@@ -241,15 +241,15 @@ + + if (usingTornado()) + { +- $command = $runtime." ".$sharekill." ".$cfg["torrent_file_path"].$alias.".stat ".$owner." --responsefile '".$cfg["torrent_file_path"].$torrent."' --display_interval 5 --max_download_rate ". $drate ." --max_upload_rate ".$rate." --max_uploads ".$maxuploads." --minport ".$minport." --maxport ".$maxport." --rerequest_interval ".$rerequest." --super_seeder ".$superseeder; ++ $command = escapeshellarg($runtime)." ".escapeshellarg($sharekill)." '".$cfg["torrent_file_path"].$alias.".stat' ".$owner." --responsefile '".$cfg["torrent_file_path"].$torrent."' --display_interval 5 --max_download_rate ". escapeshellarg($drate) ." --max_upload_rate ".escapeshellarg($rate)." --max_uploads ".escapeshellarg($maxuploads)." --minport ".escapeshellarg($minport)." --maxport ".escapeshellarg($maxport)." --rerequest_interval ".escapeshellarg($rerequest)." --super_seeder ".escapeshellarg($superseeder); + + if(file_exists($cfg["torrent_file_path"].$alias.".prio")) { + $priolist = explode(',',file_get_contents($cfg["torrent_file_path"].$alias.".prio")); + $priolist = implode(',',array_slice($priolist,1,$priolist[0])); +- $command .= " --priority ".$priolist; ++ $command .= " --priority ".escapeshellarg($priolist); + } + +- $command .= " ".$cfg["cmd_options"]." > /dev/null &"; ++ $command .= " ".escapeshellarg($cfg["cmd_options"])." > /dev/null &"; + + if ($cfg["AllowQueing"] && $queue == "1") + { +@@ -271,12 +271,12 @@ + + if (!$cfg["debugTorrents"]) + { +- $pyCmd = $cfg["pythonCmd"] . " -OO"; ++ $pyCmd = escapeshellarg($cfg["pythonCmd"]) . " -OO"; + }else{ +- $pyCmd = $cfg["pythonCmd"]; ++ $pyCmd = escapeshellarg($cfg["pythonCmd"]); + } + +- $command = "cd " . $cfg["path"] . $owner . "; HOME=".$cfg["path"]."; export HOME; nohup " . $pyCmd . " " .$cfg["btphpbin"] . " " . $command; ++ $command = "cd " . $cfg["path"] . $owner . "; HOME=".$cfg["path"]."; export HOME; nohup " . $pyCmd . " " .escapeshellarg($cfg["btphpbin"]) . " " . $command; + } + + } +@@ -300,7 +300,7 @@ + else + { + // The following command starts the torrent running! w00t! +- $result = exec($command); ++ passthru($command); + + AuditAction($cfg["constants"]["start_torrent"], $torrent."
Die:".$runtime.", Sharekill:".$sharekill.", MaxUploads:".$maxuploads.", DownRate:".$drate.", UploadRate:".$rate.", Ports:".$minport."-".$maxport.", SuperSeed:".$superseeder.", Rerequest Interval:".$rerequest); + +@@ -556,7 +556,7 @@ + if (!empty($return)) + { + sleep(3); +- $result = exec("kill ".$kill); ++ passthru("kill ".$kill); + // try to remove the pid file + @unlink($cfg["torrent_file_path"].$alias_file.".pid"); + header("location: ".$return.".php?op=queueSettings"); +@@ -952,7 +952,7 @@ + ".$loadavg.""; + } +diff -urNad torrentflux~/html/settingsfunctions.php torrentflux/html/settingsfunctions.php +--- torrentflux~/html/settingsfunctions.php 2006-12-16 10:50:05.000000000 -0800 ++++ torrentflux/html/settingsfunctions.php 2006-12-16 10:52:07.000000000 -0800 +@@ -191,7 +191,7 @@ + } + else + { +- if ($file == trim(shell_exec("ls ".$file))) ++ if ($file == trim(shell_exec("ls ".escapeshellarg($file)))) + { + $rtnValue = True; + } --- torrentflux-2.3.orig/debian/patches/07_fix_displayed_version.dpatch +++ torrentflux-2.3/debian/patches/07_fix_displayed_version.dpatch @@ -0,0 +1,19 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 07_fix_displayed_version.dpatch by +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Update the displayed version number to match the website. + +@DPATCH@ +diff -urNad torrentflux~/html/config.php torrentflux/html/config.php +--- torrentflux~/html/config.php 2006-10-14 15:48:39.000000000 -0700 ++++ torrentflux/html/config.php 2006-10-14 15:51:33.000000000 -0700 +@@ -60,7 +60,7 @@ + $cfg["pagetitle"] = "TorrentFlux"; + + // TorrentFlux Version +-$cfg["version"] = "2.1 beta"; ++$cfg["version"] = "2.1 final"; + + // CONSTANTS + $cfg["constants"] = array(); --- torrentflux-2.3.orig/debian/patches/10_sanitize_file_input.dpatch +++ torrentflux-2.3/debian/patches/10_sanitize_file_input.dpatch @@ -0,0 +1,179 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 10_sanitize_file_input.dpatch by +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Sanitize the file inputs to prevent creation/deletion of other files. + +@DPATCH@ +diff -urNad torrentflux~/html/admin.php torrentflux/html/admin.php +--- torrentflux~/html/admin.php 2006-11-21 22:03:53.000000000 -0800 ++++ torrentflux/html/admin.php 2006-11-21 22:03:54.000000000 -0800 +@@ -1560,7 +1560,8 @@ + global $cfg; + + $tmpPath = getRequestVar("path"); +- if (!empty($tmpPath) && substr( $_POST["path"], -1 ) != "/") ++ ++ if (!empty($tmpPath) && substr( $tmpPath, -1 ) != "/") + { + // path requires a / on the end + $_POST["path"] = $_POST["path"] . "/"; +@@ -1587,11 +1588,11 @@ + AuditAction($cfg["constants"]["admin"], " Updating TorrentFlux Settings"); + + // if enabling Start QManager +- if($_POST["AllowQueing"]) ++ if($cfg["AllowQueing"]) + { + sleep(2); +- startQManager($_POST["maxServerThreads"], $_POST["maxUserThreads"], $_POST["sleepInterval"]); +- sleep(1); ++ startQManager($cfg["maxServerThreads"], $cfg["maxUserThreads"], $cfg["sleepInterval"]); ++ sleep(1); + } + } + else +diff -urNad torrentflux~/html/functions.php torrentflux/html/functions.php +--- torrentflux~/html/functions.php 2006-11-21 22:03:53.000000000 -0800 ++++ torrentflux/html/functions.php 2006-11-21 22:05:40.000000000 -0800 +@@ -2139,6 +2139,66 @@ + } + + //************************************************************************** ++// SecurityClean() ++// Cleans the file name for delete and alias file creation ++function SecurityClean($string) ++{ ++ global $cfg; ++ ++ if (empty($string)) ++ { ++ return $string; ++ } ++ ++ $array = array("<", ">", "\\", "//", "..", "'", "/"); ++ foreach ($array as $char) ++ { ++ $string = str_replace($char, NULL, $string); ++ } ++ ++ if( (strtolower( substr( $string, -8 ) ) == ".torrent") || (strtolower( substr( $string, -5 ) ) == ".stat") ) ++ { ++ // we are good ++ } ++ else ++ { ++ AuditAction($cfg["constants"]["error"], "Not a stat or torrent: " . $string); ++ die("Invalid file specified. Action has been logged."); ++ } ++ return $string; ++} ++ ++//************************************************************************** ++// SecurityCleanPath() ++// Cleans the file name for nfo and txt file viewing ++function SecurityCleanPath($string) ++{ ++ global $cfg; ++ ++ if (empty($string)) ++ { ++ return $string; ++ } ++ ++ $array = array("<", ">", "\\", "//", "..", "'"); ++ foreach ($array as $char) ++ { ++ $string = str_replace($char, NULL, $string); ++ } ++ ++ if( (strtolower( substr( $string, -4 ) ) == ".txt") || (strtolower( substr( $string, -4 ) ) == ".nfo") ) ++ { ++ // we are good ++ } ++ else ++ { ++ AuditAction($cfg["constants"]["error"], "Not a text or NFO: " . $string); ++ die("Invalid file specified. Action has been logged."); ++ } ++ return $string; ++} ++ ++//************************************************************************** + // getDirList() + // This method Builds and displays the Torrent Section of the Index Page + function getDirList($dirName) +diff -urNad torrentflux~/html/index.php torrentflux/html/index.php +--- torrentflux~/html/index.php 2006-11-21 22:03:53.000000000 -0800 ++++ torrentflux/html/index.php 2006-11-21 22:03:54.000000000 -0800 +@@ -478,10 +478,10 @@ + + + // if a file was set to be deleted then delete it +-$delfile = getRequestVar('delfile'); ++$delfile = SecurityClean(getRequestVar('delfile')); + if(! $delfile == '') + { +- $alias_file = getRequestVar('alias_file'); ++ $alias_file = SecurityClean(getRequestVar('alias_file')); + if (($cfg["user"] == getOwner($delfile)) || IsAdmin()) + { + @unlink($cfg["torrent_file_path"].$delfile); +@@ -506,13 +506,13 @@ + + // Did the user select the option to kill a running torrent? + $kill = getRequestVar('kill'); +-if(! $kill == '') ++if(! $kill == '' && is_numeric($kill) ) + { + include_once("AliasFile.php"); + include_once("RunningTorrent.php"); + + $kill_torrent = getRequestVar('kill_torrent'); +- $alias_file = getRequestVar('alias_file'); ++ $alias_file = SecurityClean(getRequestVar('alias_file')); + // We are going to write a '0' on the front of the stat file so that + // the BT client will no to stop -- this will report stats when it dies + $the_user = getOwner($kill_torrent); +@@ -572,7 +572,7 @@ + // Did the user select the option to remove a torrent from the Queue? + if(isset($_REQUEST["dQueue"])) + { +- $alias_file = getRequestVar('alias_file'); ++ $alias_file = SecurityClean(getRequestVar('alias_file')); + $QEntry = getRequestVar('QEntry'); + + // Is the Qinfo file still there? +diff -urNad torrentflux~/html/readmsg.php torrentflux/html/readmsg.php +--- torrentflux~/html/readmsg.php 2006-11-21 21:24:51.000000000 -0800 ++++ torrentflux/html/readmsg.php 2006-11-21 22:03:54.000000000 -0800 +@@ -41,7 +41,7 @@ + } + + $mid = getRequestVar('mid'); +-if (!empty($mid)) ++if (!empty($mid) && is_numeric($mid)) + { + list($from_user, $message, $ip, $time, $isnew, $force_read) = GetMessage($mid); + if(!empty($from_user) && $isnew == 1) +diff -urNad torrentflux~/html/viewnfo.php torrentflux/html/viewnfo.php +--- torrentflux~/html/viewnfo.php 2006-11-21 22:03:53.000000000 -0800 ++++ torrentflux/html/viewnfo.php 2006-11-21 22:06:27.000000000 -0800 +@@ -29,7 +29,7 @@ + + DisplayHead("View NFO"); + +-$file = getRequestVar("path"); ++$file = SecurityCleanPath(getRequestVar("path")); + $folder = htmlspecialchars( substr( $file, 0, strrpos( $file, "/" ) ) ); + + if( ( $output = @file_get_contents( $cfg["path"] . $file ) ) === false ) +@@ -42,7 +42,7 @@ + +
+ 
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Remove the changing of the file locations when the initial user logs in.
+
+@DPATCH@
+diff -urNad torrentflux~/html/login.php torrentflux/html/login.php
+--- torrentflux~/html/login.php	2007-04-17 12:02:56.000000000 -0700
++++ torrentflux/html/login.php	2007-04-17 12:44:48.000000000 -0700
+@@ -201,34 +201,6 @@
+         $result = $db->Execute($sql);
+         showError($db,$sql);
+ 
+-        // Test and setup some paths for the TF settings
+-        $pythonCmd = $cfg["pythonCmd"];
+-        $btphpbin = getcwd() . "/TF_BitTornado/btphptornado.py";
+-        $tfQManager = getcwd() . "/TF_BitTornado/tfQManager.py";
+-        $maketorrent = getcwd() . "/TF_BitTornado/btmakemetafile.py";
+-        $btshowmetainfo = getcwd() . "/TF_BitTornado/btshowmetainfo.py";
+-        $tfPath = getcwd() . "/downloads/";
+-
+-        if (!isFile($cfg["pythonCmd"]))
+-        {
+-            $pythonCmd = trim(shell_exec("which python"));
+-            if ($pythonCmd == "")
+-            {
+-                $pythonCmd = $cfg["pythonCmd"];
+-            }
+-        }
+-
+-        $settings = array(
+-                            "pythonCmd" => $pythonCmd,
+-                            "btphpbin" => $btphpbin,
+-                            "tfQManager" => $tfQManager,
+-                            "btmakemetafile" => $maketorrent,
+-                            "btshowmetainfo" => $btshowmetainfo,
+-                            "path" => $tfPath
+-                        );
+-
+-        saveSettings($settings);
+-        AuditAction($cfg["constants"]["update"], "Initial Settings Updated for first login.");
+         $next_loc = "admin.php?op=configSettings";
+     }
+         
--- torrentflux-2.3.orig/debian/patches/00list
+++ torrentflux-2.3/debian/patches/00list
@@ -0,0 +1,15 @@
+01_timtuckerfixes.dpatch
+02_dbconfig-common.dpatch
+03_remove_initial_db_insert.dpatch
+04_fix_python_filename_dependence.dpatch
+05_change_env_to_python.dpatch
+# 06_sanitize_html_entities.dpatch	# included in upstream from 2.3
+# 07_fix_displayed_version.dpatch	# only needed for 2.1
+08_http_query_builder.dpatch
+09_fix_directory_traversal.dpatch
+# 10_sanitize_file_input.dpatch		# included in upstream from 2.3
+# 11_missed_security_fixes.dpatch	# included in upstream from 2.3
+# 12_metaInfo_remote_command.dpatch	# included in upstream from 2.3
+# 13_possible_xss_vulnerability.dpatch	# included in upstream from 2.3
+# 14_maketorrent_remote_command.dpatch	# included in upstream from 2.3
+# 15_additional_possible_fixes.dpatch	# included in upstream from 2.3
--- torrentflux-2.3.orig/debian/patches/13_possible_xss_vulnerability.dpatch
+++ torrentflux-2.3/debian/patches/13_possible_xss_vulnerability.dpatch
@@ -0,0 +1,58 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 13_possible_xss_vulnerability.dpatch by  
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Fix a possible XSS vulnerability due to urldecoding after htmlentities.
+
+@DPATCH@
+diff -urNad torrentflux~/html/dir.php torrentflux/html/dir.php
+--- torrentflux~/html/dir.php	2006-12-09 15:19:23.000000000 -0800
++++ torrentflux/html/dir.php	2006-12-09 15:20:30.000000000 -0800
+@@ -258,7 +258,7 @@
+ 
+ if (!file_exists($cfg["path"].$dir))
+ {
+-    echo "".$dir." could not be found or is not valid.";
++    echo "".htmlentities($dir)." could not be found or is not valid.";
+ }
+ else
+ {
+diff -urNad torrentflux~/html/index.php torrentflux/html/index.php
+--- torrentflux~/html/index.php	2006-12-09 15:19:23.000000000 -0800
++++ torrentflux/html/index.php	2006-12-09 15:29:13.000000000 -0800
+@@ -394,7 +394,7 @@
+         if (is_file($cfg["torrent_file_path"].$file_name))
+         {
+             // Error
+-            $messages .= "Error with (".$file_name."), the file already exists on the server.
[Refresh]
"; ++ $messages .= "Error with (".htmlentities($file_name)."), the file already exists on the server.
[Refresh]
"; + $ext_msg = "DUPLICATE :: "; + } + else +@@ -407,7 +407,7 @@ + } + else + { +- $messages .= "Error Getting the File (".$file_name."), Could be a Dead URL.
[Refresh]
"; ++ $messages .= "Error Getting the File (".htmlentities($file_name)."), Could be a Dead URL.
[Refresh]
"; + } + + if ($messages == "") +@@ -440,7 +440,7 @@ + if (is_file($cfg["torrent_file_path"].$file_name)) + { + // Error +- $messages .= "Error with (".$file_name."), the file already exists on the server.
[Refresh]
"; ++ $messages .= "Error with (".htmlentities($file_name)."), the file already exists on the server.
[Refresh]
"; + $ext_msg = "DUPLICATE :: "; + } + else +@@ -455,7 +455,7 @@ + } + else + { +- $messages .= "ERROR: File not uploaded, file could not be found or could not be moved:
".$cfg["torrent_file_path"] . $file_name."

"; ++ $messages .= "ERROR: File not uploaded, file could not be found or could not be moved:
".$cfg["torrent_file_path"] . htmlentities($file_name)."

"; + } + } + } --- torrentflux-2.3.orig/debian/patches/08_http_query_builder.dpatch +++ torrentflux-2.3/debian/patches/08_http_query_builder.dpatch @@ -0,0 +1,19 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 08_http_query_builder.dpatch by +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Fix http_query_builder() recursive call error in SearchEngineBase.php. + +@DPATCH@ +diff -urNad torrentflux~/html/searchEngines/SearchEngineBase.php torrentflux/html/searchEngines/SearchEngineBase.php +--- torrentflux~/html/searchEngines/SearchEngineBase.php 2006-12-09 12:39:23.000000000 -0800 ++++ torrentflux/html/searchEngines/SearchEngineBase.php 2006-12-09 12:42:25.000000000 -0800 +@@ -145,7 +145,7 @@ + $tmp_key = urlencode(is_int($k) ? $numeric_prefix.$k : $k); + if ($key) $tmp_key = $key.'['.$tmp_key.']'; + if ( is_array($v) || is_object($v) ) { +- $res[] = http_query_builder($v, null, $tmp_key); ++ $res[] = $this->http_query_builder($v, null, $tmp_key); + } else { + $res[] = $tmp_key."=".urlencode($v); + } --- torrentflux-2.3.orig/debian/patches/04_fix_python_filename_dependence.dpatch +++ torrentflux-2.3/debian/patches/04_fix_python_filename_dependence.dpatch @@ -0,0 +1,153 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 04_fix_python_filename_dependence.dpatch by +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Remove all dependence on the python file names. + +@DPATCH@ +diff -urNad torrentflux~/html/TF_BitTornado/tfQManager.py torrentflux/html/TF_BitTornado/tfQManager.py +--- torrentflux~/html/TF_BitTornado/tfQManager.py 2007-04-17 12:02:56.000000000 -0700 ++++ torrentflux/html/TF_BitTornado/tfQManager.py 2007-04-17 12:51:58.000000000 -0700 +@@ -46,13 +46,11 @@ + # this will be used during the process Counts to ensure we are + # unique from other running instances. + +- ePath = execPath.split(" ") +- for x in ePath: +- if (re.search('btphptornado', x) > 0 ): +- btphp = x ++ ePath = execPath.split() ++ btphp = ePath[-1] + if __debug__: traceMsg("btphp ->"+btphp) + +- if (re.search('btphptornado', btphp) > 0 ): ++ if (1): + try: + while 1: + +@@ -193,7 +191,7 @@ + psLine = [] + line = "" + counter = 0 +- list = doCommand("ps x -o pid,ppid,command -ww | grep '" + btphp + "' | grep -v tfQManager | grep -v grep") ++ list = doCommand("ps x -o pid,ppid,command -ww | grep '" + btphp + "' | grep -v " + argv[0] + " | grep -v grep") + + try: + for c in list: +@@ -204,7 +202,7 @@ + + # look for the grep line + for line in psLine: +- if (re.search('btphptornado.py',line) > 0): ++ if (re.search(btphp,line) > 0): + # now see if this is the main process and not a child. + if (re.search(' 1 /',line) > 0): + counter += 1 +@@ -238,7 +236,7 @@ + psLine = [] + line = "" + counter = 0 +- list = doCommand("ps x -o pid,ppid,command -ww | grep '" + btphp + "' | grep -v tfQManager | grep -v grep") ++ list = doCommand("ps x -o pid,ppid,command -ww | grep '" + btphp + "' | grep -v " + argv[0] + " | grep -v grep") + + try: + for c in list: +@@ -249,7 +247,7 @@ + + # look for the grep line + for line in psLine: +- if (re.search('btphptornado.py',line) > 0): ++ if (re.search(btphp,line) > 0): + # now see if this is the main process and not a child. + if (re.search(' 1 /',line) > 0): + # look for the userName +diff -urNad torrentflux~/html/admin.php torrentflux/html/admin.php +--- torrentflux~/html/admin.php 2007-04-17 12:03:23.000000000 -0700 ++++ torrentflux/html/admin.php 2007-04-17 12:51:58.000000000 -0700 +@@ -1282,16 +1282,16 @@ + + + +- btphptornado.py Path
+- Specify the path to the btphptornado.py python script: ++ btphptornado Path
++ Specify the path to the btphptornado python script: + + + " size="55"> + + + +- btshowmetainfo.py Path
+- Specify the path to the btshowmetainfo.py python script: ++ btshowmetainfo Path
++ Specify the path to the btshowmetainfo python script: + + + " size="55"> +@@ -1422,8 +1422,8 @@ + + + +- btmakemetafile.py Path
+- Specify the path to the btmakemetafile.py python script (used for making torrents): ++ btmakemetafile Path
++ Specify the path to the btmakemetafile python script (used for making torrents): + + + " size="55"> +@@ -1832,7 +1832,7 @@ + + + tfQManager Path
+- Specify the path to the tfQManager.py python script: ++ Specify the path to the tfQManager python script: + + + " size="55"> +diff -urNad torrentflux~/html/functions.php torrentflux/html/functions.php +--- torrentflux~/html/functions.php 2007-04-17 12:03:23.000000000 -0700 ++++ torrentflux/html/functions.php 2007-04-17 12:51:58.000000000 -0700 +@@ -1494,14 +1494,7 @@ + // returns true if client is tornado + function usingTornado() + { +- global $cfg; +- $rtnValue = false; +- if (preg_match("/btphptornado/i", $cfg["btphpbin"])) +- { +- $rtnValue = true; +- } +- +- return $rtnValue; ++ return true; + } + + //************************************************************************** +@@ -1954,7 +1947,7 @@ + { + global $cfg; + +- return shell_exec("ps x -o pid='' -o ppid='' -o command='' -ww | grep btphptornado | grep ".$cfg["torrent_file_path"]." | grep -v grep"); ++ return shell_exec("ps x -o pid='' -o ppid='' -o command='' -ww | grep ".basename($cfg["btphpbin"])." | grep ".$cfg["torrent_file_path"]." | grep -v grep"); + } + + //************************************************************************** +@@ -1991,7 +1984,7 @@ + } + else + { +- if(strpos($arScreen[$i], "btphptornado.py") !== false) ++ if(strpos($arScreen[$i], basename($cfg["btphpbin"])) !== false) + { + $pinfo = new ProcessInfo($arScreen[$i]); + +@@ -2098,7 +2091,7 @@ + { + if(! strpos($arScreen[$i], $cfg["tfQManager"]) > 0) + { +- if(strpos($arScreen[$i], "btphptornado.py") !== false) ++ if(strpos($arScreen[$i], basename($cfg["btphpbin"])) !== false) + { + $pinfo = new ProcessInfo($arScreen[$i]); + --- torrentflux-2.3.orig/debian/patches/02_dbconfig-common.dpatch +++ torrentflux-2.3/debian/patches/02_dbconfig-common.dpatch @@ -0,0 +1,32 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 02_dbconfig-common.dpatch by +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: No description. + +@DPATCH@ +diff -urNad torrentflux~/html/config.php torrentflux/html/config.php +--- torrentflux~/html/config.php 2006-04-06 23:23:10.000000000 -0700 ++++ torrentflux/html/config.php 2006-04-06 23:41:41.000000000 -0700 +@@ -28,11 +28,16 @@ + /**************************************************************************/ + // Check the adodb/drivers/ directory for support for your database + // you may choose from many (mysql is the default) +-$cfg["db_type"] = "mysql"; // mysql, postgres7 view adodb/drivers/ +-$cfg["db_host"] = "localhost"; // DB host computer name or IP +-$cfg["db_name"] = "torrentflux"; // Name of the Database +-$cfg["db_user"] = "root"; // username for your MySQL database +-$cfg["db_pass"] = ""; // password for database ++// ++// WARNING: don't change these values in this file. The values are included ++// from /etc/torrentflux/config-db.php, change them there. ++// ++include_once("/etc/torrentflux/config-db.php"); ++$cfg["db_type"] = $dbtype; // mysql, postgres7 view adodb/drivers/ ++$cfg["db_host"] = $dbserver; // DB host computer name or IP ++$cfg["db_name"] = $dbname; // Name of the Database ++$cfg["db_user"] = $dbuser; // username for your MySQL database ++$cfg["db_pass"] = $dbpass; // password for database + /**************************************************************************/ + + --- torrentflux-2.3.orig/debian/dbconfig-common/data/upgrade/mysql/2.1-1 +++ torrentflux-2.3/debian/dbconfig-common/data/upgrade/mysql/2.1-1 @@ -0,0 +1,83 @@ +-- +-- Created by Cameron Dale for debian +-- +-- Database: `torrentflux` +-- + +-- ################################################################ +-- # File to upgrade from TorrentFlux 2.0 to TorrentFlux 2.1 +-- # THIS IS FOR MYSQL DATABASE UPGRADE ONLY! +-- ################################################################ + +-- -------------------------------------------------------- + +-- +-- Table structure for new table `tf_settings` +-- + +CREATE TABLE /*!32312 IF NOT EXISTS*/ `tf_settings` ( + `tf_key` varchar(255) NOT NULL default '', + `tf_value` text NOT NULL, + PRIMARY KEY (`tf_key`) +) TYPE=MyISAM; + +-- +-- Dumping default data for table `tf_settings` +-- + +INSERT IGNORE INTO `tf_settings` VALUES ('path', '/var/cache/torrentflux/'); +INSERT IGNORE INTO `tf_settings` VALUES ('btphpbin', '/usr/bin/btphptornado.torrentflux'); +INSERT IGNORE INTO `tf_settings` VALUES ('btshowmetainfo', '/usr/bin/btshowmetainfo.torrentflux'); +INSERT IGNORE INTO `tf_settings` VALUES ('advanced_start', '1'); +INSERT IGNORE INTO `tf_settings` VALUES ('max_upload_rate', '10'); +INSERT IGNORE INTO `tf_settings` VALUES ('max_download_rate', '0'); +INSERT IGNORE INTO `tf_settings` VALUES ('max_uploads', '4'); +INSERT IGNORE INTO `tf_settings` VALUES ('minport', '49160'); +INSERT IGNORE INTO `tf_settings` VALUES ('maxport', '49300'); +INSERT IGNORE INTO `tf_settings` VALUES ('rerequest_interval', '1800'); +INSERT IGNORE INTO `tf_settings` VALUES ('cmd_options', ''); +INSERT IGNORE INTO `tf_settings` VALUES ('enable_search', '1'); +INSERT IGNORE INTO `tf_settings` VALUES ('enable_file_download', '1'); +INSERT IGNORE INTO `tf_settings` VALUES ('enable_view_nfo', '1'); +INSERT IGNORE INTO `tf_settings` VALUES ('package_type', 'zip'); +INSERT IGNORE INTO `tf_settings` VALUES ('show_server_load', '1'); +INSERT IGNORE INTO `tf_settings` VALUES ('loadavg_path', '/proc/loadavg'); +INSERT IGNORE INTO `tf_settings` VALUES ('days_to_keep', '30'); +INSERT IGNORE INTO `tf_settings` VALUES ('minutes_to_keep', '3'); +INSERT IGNORE INTO `tf_settings` VALUES ('rss_cache_min', '20'); +INSERT IGNORE INTO `tf_settings` VALUES ('page_refresh', '60'); +INSERT IGNORE INTO `tf_settings` VALUES ('default_theme', 'matrix'); +INSERT IGNORE INTO `tf_settings` VALUES ('default_language', 'lang-english.php'); +INSERT IGNORE INTO `tf_settings` VALUES ('debug_sql', '1'); +INSERT IGNORE INTO `tf_settings` VALUES ('torrent_dies_when_done', 'False'); +INSERT IGNORE INTO `tf_settings` VALUES ('sharekill', '150'); +INSERT IGNORE INTO `tf_settings` VALUES ('tfQManager', '/usr/bin/tfQManager.torrentflux'); +INSERT IGNORE INTO `tf_settings` VALUES ('AllowQueing', '0'); +INSERT IGNORE INTO `tf_settings` VALUES ('maxServerThreads', '5'); +INSERT IGNORE INTO `tf_settings` VALUES ('maxUserThreads', '2'); +INSERT IGNORE INTO `tf_settings` VALUES ('sleepInterval', '10'); +INSERT IGNORE INTO `tf_settings` VALUES ('debugTorrents', '0'); +INSERT IGNORE INTO `tf_settings` VALUES ('pythonCmd', '/usr/bin/python'); +INSERT IGNORE INTO `tf_settings` VALUES ('searchEngine', 'TorrentSpy'); +INSERT IGNORE INTO `tf_settings` VALUES ('TorrentSpyGenreFilter', 'a:3:{i:0;s:2:"11";i:1;s:1:"6";i:2;s:1:"7";}'); +INSERT IGNORE INTO `tf_settings` VALUES ('TorrentBoxGenreFilter', 'a:3:{i:0;s:1:"0";i:1;s:1:"9";i:2;s:2:"10";}'); +INSERT IGNORE INTO `tf_settings` VALUES ('TorrentPortalGenreFilter', 'a:3:{i:0;s:1:"0";i:1;s:1:"6";i:2;s:2:"10";}'); +INSERT IGNORE INTO `tf_settings` VALUES ('enable_maketorrent','0'); +INSERT IGNORE INTO `tf_settings` VALUES ('btmakemetafile','/usr/bin/btmakemetafile.torrentflux'); +INSERT IGNORE INTO `tf_settings` VALUES ('enable_torrent_download','1'); +INSERT IGNORE INTO `tf_settings` VALUES ('enable_file_priority','1'); + + +-- -------------------------------------------------------- + +-- +-- Table structure for new table `tf_cookies` +-- + +CREATE TABLE /*!32312 IF NOT EXISTS*/ `tf_cookies` ( + `cid` tinyint(5) NOT NULL auto_increment, + `uid` int(10) NOT NULL, + `host` varchar(255) default NULL, + `data` varchar(255) default NULL, + PRIMARY KEY (`cid`) +) TYPE=MyISAM ; --- torrentflux-2.3.orig/debian/dbconfig-common/data/upgrade/mysql/2.3-2 +++ torrentflux-2.3/debian/dbconfig-common/data/upgrade/mysql/2.3-2 @@ -0,0 +1,14 @@ +-- Upgrade from 2.1 to 2.2 + +ALTER TABLE `tf_links` ADD ( + `sitename` varchar(255) NOT NULL default 'Old Link', + `sort_order` tinyint(3) unsigned default '0' +); + +INSERT IGNORE INTO `tf_settings` VALUES ('security_code','0'); + +ALTER TABLE `tf_cookies` CHANGE `cid` `cid` INT( 10 ) NOT NULL AUTO_INCREMENT; + +-- Upgrade from 2.2 to 2.3 + +-- Nothing to do --- torrentflux-2.3.orig/debian/dbconfig-common/data/upgrade/mysql/2.0beta1-1 +++ torrentflux-2.3/debian/dbconfig-common/data/upgrade/mysql/2.0beta1-1 @@ -0,0 +1,11 @@ +-- +-- Created by Cameron Dale for debian +-- +-- Database: `torrentflux` +-- + +-- -------------------------------------------------------- + +-- Update the tables for the new version + +ALTER TABLE `tf_messages` CHANGE `new` `IsNew` INTEGER"; --- torrentflux-2.3.orig/debian/dbconfig-common/data/install/mysql +++ torrentflux-2.3/debian/dbconfig-common/data/install/mysql @@ -0,0 +1,160 @@ +-- phpMyAdmin SQL Dump +-- -------------------------------------------------------- + +-- +-- Table structure for table `tf_links` +-- + +CREATE TABLE /*!32312 IF NOT EXISTS*/ `tf_links` ( + `lid` int(10) NOT NULL auto_increment, + `url` varchar(255) NOT NULL default '', + `sitename` varchar(255) NOT NULL default 'Old Link', + `sort_order` tinyint(3) unsigned default '0', + PRIMARY KEY (`lid`) +) TYPE=MyISAM AUTO_INCREMENT=1 ; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `tf_log` +-- + +CREATE TABLE /*!32312 IF NOT EXISTS*/ `tf_log` ( + `cid` int(14) NOT NULL auto_increment, + `user_id` varchar(32) NOT NULL default '', + `file` varchar(200) NOT NULL default '', + `action` varchar(200) NOT NULL default '', + `ip` varchar(15) NOT NULL default '', + `ip_resolved` varchar(200) NOT NULL default '', + `user_agent` varchar(200) NOT NULL default '', + `time` varchar(14) NOT NULL default '0', + PRIMARY KEY (`cid`) +) TYPE=MyISAM AUTO_INCREMENT=1 ; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `tf_messages` +-- + +CREATE TABLE /*!32312 IF NOT EXISTS*/ `tf_messages` ( + `mid` int(10) NOT NULL auto_increment, + `to_user` varchar(32) NOT NULL default '', + `from_user` varchar(32) NOT NULL default '', + `message` text, + `IsNew` int(11) default NULL, + `ip` varchar(15) NOT NULL default '', + `time` varchar(14) NOT NULL default '0', + `force_read` tinyint(1) default '0', + PRIMARY KEY (`mid`) +) TYPE=MyISAM AUTO_INCREMENT=1 ; + + +-- -------------------------------------------------------- + +-- +-- Table structure for table `tf_rss` +-- + +CREATE TABLE /*!32312 IF NOT EXISTS*/ `tf_rss` ( + `rid` int(10) NOT NULL auto_increment, + `url` varchar(255) NOT NULL default '', + PRIMARY KEY (`rid`) +) TYPE=MyISAM AUTO_INCREMENT=1 ; + + + +-- -------------------------------------------------------- + +-- +-- Table structure for table `tf_settings` +-- + +CREATE TABLE /*!32312 IF NOT EXISTS*/ `tf_settings` ( + `tf_key` varchar(255) NOT NULL default '', + `tf_value` text NOT NULL, + PRIMARY KEY (`tf_key`) +) TYPE=MyISAM; + +-- +-- Dumping data for table `tf_settings` +-- + +INSERT IGNORE INTO `tf_settings` VALUES ('path', '/var/cache/torrentflux/'); +INSERT IGNORE INTO `tf_settings` VALUES ('btphpbin', '/usr/bin/btphptornado.torrentflux'); +INSERT IGNORE INTO `tf_settings` VALUES ('btshowmetainfo', '/usr/bin/btshowmetainfo.torrentflux'); +INSERT IGNORE INTO `tf_settings` VALUES ('advanced_start', '1'); +INSERT IGNORE INTO `tf_settings` VALUES ('max_upload_rate', '10'); +INSERT IGNORE INTO `tf_settings` VALUES ('max_download_rate', '0'); +INSERT IGNORE INTO `tf_settings` VALUES ('max_uploads', '4'); +INSERT IGNORE INTO `tf_settings` VALUES ('minport', '49160'); +INSERT IGNORE INTO `tf_settings` VALUES ('maxport', '49300'); +INSERT IGNORE INTO `tf_settings` VALUES ('rerequest_interval', '1800'); +INSERT IGNORE INTO `tf_settings` VALUES ('cmd_options', ''); +INSERT IGNORE INTO `tf_settings` VALUES ('enable_search', '1'); +INSERT IGNORE INTO `tf_settings` VALUES ('enable_file_download', '1'); +INSERT IGNORE INTO `tf_settings` VALUES ('enable_view_nfo', '1'); +INSERT IGNORE INTO `tf_settings` VALUES ('package_type', 'zip'); +INSERT IGNORE INTO `tf_settings` VALUES ('show_server_load', '1'); +INSERT IGNORE INTO `tf_settings` VALUES ('loadavg_path', '/proc/loadavg'); +INSERT IGNORE INTO `tf_settings` VALUES ('days_to_keep', '30'); +INSERT IGNORE INTO `tf_settings` VALUES ('minutes_to_keep', '3'); +INSERT IGNORE INTO `tf_settings` VALUES ('rss_cache_min', '20'); +INSERT IGNORE INTO `tf_settings` VALUES ('page_refresh', '60'); +INSERT IGNORE INTO `tf_settings` VALUES ('default_theme', 'matrix'); +INSERT IGNORE INTO `tf_settings` VALUES ('default_language', 'lang-english.php'); +INSERT IGNORE INTO `tf_settings` VALUES ('debug_sql', '1'); +INSERT IGNORE INTO `tf_settings` VALUES ('torrent_dies_when_done', 'False'); +INSERT IGNORE INTO `tf_settings` VALUES ('sharekill', '150'); +INSERT IGNORE INTO `tf_settings` VALUES ('tfQManager', '/usr/bin/tfQManager.torrentflux'); +INSERT IGNORE INTO `tf_settings` VALUES ('AllowQueing', '0'); +INSERT IGNORE INTO `tf_settings` VALUES ('maxServerThreads', '5'); +INSERT IGNORE INTO `tf_settings` VALUES ('maxUserThreads', '2'); +INSERT IGNORE INTO `tf_settings` VALUES ('sleepInterval', '10'); +INSERT IGNORE INTO `tf_settings` VALUES ('debugTorrents', '0'); +INSERT IGNORE INTO `tf_settings` VALUES ('pythonCmd', '/usr/bin/python'); +INSERT IGNORE INTO `tf_settings` VALUES ('searchEngine', 'TorrentSpy'); +INSERT IGNORE INTO `tf_settings` VALUES ('TorrentSpyGenreFilter', 'a:3:{i:0;s:2:"11";i:1;s:1:"6";i:2;s:1:"7";}'); +INSERT IGNORE INTO `tf_settings` VALUES ('TorrentBoxGenreFilter', 'a:3:{i:0;s:1:"0";i:1;s:1:"9";i:2;s:2:"10";}'); +INSERT IGNORE INTO `tf_settings` VALUES ('TorrentPortalGenreFilter', 'a:3:{i:0;s:1:"0";i:1;s:1:"6";i:2;s:2:"10";}'); +INSERT IGNORE INTO `tf_settings` VALUES ('enable_maketorrent','0'); +INSERT IGNORE INTO `tf_settings` VALUES ('btmakemetafile','/usr/bin/btmakemetafile.torrentflux'); +INSERT IGNORE INTO `tf_settings` VALUES ('enable_torrent_download','1'); +INSERT IGNORE INTO `tf_settings` VALUES ('enable_file_priority','1'); +INSERT IGNORE INTO `tf_settings` VALUES ('security_code','0'); + + + +-- -------------------------------------------------------- + +-- +-- Table structure for table `tf_users` +-- + +CREATE TABLE /*!32312 IF NOT EXISTS*/ `tf_users` ( + `uid` int(10) NOT NULL auto_increment, + `user_id` varchar(32) NOT NULL default '', + `password` varchar(34) NOT NULL default '', + `hits` int(10) NOT NULL default '0', + `last_visit` varchar(14) NOT NULL default '0', + `time_created` varchar(14) NOT NULL default '0', + `user_level` tinyint(1) NOT NULL default '0', + `hide_offline` tinyint(1) NOT NULL default '0', + `theme` varchar(100) NOT NULL default 'mint', + `language_file` varchar(60) default 'lang-english.php', + PRIMARY KEY (`uid`) +) TYPE=MyISAM AUTO_INCREMENT=1 ; + + + +-- +-- Table structure for table `tf_cookies` +-- + +CREATE TABLE /*!32312 IF NOT EXISTS*/ `tf_cookies` ( + `cid` INT( 10 ) NOT NULL AUTO_INCREMENT, + `uid` int(10) NOT NULL, + `host` varchar(255) default NULL, + `data` varchar(255) default NULL, + PRIMARY KEY (`cid`) +) TYPE=MyISAM ; --- torrentflux-2.3.orig/debian/copyright +++ torrentflux-2.3/debian/copyright @@ -0,0 +1,68 @@ +This package was debianized by Cameron Dale on +Wed, 4 Jan 2006 16:09:45 -0800. + +It was downloaded from http://www.torrentflux.com + +Copyright Holder: Qrome: http://www.torrentflux.com/contact.php + +License: + + This package is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This package is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this package; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +On Debian systems, the complete text of the GNU General +Public License can be found in `/usr/share/common-licenses/GPL'. + + +The source package contains source files from ADOdb + +It can be found at: http://adodb.sourceforge.net/ + +ADOdb is Copyright 2000, 2001, 2002, 2003, 2004 John Lim, licensed under +the GNU Lesser General Public License which, on Debian systems, can be found +in '/usr/share/common-licenses/LGPL'. + + +The package also contains source from BitTornado and two installed +scripts based on BitTornado: btphptornado.torrentflux and +btshowmetainfo.torrentflux. The source is available from +http://bittornado.com/download.html and was modified by +theshadow@degreez.net. + +License: + + Copyright (C) 2001-2002 Bram Cohen + + Permission is hereby granted, free of charge, to any person + obtaining a copy of this software and associated documentation files + (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, + publish, distribute, sublicense, and/or sell copies of the Software, + and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + The Software is provided "AS IS", without warranty of any kind, + express or implied, including but not limited to the warranties of + merchantability, fitness for a particular purpose and + noninfringement. In no event shall the authors or copyright holders + be liable for any claim, damages or other liability, whether in an + action of contract, tort or otherwise, arising from, out of or in + connection with the Software or the use or other dealings in the + Software. + +The script btshowmetainfo.torrentflux was written by Henry 'Pi' James +and Loring Holden, and modified for multitracker display by John Hoffman --- torrentflux-2.3.orig/debian/torrentflux.install +++ torrentflux-2.3/debian/torrentflux.install @@ -0,0 +1,16 @@ +# Web files +html/* usr/share/torrentflux/www + +# Binary files +html/TF_BitTornado/*.py usr/bin + +# Apache config file +debian/apache.conf etc/torrentflux + +# Database config files +debian/dbconfig-common/data/install/mysql usr/share/dbconfig-common/data/torrentflux/install +debian/dbconfig-common/data/upgrade/mysql/* usr/share/dbconfig-common/data/torrentflux/upgrade/mysql + +# Database config files for documentation +debian/dbconfig-common/data/install/mysql usr/share/doc/torrentflux/dbfiles +debian/dbconfig-common/data/upgrade/mysql/* usr/share/doc/torrentflux/dbfiles --- torrentflux-2.3.orig/debian/btmakemetafile.torrentflux.sgml +++ torrentflux-2.3/debian/btmakemetafile.torrentflux.sgml @@ -0,0 +1,104 @@ + manpage.1'. You may view + the manual page with: `docbook-to-man manpage.sgml | nroff -man | + less'. A typical entry in a Makefile or Makefile.am is: + +manpage.1: manpage.sgml + docbook-to-man $< > $@ + + + The docbook-to-man binary is found in the docbook-to-man package. + Please remember that if you create the nroff version in one of the + debian/rules file targets (such as build), you will need to include + docbook-to-man in your Build-Depends control field. + + --> + + + Cameron"> + Dale"> + + April 7, 2006"> + + 1"> + camrdale@gmail.com"> + + BTMAKEMETAFILE.TORRENTFLUX"> + + + Debian"> + GNU"> + GPL"> +]> + + + +
+ &dhemail; +
+ + &dhfirstname; + &dhsurname; + + + 2006 + &dhusername; + + &dhdate; +
+ + &dhucpackage; + + &dhsection; + + + &dhpackage; + + a modified bittornado python file for use with torrentflux + + + DESCRIPTION + + This program should only be used via the torrentflux web interface. + + You should not use this program yourself. + + + + AUTHOR + + This manual page was written by &dhusername; <&dhemail;> for + the &debian; system (but may be used by others). Permission is + granted to copy, distribute and/or modify this document under + the terms of the &gnu; General Public License, Version 2 any + later version published by the Free Software Foundation. + + + On Debian systems, the complete text of the GNU General Public + License can be found in /usr/share/common-licenses/GPL. + + + +
+ + + +