Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- + Email: [email protected]
- + Pastebin: http://pastebin.com/u/tero
- **/
- /**
- Aceasta este o modalitate de a schimba IP-ul intr-un GRABBER care foloseste cURL (folositor pentru a evita banarea IP-ului).
- Avem nevoie de un host shared cu cPanel !
- Avem nevoie de urmatoarele:
- Un script care 'grabuieste'
- Mai multe IP-uri extrase de pe host (citeste mai jos)
- Si o bucata proprietate cURL care se foloseste integrata !
- Pentru a face rost de IP-uri avem nevoie sa ne autentificam in FTP apoi sa intram in folderul /.cpanel/datastore, din acest folder descarcam fisierul all_iplist.db. In acest fisier gasiti lista cu toate IP-urile ale serverului pe care sunteti.
- Inainte de a folosii un IP trebuie sa verificati daca IP-ul este functional, copiati IP-ul si accesatil in browser, daca se poate accesa si apare o pagina web inseamna ca este bun, daca nu incercati altul !
- Apoi avem nevoie de:
- // grab.lib.php
- **/
- class grabber{
- var $grab;
- function page($url,$mode){
- //empty ? // fallin' back to file_get_contents
- if (empty($mode)){$mode='fget';}
- if ($mode=='fget'){
- $opts = array(
- 'http'=>array(
- 'method'=>"GET",
- 'header'=>"Accept-language: en\r\n" .
- "User-Agent: SAMSUNG-SGH-E250/1.0 Profile/MIDP-2.0 Configuration/CLDC-1.1 UP.Browser/6.2.3.3.c.1.101 (GUI) MMP/2.0 (compatible; Googlebot-Mobile/2.1; +http://www.google.com/bot.html)\r\n"
- )
- );
- $context = stream_context_create($opts);
- $page=file_get_contents($url, false, $context);
- $ret = $this->grab=$page;
- }
- if ($mode=='curl'){
- $crl = curl_init();
- curl_setopt ($crl, CURLOPT_URL,$url);
- curl_setopt ($crl, CURLOPT_RETURNTRANSFER, 1);
- curl_setopt ($crl,CURLOPT_INTERFACE, '127.0.0.1');
- curl_setopt($crl,CURLOPT_USERAGENT,'SAMSUNG-SGH-E250/1.0 Profile/MIDP-2.0 Configuration/CLDC-1.1 UP.Browser/6.2.3.3.c.1.101 (GUI) MMP/2.0 (compatible; Googlebot-Mobile/2.1; +http://www.google.com/bot.html)');
- curl_setopt ($crl, CURLOPT_HTTPHEADER,array('User-Agent: SAMSUNG-SGH-E250/1.0 Profile/MIDP-2.0 Configuration/CLDC-1.1 UP.Browser/6.2.3.3.c.1.101 (GUI) MMP/2.0 (compatible; Googlebot-Mobile/2.1; +http://www.google.com/bot.html),'));
- curl_setopt($crl, CURLOPT_FOLLOWLOCATION, 1);
- $grab = curl_exec($crl); curl_close($crl);
- $page=$grab;
- $ret = $this->grab=$page;
- }
- //echo 'Using '.$mode.' fetching contents';
- return $ret; }
- }
- /**
- Si de fila care proceseaza. [DEMO]
- **/
- require_once 'grab.lib.php';
- $grab = new grabber();
- header("Content-Type: text/plain");
- function string($string, $start, $end)
- {
- $string = " " . $string ;
- $ini = strpos( $string, $start ) ;
- if ( $ini == 0 ) return "" ;
- $ini += strlen( $start ) ;
- $len = strpos( $string, $end, $ini ) - $ini ;
- return substr( $string, $ini, $len ) ;
- }
- $data = $grab->page('http://hfiles.ro/s/sisu-tudor','curl');
- $vlista = string($data, '<div id="uploader-files" class="files-table">','</div>');
- preg_match_all('|<a.*title="Download (.*?)" href="(.*?)">|',$vlista,$vfiles);
- foreach (array_combine($vfiles[1], $vfiles[2]) as $row => $row2) {
- echo $row."\nhttp://hfiles.ro".$row2."\n\n";
- }
- /**
- A se observa in fisierul grab.lib.php linia:
- **/
- curl_setopt ($crl,CURLOPT_INTERFACE, '127.0.0.1');
- /**
- Inlocuiti 127.0.0.1 cu un IP functional din fisierul all_iplist.db.
- Se poate face si un array ca folosire random dintr-o lista de ip-uri din fisierul respectiv ca la fiecare conectare, scriptu sa foloseasca alt ip !
- Este posibil ca providerul de unde aveti hostul shared sa va baneze contul pentru ca folositi asta, desi nu prea are cum sa afle...
- **/
Advertisement
Add Comment
Please, Sign In to add comment