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.

cant get real ip address

Old posts that have not been replied to for several years.
Locked
s
soul
Voice
Posts: 31
Joined: Fri Apr 25, 2003 6:25 pm
Location: Portugal

cant get real ip address

Post by soul »

hello,

i have botnet [1hub+1leaf]

---
# the leaf bot procs this in the END:
proc msgm:spyreport {nick host hand text} {
if {[validuser $hand]} return
putallbots "spydetect $nick [lindex [split $host @] 1]"
return 0
}

# and then.. the hub has to ban the user using his ip address:

bind bot - "spydetect" bot:spydetect
proc bot:spydetect {from idx text} {
global spychan
foreach {nick hostname} [split $text] {}
puthelp "MODE $spychan +b *!*@$hostname"
}

# the problem is with the ban
ChanMode: HubBot sets mode [ +b ] *!*@127.196.249.24

i want it to get the Real ip address and use it in the ban...

i really appreciate help :)

thanks in advance!
User avatar
stdragon
Owner
Posts: 959
Joined: Sun Sep 23, 2001 8:00 pm
Contact:

Post by stdragon »

If 127.196.249.24 isn't the real ip address, what is it?
s
soul
Voice
Posts: 31
Joined: Fri Apr 25, 2003 6:25 pm
Location: Portugal

Post by soul »

the network in question uses ip addresses start with 127*, wich means they are fake.

real ip address looks like:

a213-22-132-195.netcabo.pt
195.22.18.231
e
egghead
Master
Posts: 481
Joined: Mon Oct 29, 2001 8:00 pm
Contact:

Post by egghead »

soul wrote:the network in question uses ip addresses start with 127*, wich means they are fake.

real ip address looks like:

a213-22-132-195.netcabo.pt
195.22.18.231
If the hostnames are obscured (possibly on purpose), you have no other choice then using these obscured ones.

How did you yourself find the conversion from the 127 ip to a213-22-132-195.netcabo.pt and 195.22.18.231?
s
soul
Voice
Posts: 31
Joined: Fri Apr 25, 2003 6:25 pm
Location: Portugal

Post by soul »

its my fault!

sorry guys, but i didnt explained that OPs (@) can always see the real ip address of all users in chan. the hub bot is opped and the leaf isnt.
User avatar
stdragon
Owner
Posts: 959
Joined: Sun Sep 23, 2001 8:00 pm
Contact:

Post by stdragon »

Change your script so that the hub gets the real ip address before broadcasting the alert. Try getchanhost.
s
soul
Voice
Posts: 31
Joined: Fri Apr 25, 2003 6:25 pm
Location: Portugal

Post by soul »

how should i do that? have no clue. can you make the necessary changes?

#### LEAF BOT PROC

set spychan "#CHAN"

set patterns {
"*#*"
"*aparece*"
"*canal*"
"*canais*"
}

if {![info exists _spysetup]} {

foreach tmpvar $patterns {
bind msgm - $tmpvar msgm:spyreport
}
unset tmpvar
set _spysetup 1
}

proc msgm:spyreport {nick host hand text} {
if {[validuser $hand]} return
putallbots "spydetect $nick [lindex [split $host @] 1]"
return 0
}

#### HUB BOT PROC
bind bot - "spydetect" bot:spydetect
proc bot:spydetect {from idx text} {
global spychan
foreach {nick hostname} [split $text] {}
puthelp "MODE $spychan +b *!*@$hostname"
}
Locked