| View previous topic :: View next topic |
| Author |
Message |
Jack1 Voice
Joined: 16 Feb 2015 Posts: 3
|
Posted: Sat Feb 21, 2015 3:57 pm Post subject: Script Help |
|
|
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 |
|
| Back to top |
|
 |
willyw Revered One
Joined: 15 Jan 2009 Posts: 1175
|
Posted: Sun Feb 22, 2015 11:07 am Post subject: |
|
|
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. |
|
| Back to top |
|
 |
Jack1 Voice
Joined: 16 Feb 2015 Posts: 3
|
Posted: Sun Feb 22, 2015 2:14 pm Post subject: |
|
|
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 |
|
| Back to top |
|
 |
willyw Revered One
Joined: 15 Jan 2009 Posts: 1175
|
Posted: Sun Feb 22, 2015 3:20 pm Post subject: |
|
|
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. |
|
| Back to top |
|
 |
willyw Revered One
Joined: 15 Jan 2009 Posts: 1175
|
Posted: Sun Feb 22, 2015 3:36 pm Post subject: Re: Script Help |
|
|
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/1.6.21/tcl-commands.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/1.6.21/tcl-commands.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. |
|
| Back to top |
|
 |
|