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.

picurlcheck

Old posts that have not been replied to for several years.
Locked
User avatar
[R]
Halfop
Posts: 98
Joined: Fri Apr 30, 2004 12:05 pm

picurlcheck

Post by [R] »

Hello guys

I have downloaded a script and installed it but it dosent work...


http://scripts.udp.at/index.php?action= ... detailed=4

The link .. I mean picurlcheck a script that checks the pic for virusses..
But when I type !piccheck (on) (in channel) nothing happens..

Settings:

Code: Select all

#################################################################

set piccheck(bantype) 1
# 1:*!ident@subnet, 2:*!ident@IP, 3:*!ident@IP, 4:nick!*@*

set piccheck(meltsad) 0
# If you use the script "Meltsdowns Anti-Advertise" you may set
# this to 1. picurlcheck will then use the kickcounter from meltsad.
# (For kickmessage)

set piccheck(version) "0.2"
# internal purpose
Whats wrong?!

Greets&Thx

[R]
m
metroid
Owner
Posts: 771
Joined: Wed Jun 16, 2004 2:46 am

Post by metroid »

If im not mistaken, it checks url's when a url with a jpg is posted.
User avatar
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

Post by awyeah »

Things to do at first if a script doesn't work.

1. Contact the author.
2. If no reply from the author paste the script here and define the problem.
3. We will try to help as much as we can do not *expect* that your problem will be fixed most likely.
·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
User avatar
[R]
Halfop
Posts: 98
Joined: Fri Apr 30, 2004 12:05 pm

Post by [R] »

Code: Select all

#################################################################
# Meltdowns Picture-URL-Checker V0.3 (07-03-2004)               #
# http://scripts.udp.at                                         #
#                                                               #
# Bans for messaging picture-urls (.jpg,.gif, etc)              #
# which are NOT pictures (they are mostly viruses then)         #
#                                                               #
# Contact: meltdown@gmx.at | #meltdown on quakenet              #
#                                                               #
# As i have seen a few of my scripts with different credits:    #
# STOP THAT. IT SUCKS, ITS LAME, etc..                          #
#                                                               #
# If you want to have a script signed with your name,		#
# code it yourself ffs!                                         #
#                                                               #
#################################################################
#
# Install:
# Append this tcl to your bots config
# Join the channel you want to check and type "!piccheck on"
# You can always check the status by typing "!piccheck"
#
#################################################################
#
# New in 0.3:
#
# Changed jpg-check
#
#################################################################
#
# New in 0.2:
# 
# Added PNG-support
# Changed regexp for url-detection
#
#################################################################

set piccheck(bantype) 1
# 1:*!ident@subnet, 2:*!ident@IP, 3:*!ident@IP, 4:nick!*@*

set piccheck(meltsad) 0
# If you use the script "Meltsdowns Anti-Advertise" you may set
# this to 1. picurlcheck will then use the kickcounter from meltsad.
# (For kickmessage)

set piccheck(version) "0.2"
# internal purpose

############################CODE#################################

bind pubm - * urlcheck
bind pub n|m !piccheck piccheck_switch

setudef flag piccheck

