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.

SNOTICE

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Post Reply
R
RoKiTo
Voice
Posts: 17
Joined: Thu Jul 22, 2021 3:07 pm

SNOTICE

Post by RoKiTo »

Client connecting: tunix25 (~U2FsdGVkX@anaconda.netsplit.de) [85.25.10.40] [class: clients] [secure: TLSv1.2-ECDHE-ECDSA-AES256-GCM-SHA384] [country: FR] [reputation: 0] [security-groups: unknown-users,tls-and-known-users,tls-users]


Hello, some tcl that transforms the above and converts it as a result of the below. I hope your help from the tcl teachers


Resolved : tunix25 [85.25.10.40] [country: FR] [city: Paris] [dns: anaconda.netsplit.de]
User avatar
CrazyCat
Revered One
Posts: 1301
Joined: Sun Jan 13, 2002 8:00 pm
Location: France
Contact:

Post by CrazyCat »

Not sur to understand what you want to do.
If it's just a rewriting of the infos from the notice, to make them more user frielndly, it's quite easy. But you won't have the city as it doesn't exists in the notice.
User avatar
AdmiraL
Voice
Posts: 15
Joined: Sun Feb 21, 2021 4:55 pm
Location: Germany
Contact:

Post by AdmiraL »

maybe u want this?

CONN: Shprehu - IP: 1.1.1.1 - Shteti: Germany (DE)- Qyteti: Cologne - ISP: NETCOLOGNE - Mobile: false - VPN-Proxy: false

Code: Select all

package require http
package require json

set ExpChan "#psychoz"

bind raw - NOTICE Client

proc Client {from key arg} {
   if {[string match *!*@* $from] || ![string match -nocase "*Client connecting*" $arg]} { return }
   if {[scan $arg %\[^\:\]\:%\[^(\](%\[^@\]@%\[^\)\] _ nick ident host] == "4"} {
      set token [http::geturl http://ip-api.com/json/$host?fields=status,message,country,countryCode,region,continent,continentCode,regionName,city,zip,lat,lon,timezone,district,isp,org,as,asname,reverse,mobile,proxy,hosting,query]
      set data [json::json2dict [http::data $token]]
      ::http::cleanup $token
      #if {[dict get $data status] eq "success"} { return }
         puthelp "PRIVMSG $::ExpChan 0,3CONN: 5[regsub -all {([^:]+:)} $nick ""]- 3IP14: [dict get $data query] - 3Shteti14: [dict get $data country] - 3Qyteti14: [dict get $data city] - 3ISP14: [dict get $data asname] - 3Mobile4: [dict get $data mobile] - 3VPN-Proxy4: [dict get $data proxy]"
	} else {
         putcmdlog "Error! it fails to get data for this $host"
      }
   }
   return 0
}
R
RoKiTo
Voice
Posts: 17
Joined: Thu Jul 22, 2021 3:07 pm

Post by RoKiTo »

YES, thanks master (Y)
R
RoKiTo
Voice
Posts: 17
Joined: Thu Jul 22, 2021 3:07 pm

Post by RoKiTo »

G-Line added: '*@95.214.53.99' [reason: Handshake data flood detected] [by: irc.develope.io] [duration: 5m]

Global Z-Line: '*@95.214.53.99' [reason: Handshake data flood detected] [by: irc.develope.io] [duration: 5m]

Z-Line added: '*@95.214.53.99' [reason: Handshake data flood detected] [by: irc.develope.io] [duration: 5m]

a thousand apologies for not explaining more since the browser puts other things.
Would it be possible to channel that information to an #info channel, similar to what you did above, please
User avatar
AdmiraL
Voice
Posts: 15
Joined: Sun Feb 21, 2021 4:55 pm
Location: Germany
Contact:

Post by AdmiraL »

RoKiTo wrote:G-Line added: '*@95.214.53.99' [reason: Handshake data flood detected] [by: irc.develope.io] [duration: 5m]

Global Z-Line: '*@95.214.53.99' [reason: Handshake data flood detected] [by: irc.develope.io] [duration: 5m]

Z-Line added: '*@95.214.53.99' [reason: Handshake data flood detected] [by: irc.develope.io] [duration: 5m]

a thousand apologies for not explaining more since the browser puts other things.
Would it be possible to channel that information to an #info channel, similar to what you did above, please
Whats for Server do you have?

Unreal version?
R
RoKiTo
Voice
Posts: 17
Joined: Thu Jul 22, 2021 3:07 pm

Post by RoKiTo »

Yes, version 6.
User avatar
AdmiraL
Voice
Posts: 15
Joined: Sun Feb 21, 2021 4:55 pm
Location: Germany
Contact:

Post by AdmiraL »

RoKiTo wrote:Yes, version 6.
Here do you have, but u need to change someting.

Code: Select all

bind raw - NOTICE serv:removed

proc serv:removed {from keyword text} {

	putlog "from=($from) keyword=($keyword) text=($text)"
	if {![string match -nocase "*G:Line removed*" $text] && ![string match -nocase "*Z:line removed*" $text] && ![string match -nocase "*Shun removed*" $text] && ![string match -nocase "*global z-line removed*" $text] && ![string match -nocase "*used AKILL to remove*" $text]} {
		#putlog "Nothing matches..."
		return
	}
	set nick [lindex [split $text] 2 ]
	set removed [lindex [split $text] 3 ]
	set mask [join [lrange [split $text] 4 6 ]]
	set set_at [join [lrange [split $text] 7 12 ]]
	set reason [join [lrange [split $text] 13 end ]]

	putserv "privmsg #services :\00310$nick\00314 $removed \0034$mask\00310 $set_at \0034$reason\003"

}
R
RoKiTo
Voice
Posts: 17
Joined: Thu Jul 22, 2021 3:07 pm

Post by RoKiTo »

thanks for your quick response. What would be the change you mentioned?
User avatar
AdmiraL
Voice
Posts: 15
Joined: Sun Feb 21, 2021 4:55 pm
Location: Germany
Contact:

Post by AdmiraL »

nothing, just channel i mean.
R
RoKiTo
Voice
Posts: 17
Joined: Thu Jul 22, 2021 3:07 pm

Post by RoKiTo »

Thank you for your contribution and that of others. And be patient with us, the newbies.
Post Reply