Professional Web Applications Themes

connect through socks - PERL Beginners

Hi perlers, anyone knows how to connect to a website and download it through socks (ver 4,5) ? I tried IO::Socket::Socks and Net::SOCKS, but I can't get them to work. Also my next question is: can I access to whois service through socks? Is here anyone who has some experiences with this ? Thanks. /Brano -=x=- Skontrolované antivírovým programom NOD32...

  1. #1

    Default connect through socks

    Hi perlers,

    anyone knows how to connect to a website and download it through socks
    (ver 4,5) ? I tried IO::Socket::Socks and Net::SOCKS, but I can't get
    them to work.
    Also my next question is: can I access to whois service through socks?
    Is here anyone who has some experiences with this ?

    Thanks.

    /Brano




    -=x=-
    Skontrolované antivírovým programom NOD32

    Ing. Guest

  2. #2

    Default Re: connect through socks

    On Sun, 26 Sep 2004, Ing. Branislav Gerzo wrote:
     

    I know it can be done via 'LWP::UserAgent'. Not sure via a socket though.

    --


    Regards,

    Bill

    ================================================== ====================
    William Melanson: WebUnited Systems Administration
    Phone: 954-418-8884 Ext: 287
    ================================================== ====================


    William Guest

  3. #3

    Default RE: connect through socks


    > through socks 
    > can't get 
    >
    > I know it can be done via 'LWP::UserAgent'. Not sure via a
    > socket though.[/ref]

    you could always do this:

    use Socket;

    $port = 80;
    $host ='www.somesite.com';
    $proto = getprotobyname('tcp');
    $addr = gethostbyname("$host");
    $ip = join(".", unpack("C4", $addr));

    my $dest = sockaddr_in($port, inet_aton($ip));
    socket(S,AF_INET,SOCK_STREAM, $proto) or die "coudn't create sock: $!";
    connect(S,$dest) or die "can't connect: $!\n";

    select(S); $| = 1; select(STDOUT);

    print S "GET / HTTP/1.0\n\n";
    print while (<S>);


    ---
    Outgoing mail is certified Virus Free.
    Checked by AVG anti-virus system (http://www.grisoft.com).
    Version: 6.0.770 / Virus Database: 517 - Release Date: 9/27/2004


    Jim Guest

Similar Threads

  1. SOCKS 5 support with SFTP?
    By drLocke97 in forum Macromedia Contribute Connection Administrtion
    Replies: 0
    Last Post: August 10th, 08:10 PM
  2. Net::Telnet -- does it support Proxy or SOCKS connections?
    By David B. Mears in forum PERL Modules
    Replies: 0
    Last Post: August 4th, 11:10 PM
  3. socks proxy
    By Frank in forum Sun Solaris
    Replies: 2
    Last Post: September 7th, 10:43 PM
  4. Can I use ntpd through a socks proxy??
    By Zhao You Bing in forum Debian
    Replies: 0
    Last Post: July 24th, 02:30 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139