This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Script Help

Help for those learning Tcl or writing their own scripts.
Post Reply
J
Jack1
Voice
Posts: 3
Joined: Mon Feb 16, 2015 4:12 pm

Script Help

Post by Jack1 »

Hi

I need to get the user mask of a given user in *!*@IP form.

The user is connected to the IRC network, but doesn't necessarily share a channel with a bot on the botnet.

Is it possible?

Cheers,
Jack
w
willyw
Revered One
Posts: 1203
Joined: Thu Jan 15, 2009 12:55 am

Post by willyw »

You have not yet responded to the reply you got on your other request.

How did that work out?
Did you succeed?
(best to respond there in that thread)

After that is finished, then perhaps we can do something with this request.
J
Jack1
Voice
Posts: 3
Joined: Mon Feb 16, 2015 4:12 pm

Post by Jack1 »

Hi

What about it?

I read the links and wrote the script.

I am expected to paste the script that I wrote (I didn't realise ...)?

Cheers,
Jack
w
willyw
Revered One
Posts: 1203
Joined: Thu Jan 15, 2009 12:55 am

Post by willyw »

No, that is not expected. :)

But without some response, I would not know that you could even write ANY script at all.

Apparently, you can.
That is good.
That affects how I will answer, this time.

Let me re-read your original post here, and I'll be back with some ideas for you.
w
willyw
Revered One
Posts: 1203
Joined: Thu Jan 15, 2009 12:55 am

Re: Script Help

Post by willyw »

Start by doing:
.dump whois some_nick
from the partyline. That will make the bot send a whois to the irc server for that nick.

If you cannot see the response in the partyline, do:
.console +r
to enable viewing raw incoming to the bot.
Do:
.console
to view the list of current flags. If r (raw) is still not listed, then it is not enabled in eggdrop.conf. Edit eggdrop.conf to enable it, rehash, and do:
.console +r again.

Do:
.dump whois some_nick
again, and see the return via the partyline.
Find a line that looks like this:
<chanbotviii> [14:26:38] [@] irc.us.ca.mibbit.net 311 ChanbotVIII Rog Rog mib-7B80EB3B.clients.your-server.de * :

See that "311" in that line?
That's a raw numeric. You can bind to that in your script.

Go here:
http://www.eggheads.org/support/egghtml ... mands.html
and text search for:
bind raw
and read about how to use that bind.
With it, you can capture that returned line in a variable.
Now you've got the nick, ident, and hostmask

You can pick it apart with:
split
and with:
lindex

( http://www.tcl.tk/man/tcl8.5/TclCmd/contents.htm )

See: http://www.eggheads.org/support/egghtml ... mands.html
again, and text search for:
maskhost
and read about how to use that command, to get a variety of different returns. I think you are looking for type number 2.

With these things, I think you can cobble together something, such that if you do something like:
!command some_nick
the bot will send a whois on some_nick, (no matter if some_nick is in a channel with the bot or not) and if some_nick is on the server, bot will get the hostmask in the format that you desire.

I hope this helps.
Post Reply