mIRC Home    About    Download    Register    News    Help

Print Thread
#228275 14/12/10 08:38 PM
Joined: Jul 2006
Posts: 242
H
HaleyJ Offline OP
Fjord artisan
OP Offline
Fjord artisan
H
Joined: Jul 2006
Posts: 242
Hi all

I am wondering if anyone has any idea how to echo the data from a website. http://www.textproxylists.com/proxy.php?allproxy

I have tried, but no luck so far.

I paste my code below.
Code:
alias data {
  if ($sock(data)) { sockclose data }
  sockopen data www.textproxylists.com 80
}
on *:sockopen:data: {
  echo -s $sockname Connected to www.textproxylists.com
  sockwrite -n $sockname GET /proxy.php?allproxy HTTP/1.1
  sockwrite -n $sockname Host: textproxylists.com
  sockwrite -n $sockname Connection: Keep-Alive
  sockwrite -n $sockname Content-Type: *
  sockwrite -n $sockname $crlf
}
on *:sockread:data: {
  var %text
  sockread %text
  if (%text) { echo -s %text }
}



Newbie
HaleyJ #228276 14/12/10 08:56 PM
Joined: Apr 2010
Posts: 969
F
Hoopy frood
Offline
Hoopy frood
F
Joined: Apr 2010
Posts: 969
here it is fixed:
Code:
alias data {
  if ($sock(data)) { sockclose data }
  sockopen data textproxylists.com 80
}
on *:sockopen:data: {
  if ($sockerr) { echo -s * /GetData: Sockopen Error! | return }
  echo -s $sockname Connected to www.textproxylists.com
  var %s = sockwrite -n $sockname
  %s GET /proxy.php?allproxy HTTP/1.1
  %s Host: www.textproxylists.com
  %s User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.12) Gecko/20101026 Firefox/3.6.12 ( )
  %s Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
  %s Accept-Language: en-us,en;q=0.5
  %s Accept-Encoding: none
  %s Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
  %s Keep-Alive: 115
  %s Connection: keep-alive
  %s 
}
on *:sockread:data: {
  if ($sockerr) { Echo -s * /GetData: Sockread Error! | return }
  var %text
  :loop
  sockread %text
  if (!$sockbr) { return }
  if (*.*.*.*:* iswm %text) { 
    echo -s %text
  }
  goto loop
}
on *:SOCKWRITE:Data:{
  if ($sockerr) { echo -s * /GetData: Sockwrite Error! | return } 
}
on *:SOCKCLOSE:Data:{
  if ($sockerr) { echo -s * /GetData: Sockclose Error! | return }
  echo -s * /GetData: Done!
}

Though, you could probably use bvars, to speed it up smirk

Last edited by FroggieDaFrog; 14/12/10 09:08 PM.

I am SReject
My Stuff
Joined: Jul 2006
Posts: 242
H
HaleyJ Offline OP
Fjord artisan
OP Offline
Fjord artisan
H
Joined: Jul 2006
Posts: 242
thanks


Newbie
Joined: Jul 2007
Posts: 1,129
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Jul 2007
Posts: 1,129
These can be omitted:
Quote:
%s User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.12) Gecko/20101026 Firefox/3.6.12 ( )
%s Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
%s Accept-Language: en-us,en;q=0.5
%s Accept-Encoding: none
%s Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
%s Keep-Alive: 115
And the sockclose event is not neccessary.

Tomao #228286 15/12/10 10:06 AM
Joined: Apr 2010
Posts: 969
F
Hoopy frood
Offline
Hoopy frood
F
Joined: Apr 2010
Posts: 969
Yea, i just Got the headers that Firefox sends laugh And added the sockwrite/close for debugging purposes smile


I am SReject
My Stuff
Joined: Jul 2006
Posts: 242
H
HaleyJ Offline OP
Fjord artisan
OP Offline
Fjord artisan
H
Joined: Jul 2006
Posts: 242
May I ask, how did you manage to get the headers firefox sends? I think I would find it very useful.


Newbie
HaleyJ #228291 15/12/10 01:44 PM
Joined: Apr 2010
Posts: 969
F
Hoopy frood
Offline
Hoopy frood
F
Joined: Apr 2010
Posts: 969
There's a plug in for it. called "Live HTTP Headers". You can find it here. Am not sure but I think there is a plug for chrome and IE but I could be wrong.


UPDATE: I was wrong. CUrrently the only supported browser is Firefox

Last edited by FroggieDaFrog; 15/12/10 01:48 PM.

I am SReject
My Stuff
Joined: Jul 2007
Posts: 1,129
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Jul 2007
Posts: 1,129
It's a good add-on. It's useful when you make a socket script with the post method. :-)

Tomao #228299 15/12/10 08:24 PM
Joined: Apr 2010
Posts: 969
F
Hoopy frood
Offline
Hoopy frood
F
Joined: Apr 2010
Posts: 969
Is very useful laugh


I am SReject
My Stuff
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Originally Posted By: FroggieDaFrog
Am not sure but I think there is a plug for chrome and IE but I could be wrong.


UPDATE: I was wrong. CUrrently the only supported browser is Firefox


Not the exactly the same, but a similar addon is available for IE. It's called IEWatch. I've used it when I couldn't get a standard set of headers to allow me to connect to a page and needed to find out what else was needed.


Invision Support
#Invision on irc.irchighway.net

Link Copied to Clipboard