proc urlcheck { nick uhost hand chan str } {
global piccheck
set urlcheck(ext) {
	jpg 
	jpe 
	jpeg 
	gif
	png
}
if {![regexp {((?:http://|www\.)+[^ ]+)} $str str]} { return 0 }
set extension ""
	regsub -all -- {(http://)+} $str "" str
	regexp {(www.)?[A-z|0-9|\-|\.|\_]*\.[A-z]{2,3}} $str host
	regexp {[/]+(.)*} $str url
	regexp {[A-z]{3,4}$} $str extension
	set ispic 0
	foreach i $urlcheck(ext) {
		if {[string match -nocase $extension $i]} {
			set ispic 1
		}
	}
	if {$ispic != 1} { return 0 } 
	set linecheck "[getdata $host $url $chan]"
	set ispic 0
	if {[string match *error* $linecheck]} { set ispic 1 }
	if {[string match "*ÿØÿ*" $linecheck]} { set ispic 2 }
        if {[string match "*GIF89*" $linecheck]} { set ispic 3 }
	if {[string match "*GIF87*" $linecheck]} { set ispic 3 }
	if {[string match "*[format %c [scan 89 %x]]PNG*" $linecheck]} { set ispic 4 }

	if {[string match "*<html>*" $linecheck]} { set ispic 0 }

# putlog "ISPIC: $ispic"
# putlog "protected : [protected_user $nick $hand]"
	if {[protected_user $nick $hand]} { return 0 }
	if {$ispic == 0} {
		set banmask [notapic_banmask $nick $uhost]
		if {$piccheck(meltsad) == 1} { 
			global meltads
			set meltads(alt_message) "URL is not a picture - Possible Virus detected -"
			chan_ban $nick $banmask $chan $str
		} else {
                	notapic_ban $nick $banmask $chan "URL is not a picture - Possible Virus detected" 
		}
		putserv "PRIVMSG $chan :[string replace $str [expr [string length $str] /2] [expr [string length $str] /2] ?] is NOT a picture. For you security...Dont click!"
		putlog "Bad URL detected by $nick in $chan ($str)"
	}

}

proc getdata { host url chan } {
global sock
		if {[string match "*error*" [open_socket $host $url $chan]]} { return "error"}
		gets $sock line
		if {[string match -nocase "*HTTP/1.? 301 Moved*" $line]} { 
			while {![eof $sock]} {
				gets $sock line
				if {[string match -nocase "*Location*" $line]} {
					set url [lindex [split $line] 1]
					regsub -all -- {(http://)+} $url "" url
					regexp {[/]+(.)*} $url url
					close $sock
					open_socket $host $url $chan
					gets $sock line
					break
				}
			}
		}
		if {![string match "HTTP/1.? 200 OK" $line]} { close $sock ;return "error($line)" }
		while {(![eof $sock]) && ([string length $line] != 0)} {
			gets $sock line
#			if {[string match -nocase *content*type* $line]} {putlog "$line" }	
		}
		gets $sock line
		close $sock
return $line
}

proc open_socket { host url chan } {
global sock
# putlog "Host: $host - url : $url"

        if {[catch {set sock [socket [string map -nocase {www. ""} $host] 80] } sockerror]} {
                putserv "PRIVMSG $chan: Error: $sockerror"
                return "error: $sockerror"
        } else {
                puts $sock "GET $url HTTP/1.1"
                puts $sock "User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)"
                puts $sock "Accept :*/*"
                puts $sock "Host: $host"
                puts $sock ""
                flush $sock
	}
}


proc notapic_banmask {nick uhost} {
 set account [string range $uhost 0 [expr [string last @ $uhost] -1]]
 set domain [string range $uhost [expr [string last @ $uhost] +1] end]
 set sitemask "*!*[string trimleft [maskhost $uhost] *!]"
 switch $::piccheck(bantype) {
  1 {set sitemask "*!*[string trimleft [maskhost $uhost] *!]"}
  2 {set sitemask "*!*$uhost"}
  3 {set sitemask "*!*@$domain"}
  4 {set sitemask "$nick!*@*"}
                        }
regsub -all -- {~} $sitemask "" sitemask
return $sitemask
}

proc notapic_ban {nick banmask chan text} {
	putserv "MODE $chan +b $banmask"
	putserv "KICK $chan $nick :$text"
} 

proc piccheck_switch {nick uhost hand chan text} {
 global piccheck
        switch [lindex $text 0] {
                on {    channel set $chan +piccheck
                        putserv "PRIVMSG $chan :Melts Pic-URL-Checker $piccheck(version) activated"
                }
                off {
                        channel set $chan -piccheck
                        putserv "PRIVMSG $chan :Melts Pic-URL-Checker $piccheck(version) deactivated"
                }
                "" {
                        if {[lsearch -exact [channel info $chan] +piccheck] > -1} {
                                putserv "PRIVMSG $chan :Melts Pic-URL-Checker is currently ACTIVATED."
                        } else {putserv "PRIVMSG $chan :Melts Pic-URL-Checker is currently DEACTIVATED."
                        }
                }

                default { putserv "NOTICE $nick :Commands \: on|off - or nothing for status" }
        }
}

proc protected_user {nick hand} {
	if {$nick == $::botnick} { return 1 }
	if {[matchattr $hand n]} { return 1 }
	if {[matchattr $hand b]} { return 1 }
return 0
}

putlog "Melts Picture-URL-Checker $piccheck(version) loaded..."
Maybe you can help me.
I know this thread is old but i have still the problem.
m
metroid
Owner
Posts: 771
Joined: Wed Jun 16, 2004 2:46 am

Post by metroid »

Try finding the damn answer yourself, You've done nothing to solve your other problems either.
User avatar
Stealthx
Halfop
Posts: 68
Joined: Fri Oct 01, 2004 3:37 am
Location: StealthBox

Post by Stealthx »

Meltdowns Picture-URL-Checker V0.3 works perfectly well with mi... and I'm still using it right now. :) Type -
!piccheck on
in whatever channel u wan the bot to check for and this tcl only bans user for messaging picture-urls and not checks the pic for viruses... :mrgreen:
+ Stealth Box +
User avatar
arcane
Master
Posts: 280
Joined: Thu Jan 30, 2003 9:18 am
Location: Germany
Contact:

Post by arcane »

mh... just for further problems: "nothing happens" is not the best error description ;)

hm. anyway... i don't really care :-?
aVote page back online!
Check out the most popular voting script for eggdrop bots.

Join the metal tavern!
User avatar
[R]
Halfop
Posts: 98
Joined: Fri Apr 30, 2004 12:05 pm

Post by [R] »

in whatever channel u wan the bot to check for and this tcl only bans user for messaging picture-urls and not checks the pic for viruses..
*g*
For me the script do nothing =)
But i have ssen some user who used this script and for they it works perfect :P


@MeTroiD: great... plz dont spam! Off-topic kid

Greets

[R]
m
metroid
Owner
Posts: 771
Joined: Wed Jun 16, 2004 2:46 am

Post by metroid »

Oh please go away if your just going to complain and refuse to do anything at all.
User avatar
Stealthx
Halfop
Posts: 68
Joined: Fri Oct 01, 2004 3:37 am
Location: StealthBox

Post by Stealthx »

For me the script do nothing =)
But i have ssen some user who used this script and for they it works perfect :P
Then what for you asking dumb question when to you, the script do nothing? You are just wasting our time answering you, dumb kid. Scram off!
+ Stealth Box +
Locked