Changeset 11471
- Timestamp:
- 08/03/07 12:44:09 (1 year ago)
- Files:
-
- trunk/midcom/com.magnettechnologies.contactgrabber/contactgrabber.php (modified) (2 diffs)
- trunk/midcom/com.magnettechnologies.contactgrabber/gmail.php (deleted)
- trunk/midcom/com.magnettechnologies.contactgrabber/hotmail.php (deleted)
- trunk/midcom/com.magnettechnologies.contactgrabber/lib/hotmail/msn_contact_grab.class.php (modified) (8 diffs)
- trunk/midcom/com.magnettechnologies.contactgrabber/lib/orkut/grabOrkut.class.php (modified) (5 diffs)
- trunk/midcom/com.magnettechnologies.contactgrabber/lib/rediff/grabRediff.class.php (modified) (8 diffs)
- trunk/midcom/com.magnettechnologies.contactgrabber/lib/yahoo/class.GrabYahoo.php (modified) (3 diffs)
- trunk/midcom/com.magnettechnologies.contactgrabber/myspace.php (deleted)
- trunk/midcom/com.magnettechnologies.contactgrabber/orkut.php (deleted)
- trunk/midcom/com.magnettechnologies.contactgrabber/rediff.php (deleted)
- trunk/midcom/com.magnettechnologies.contactgrabber/yahoo.php (deleted)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/midcom/com.magnettechnologies.contactgrabber/contactgrabber.php
r11459 r11471 91 91 require("lib/rediff/grabRediff.class.php"); 92 92 $this->_email = $_POST['username']; 93 $this-> resource_obj = new rediff();93 $this->_resource_obj = new rediff(); 94 94 } 95 95 … … 124 124 if($_POST['domain']=="hotmail.com") 125 125 { 126 require("lib/hotmail/msn_contact_grab.class.php"); 127 $this->_email = $_POST['username']."@".$_POST['domain']; 126 //require("lib/hotmail/msn_contact_grab.class.php"); 127 require('lib/hotmail/libhotmail.php'); 128 $this->_email = $_POST['username']."@".$_POST['domain']; 128 129 $this->_resource_obj = new hotmail(); 129 130 } trunk/midcom/com.magnettechnologies.contactgrabber/lib/hotmail/msn_contact_grab.class.php
r11459 r11471 30 30 $returned_emails = $msn->email_output; 31 31 32 Quick32 auick 33 33 ----- 34 34 Handling everything in just one function … … 133 133 if ($this->fp = @fsockopen($ip, $port, $errno, $errstr, 2)) 134 134 { 135 $this->trID = 1; 135 136 $this->trID = 1; 136 137 137 138 $this->_put("VER $this->trID MSNP9 CVR0\r\n"); … … 181 182 { 182 183 $returned_emails=$this->qGrab($username, $password); 183 184 echo "<pre>"; 185 print_r($returned_emails); 186 echo "</pre>"; 184 187 foreach($returned_emails as $row){ 185 188 //$totalRecords=$totalRecords+1; … … 195 198 196 199 197 //Collects the raw data containing the email addresses200 //Collects the raw data containing the email addresses 198 201 function rx_data() 199 202 { … … 205 208 $this->_put("CHG $this->trID NLN\r\n"); 206 209 207 //the count check prevents the script hanging as it waits for more content 210 211 //the count check prevents the script hanging as it waits for more content 208 212 while ((! feof($this->fp)) && (! $stream_info['timed_out']) && ($this->count <= 1)) 209 213 { 210 214 $data = $this->_get(); 211 $stream_info = stream_get_meta_data($this->fp);212 215 216 $stream_info = stream_get_meta_data($this->fp); 213 217 if ($data) 214 218 { 219 echo "<pre>"; 220 print_r($data); 221 echo "</pre>"; 215 222 switch($code = substr($data, 0, 3)) 216 223 { … … 222 229 //This prevents the script hanging as it waits for more content 223 230 $this->count++; 231 echo "MSG"; 224 232 break; 225 233 case 'LST': 226 234 //These are the email addresses 227 235 //They need to be collected in email_input 228 236 echo "FOUND"; 229 237 $this->email_input[] = $data; 230 238 … … 274 282 //needed to grab the contact list 275 283 function qGrab ($username, $password) { 276 277 284 //Connect to the MSNM service 278 285 if($this->connect($username, $password) == false) … … 280 287 echo $this->error_login; 281 288 ob_end_flush(); 282 exit;289 //exit; 283 290 } 284 291 trunk/midcom/com.magnettechnologies.contactgrabber/lib/orkut/grabOrkut.class.php
r11459 r11471 41 41 function getAddressbook($YOUR_EMAIL,$YOUR_PASSWORD) 42 42 { 43 $cookies_phase1 = ""; 43 44 $fake_proxy="Via: Proxy\r\nX-Forwarded-For: 220.".rand(100,400).".".rand(100,400).".".rand(100,400); 44 45 $response = $this->getSocket("www.google.com","https://www.google.com/accounts/ServiceLoginBox?service=orkut&nui=2&skipll=true&skipvpage=true&continue=https%3A%2F%2Fwww.orkut.com%2FRedirLogin.aspx%3Fmsg%3D0%26page%3D%252FHome.aspx&followup=https%3A%2F%2Fwww.orkut.com%2FGLogin.aspx&hl=en-US","POST",443,$fake_proxy,$cookies_phase1,"",""); … … 104 105 $cookies_Forhere = str_replace("orkut_state=","",$this->getCookies($header)); 105 106 preg_match("/orkut_state.*\=\:\;/",$header,$cookie12); 106 $cookies_phase3 = $cookies_phase2.";".$cookies_Forhere.$cookie12[0]; 107 108 if (isset($cookie12[0])) 109 { 110 $cookies_phase3 = $cookies_phase2.";".$cookies_Forhere.$cookie12[0]; 111 } 112 else 113 { 114 $cookies_phase3 = $cookies_phase2.";".$cookies_Forhere; 115 } 116 107 117 $tore1=str_replace(array("<html> <head> <title> Redirecting </title>","&",";"),array("","","&"),$body); 108 118 $fin=preg_match("/url=.*'\"/",$tore1,$out); … … 254 264 $cookie=explode("=",$cookie[0]); 255 265 $cookies[trim($cookie[0])]=trim($cookie[1]); 256 if( $cookie[2]){266 if(isset($cookie[2])){ 257 267 $cookies[trim($cookie[0])] .="=".$cookie[2]; 258 268 } … … 269 279 function getLocation($header) 270 280 { 281 $location = ""; 271 282 $returnar=explode("\r\n",$header); 272 283 for($ind=0;$ind<count($returnar);$ind++) { … … 277 288 break; 278 289 } 279 $this->splitPage($response, &$header, &$body);280 $cookies_phase1 = $this->getCookies($header);290 //$this->splitPage($response, &$header, &$body); 291 $cookies_phase1 = $this->getCookies($header); 281 292 } 282 293 return $location; trunk/midcom/com.magnettechnologies.contactgrabber/lib/rediff/grabRediff.class.php
r11459 r11471 35 35 function grabRediff() 36 36 { 37 require_once('./config.php');37 require_once('./config.php'); 38 38 $this->dir_path = $DIR_PATH; 39 39 $this->error_msg = $ERROR_LOGIN; … … 75 75 #################### STEP 2 START ######################## 76 76 77 $this->splitPage($res , &$header, &$body);77 $this->splitPage($response, &$header, &$body); 78 78 $cookies_phase2 = $cookies_phase1.";".$this->getCookies($header); 79 79 $redirect_step2 = $this->getLocation($header); … … 132 132 //echo "<table border='1'> 133 133 //<tr><td align='center'><b>Name</b></td><td align='center'><b>Email Address</b></td></tr>"; 134 //$totalRecords=0;134 $totalRecords=0; 135 135 do 136 136 { … … 152 152 $res2=curl_exec($ch4); 153 153 preg_match('/a HREF=".*Next/',$res2,$match1); 154 $match1=str_replace('a HREF="','http://f3mail.rediff.com',$match1[0]); 155 $match1=str_replace('">Next','',$match1); 154 155 // OH WELL 156 if (isset($match1[0])) 157 { 158 $match1=str_replace('a HREF="','http://f3mail.rediff.com',$match1[0]); 159 $match1=str_replace('">Next','',$match1); 156 160 157 $last=$match1; 161 $last=$match1; 162 } 158 163 $last1=$last; 159 164 $first=stripos($res2,'<INPUT TYPE=hidden NAME=tempnicks VALUE="">'); … … 171 176 $sList3 = explode("<TD class=sb2> ", $sList2[$i]); 172 177 173 if ( $sList3[1]!="")178 if (isset($sList3[1]) && $sList3[1] !="") 174 179 { 175 180 176 $totalRecords = $totalRecords +1;181 $totalRecords = $totalRecords + 1; 177 182 $sList3[1]=str_replace("\n","",$sList3[1]); 178 183 // print("<tr><td style='Font-Family:verdana;Font-Size:14'>$sList3[1]</td>"); … … 222 227 $cookie=explode("=",$cookie[0]); 223 228 $cookies[trim($cookie[0])]=trim($cookie[1]); 224 if( $cookie[2]){229 if(isset($cookie[2])){ 225 230 $cookies[trim($cookie[0])] .="=".$cookie[2]; 226 231 } … … 237 242 function getLocation($header) 238 243 { 244 $location = ""; 239 245 $returnar=explode("\r\n",$header); 240 246 for($ind=0;$ind<count($returnar);$ind++) { … … 244 250 break; 245 251 } 246 $this->splitPage($response, &$header, &$body);252 //$this->splitPage($response, &$header, &$body); 247 253 $cookies_phase1 = $this->getCookies($header); 248 254 } trunk/midcom/com.magnettechnologies.contactgrabber/lib/yahoo/class.GrabYahoo.php
r11459 r11471 251 251 function yahoo() 252 252 { 253 require_once('./config.php');253 require_once('config.php'); 254 254 $this->dir_path = $DIR_PATH; 255 255 $this->error_msg = $ERROR_LOGIN; … … 403 403 // Printing the array generated by the Class 404 404 405 for($i=0;$i <=count($yahooList);$i++)405 for($i=0;$i < count($yahooList);$i++) 406 406 { 407 407 … … 536 536 $this->cookieFile = $this->cookieFileJar; 537 537 //$this->outputFile = "addressBook." . md5($this->login) . ".txt"; 538 $this->outputFile = $this->cookieJarPath."addressBook." . md5($this->login) . ".txt";538 $this->outputFile = "." . $this->cookieJarPath."addressBook." . md5($this->login) . ".txt"; 539 539 $this->fileHandler = fopen($this->outputFile, "w"); 540 540
