in reply to Re: Connecting to irc using perl
in thread Connecting to irc using perl

This node falls below the community's threshold of quality. You may see it by logging in.

Replies are listed 'Best First'.
Re: Connecting to irc using perl
by jonadab (Parson) on Sep 21, 2003 at 00:06 UTC
    if it could connect me to irc will be hiding my real ip address like i intend to or not?

    Ah, this is a TCP/IP question. The short answer is "No".

    The long answer is that while it is possible to send out an IP packet that spoofs the source IP address (unless some router upstream from you has egress filtering, but that unfortunately is somewhat unlikely), all that gets you is the ability to send individual packets one way. With a spoofed IP address, you can't expect any content to return to you, as the host on the other end cannot address any packets to you without your address; and if the packet is not addressed to you it won't be routed to you, and you won't get it. It is thus totally and absolutely impossible to establish a TCP connection (that is, a two-way connection on the internet) without giving our your correct IP address.

    Now, there are two questions you can be asking: how non-anonymous does your IP address make you, and how can you communicate without a TCP connection. As to the first, that depends greatly on your ISP, so I won't speculate. As to the second question... the only way I can think of would be to use an intermediate host; you connect to the intermediate host, and then it connects on your behalf to the IRC server. This way the IP address that the IRC server gets is that of the intermediate host. However, you have to give your actual IP address to the intermediate host, so at some level you are still traceable.

    If you have a real pressing need to be truly anonymous, it *is* possible, but it involves using an internet connection that cannot be traced back to you. Think in terms of walking into a store and using one of the display models for a few minutes.

    If you only need garden-variety anonymity, such as the kind of anonymity that will keep some random jerk in the IRC community from tracking you, you can probably get by with an ordinary dialup internet account; most dialup accounts use a dynamic IP address assignment scheme, so that you don't get the same IP address all the time. tracert will allow people to figure out who your ISP is, but it won't tell them who *you* are unless they can get that information from your ISP, which would usually require a court order or social engineering -- though, again, that will depend on your ISP, and you should check their policy.


    $;=sub{$/};@;=map{my($a,$b)=($_,$;);$;=sub{$a.$b->()}} split//,".rekcah lreP rehtona tsuJ";$\=$ ;->();print$/
Re: Re: Re: Connecting to irc using perl
by thens (Scribe) on Sep 20, 2003 at 19:45 UTC
    Before we get into the problem one sugesstion for you when posting code, you need to wrap them in <code> your code here </code> for it to stand out in your post. This will help you convey your thoughts effectively in the forum. Also see the Writeup Formatting Tips for help on better presentation of your writeups.

    As for your perl question, I havent used the module and I was suggesting CPAN should help you out. Wait for other monks who have actually used that module for specific help. But some googling of the problem or the anonymous part should get you closer to some working code.

    Did you actually start listening to the events using the infinite loop after connecting to the server.

    $irc->start;

    If you have problems even before connecting to the server, there might be something else that iam not seeing.

    all the best

    -T

Re: Re: Re: Connecting to irc using perl
by zengargoyle (Deacon) on Sep 20, 2003 at 23:11 UTC

    i added two lines and it works for me...

    use Net::IRC; $irc = new Net::IRC; $conn = $irc->newconn( Nick => 'Nikos', Server => 'nini.irc.gr', Port => 6667, Ircname => 'me'); $conn->add_global_handler('376', \&on_connect); $irc->start; sub on_connect { print STDERR "connected\n"; }

    which when run gives me...

    
    $ perl irc.pl 
    connected
    ^C
    $
    

    so the answer is yes, there are modules to help you connect to IRC and no, they will not help you connect anonymously, nor will they let you connect if your IP has been banned for some reason or another.