En iyi Webmaster forumlari.
iyilerin buluşma noktasi.
# cycle.tcl - Sahte services kullanıcı döngüsü (JOIN/PART/QUIT)
set cycle_users_file "user.txt"
set cycle_channels {#genel #yardim}
set cycle_delay 10 ;# Her işlem arası saniye
set cycle_repeat 1 ;# 1 = Sonsuz döngü
# Kullanıcıları oku
if {[file exists $cycle_users_file]} {
set f [open $cycle_users_file r]
set cycle_users [split [read $f] "\n"]
close $f
} else {
putlog "cycle.tcl: user.txt dosyası bulunamadı!"
set cycle_users {}
}
proc cycle_simulate {} {
global cycle_users cycle_channels cycle_delay cycle_repeat
foreach user $cycle_users {
if {$user eq ""} { continue }
foreach chan $cycle_channels {
putlog "Cycle: $user katıldı $chan"
putserv ":[string trim $user] JOIN $chan"
after [expr {$cycle_delay * 1000}]
putlog "Cycle: $user ayrıldı $chan"
putserv ":[string trim $user] PART $chan :çıkış"
after [expr {$cycle_delay * 1000}]
putlog "Cycle: $user quit oldu"
putserv ":[string trim $user] QUIT :Connection closed"
after [expr {$cycle_delay * 1000}]
}
}
if {$cycle_repeat} {
after [expr {$cycle_delay * 1000 * 3}] cycle_simulate
}
}
# Başlangıçta tetikleyelim
bind evnt - init-server start_cycle_simulation
proc start_cycle_simulation {type} {
putlog "cycle.tcl: Sahte kullanıcı döngüsü başlatılıyor..."
cycle_simulate
}
set destek_dosyasi "data/destek.txt"
set yanit_dosyasi "data/yanitlar.txt"
set adminler {Erkan Mehmet}
bind msg - "!destek" musteri_destek_ozel
bind pub - "!destek" musteri_destek_kanal
bind pubm - "!yanitla" destek_yanitla
bind pub - "!istatistik" destek_istatistik
proc musteri_destek_ozel {nick uhost handle text} {
destek_talep $nick $text "PRIVMSG $nick"
}
proc musteri_destek_kanal {nick uhost handle chan text} {
destek_talep $nick $text "PRIVMSG $chan"
}
proc destek_talep {nick mesaj replycmd} {
set mesaj [string trim $mesaj]
if {$mesaj eq ""} {
putquick "$replycmd :❗ Lütfen bir mesaj girin: !destek <sorun>"
return
}
set id "[clock seconds]-[rand 1000 9999]"
set durum "Açık"
set f [open $::destek_dosyasi a]
puts $f "$id|$nick|$mesaj|$durum"
close $f
putquick "$replycmd :✅ Talebiniz alındı. Ticket ID: $id"
foreach admin $::adminler {
putquick "PRIVMSG $admin :📩 Yeni destek talebi: $id | $nick | $mesaj"
}
}
# Admin yanıt verir: !yanitla <id> <mesaj>
proc destek_yanitla {nick uhost handle chan text} {
if {[lsearch -exact $::adminler $nick] == -1} return
set args [split $text " "]
set id [lindex $args 0]
set yanit [join [lrange $args 1 end] " "]
if {$id eq "" || $yanit eq ""} {
putquick "PRIVMSG $chan :❗ Kullanım: !yanitla <ticket_id> <mesaj>"
return
}
# Destek kaydını oku
set satirlar [split [readfile $::destek_dosyasi] "\n"]
set yeniliste ""
set bulundu 0
foreach satir $satirlar {
if {[string match "$id|*" $satir]} {
set parcalar [split $satir "|"]
set kullanici [lindex $parcalar 1]
set mesaj [lindex $parcalar 2]
set yeni "$id|$kullanici|$mesaj|Yanıtlandı"
set bulundu 1
# Yanıt kaydı
set f2 [open $::yanit_dosyasi a]
puts $f2 "$id|$nick|$yanit"
close $f2
# PM gönder
putquick "PRIVMSG $kullanici :📬 Destek talebinize yanıt geldi ($id): $yanit"
} else {
set yeni $satir
}
append yeniliste "$yeni\n"
}
if {$bulundu} {
writefile $::destek_dosyasi $yeniliste
putquick "PRIVMSG $chan :✅ $id ID'li talep yanıtlandı."
} else {
putquick "PRIVMSG $chan :❌ $id ID'li talep bulunamadı."
}
}
proc destek_istatistik {nick uhost handle chan text} {
if {[lsearch -exact $::adminler $nick] == -1} return
set acik 0
set yanitli 0
set satirlar [split [readfile $::destek_dosyasi] "\n"]
foreach s $satirlar {
if {[string match "*|*|*|Açık" $s]} { incr acik }
if {[string match "*|*|*|Yanıtlandı" $s]} { incr yanitli }
}
putquick "PRIVMSG $chan :📊 İstatistik: Açık: $acik | Yanıtlanan: $yanitli | Toplam: [expr {$acik + $yanitli}]"
}
# Yardımcı dosya okuma/yazma
proc readfile {file} {
if {[file exists $file]} {
set f [open $file r]
set d [read -nonewline $f]
close $f
return $d
}
return ""
}
proc writefile {file data} {
set f [open $file w]
puts -nonewline $f $data
close $f
}
set kod_kontrol_suresi 60
set max_denetim 3
set kodlar_file "data/kodlar.txt"
set dogrulanan_file "data/dogrulananlar.txt"
set denemeler_file "data/denemeler.txt"
bind join - * giris_kontrol
bind msg - "!kod" kod_dogrula
# Kullanıcı giriş kontrolü
proc giris_kontrol {nick host handle chan} {
set dogrulananlar [get_file_lines $::dogrulanan_file]
if {[lsearch -exact $dogrulananlar $nick] == -1} {
putquick "PRIVMSG $nick :Merhaba $nick, bu kanala girebilmek için doğrulama kodunu yazmalısın: /msg $::botnick !kod <kod>"
timer $::kod_kontrol_suresi [list kontrol_et $nick $chan]
}
}
# Süre dolduğunda hala doğrulanmadıysa kick
proc kontrol_et {nick chan} {
set dogrulananlar [get_file_lines $::dogrulanan_file]
if {[lsearch -exact $dogrulananlar $nick] == -1} {
putquick "KICK $chan $nick :Kod doğrulaması yapılmadı."
}
}
# Kod doğrulama işlemi
proc kod_dogrula {nick host handle text} {
set kod [string trim $text]
set satirlar [get_file_lines $::kodlar_file]
set dogru 0
set yeni_satirlar {}
set bulundu 0
foreach line $satirlar {
if {[llength [split $line]] != 2} { continue }
lassign [split $line] kadi k
if {[string tolower $nick] eq [string tolower $kadi]} {
set bulundu 1
if {$kod eq $k} {
set dogru 1
# Kod doğruysa kaydet ve çık
add_line_to_file $::dogrulanan_file $nick
putquick "PRIVMSG $nick :✅ Doğrulama başarılı! Artık kanalda kalabilirsin."
}
continue ;# bu satırı yazmayalım ki tek kullanımlık olsun (silinsin)
} else {
lappend yeni_satirlar $line
}
}
# Kodları yeniden yaz (tek kullanımlık)
set f [open $::kodlar_file w]
foreach line $yeni_satirlar {
puts $f $line
}
close $f
if {$dogru} {
sil_kullanici_denemesi $nick
return
}
if {!$bulundu} {
putquick "PRIVMSG $nick :❌ Kod bulunamadı veya süresi dolmuş."
return
}
# Deneme limiti kontrol
set denemeler [yukle_denemeler]
set sayi [expr {[info exists denemeler($nick)] ? $denemeler($nick) : 0}]
incr sayi
kaydet_denemeler $nick $sayi
if {$sayi >= $::max_denetim} {
putquick "KICK #kanal $nick :❌ 3 kez yanlış kod girildi."
} else {
set kalan [expr {$::max_denetim - $sayi}]
putquick "PRIVMSG $nick :❌ Hatalı kod. $kalan hakkınız kaldı."
}
}
# Yardımcı dosya işlemleri
proc get_file_lines {file} {
if {![file exists $file]} { return {} }
set f [open $file r]
set d [split [read $f] "\n"]
close $f
return $d
}
proc add_line_to_file {file line} {
set f [open $file a]
puts $f $line
close $f
}
# Deneme verisi yükle
proc yukle_denemeler {} {
array set denemeler {}
if {![file exists $::denemeler_file]} { return [array get denemeler] }
set f [open $::denemeler_file r]
while {[gets $f line] != -1} {
if {[llength [split $line]] == 2} {
lassign [split $line] nick sayi
set denemeler($nick) $sayi
}
}
close $f
return [array get denemeler]
}
# Deneme verisi kaydet
proc kaydet_denemeler {nick sayi} {
set denemeler [yukle_denemeler]
set denemeler($nick) $sayi
set f [open $::denemeler_file w]
foreach {k v} [array get denemeler] {
puts $f "$k $v"
}
close $f
}
# Başarıyla doğrulananın denemesi silinsin
proc sil_kullanici_denemesi {nick} {
set denemeler [yukle_denemeler]
array unset denemeler $nick
set f [open $::denemeler_file w]
foreach {k v} [array get denemeler] {
puts $f "$k $v"
}
close $f
}
# proxy_guard.tcl - IRC Proxy Koruma
set proxy_file "data/proxy.txt"
set log_file "data/security.log"
set admins {admin1 admin2}
# Kullanıcı bağlantısında tetiklenir
bind evnt - init-server check_proxy_connect
bind join - * check_proxy_join
bind pub - !proxyekle add_proxy_ip
bind pub - !proxykaldir del_proxy_ip
bind pub - !proxykontrol check_proxy_cmd
# Proxy kontrolü
proc check_proxy_join {nick uhost hand chan} {
set ip [get_ip_from_uhost $uhost]
if {[is_proxy_ip $ip]} {
putquick "KILL $nick :Proxy bağlantılar yasaktır"
putserv "PRIVMSG OperServ :AKILL ADD $ip 30m Proxy Engeli"
write_log "PROXY BLOCK: $nick / $ip"
}
}
# Proxy.txt içindeki IP'yi kontrol et
proc is_proxy_ip {ip} {
global proxy_file
if {![file exists $proxy_file]} { return 0 }
set list [split [readfile $proxy_file] "\n"]
foreach line $list {
if {[string trim $line] eq $ip} {
return 1
}
}
return 0
}
# Komut: !proxyekle <ip>
proc add_proxy_ip {nick uhost hand chan text} {
global admins proxy_file
if {[lsearch -exact $admins $hand] == -1} return
if {$text eq ""} { putquick "PRIVMSG $chan :Kullanım: !proxyekle <ip>"; return }
set fp [open $proxy_file a]
puts $fp $text
close $fp
putquick "PRIVMSG $chan :$text eklendi."
write_log "ADMIN $hand -> proxyekle $text"
}
# Komut: !proxykaldir <ip>
proc del_proxy_ip {nick uhost hand chan text} {
global admins proxy_file
if {[lsearch -exact $admins $hand] == -1} return
if {$text eq ""} { putquick "PRIVMSG $chan :Kullanım: !proxykaldir <ip>"; return }
if {![file exists $proxy_file]} return
set list [split [readfile $proxy_file] "\n"]
set newlist [list]
foreach line $list {
if {[string trim $line] ne $text} {
lappend newlist $line
}
}
set fp [open $proxy_file w]
foreach ip $newlist { puts $fp $ip }
close $fp
putquick "PRIVMSG $chan :$text silindi."
write_log "ADMIN $hand -> proxykaldir $text"
}
# Komut: !proxykontrol <ip>
proc check_proxy_cmd {nick uhost hand chan text} {
if {$text eq ""} { putquick "PRIVMSG $chan :Kullanım: !proxykontrol <ip>"; return }
if {[is_proxy_ip $text]} {
putquick "PRIVMSG $chan :$text listede bulunuyor (proxy)."
} else {
putquick "PRIVMSG $chan :$text temiz görünüyor."
}
}
# IP alma
proc get_ip_from_uhost {uhost} {
set ip [lindex [split $uhost @] 1]
return $ip
}
# Log yazma
proc write_log {text} {
global log_file
set ts [clock format [clock seconds] -format "%Y-%m-%d %H:%M"]
set fp [open $log_file a]
puts $fp "$ts - $text"
close $fp
}
# Dosya okuma
proc readfile {filename} {
set f [open $filename r]
set content [read $f]
close $f
return $content
}
# irc_guard.tcl - IRC Koruma Botu
set guard_active 1
set ctcp_block 1
set proxy_list "data/proxy.txt"
set admins {admin1 admin2}
set log_file "data/security.log"
bind pub - !guard toggle_guard
bind pub - !ctcpkoruma toggle_ctcp
bind ctcp - VERSION block_ctcp
bind ctcp - FINGER block_ctcp
bind ctcp - USERINFO block_ctcp
bind join - * check_massjoin
bind msg - * check_kufur
proc toggle_guard {nick uhost hand chan arg} {
global guard_active admins
if {[lsearch -exact $admins $hand] != -1} {
set guard_active [expr {!$guard_active}]
putquick "PRIVMSG $chan :[expr {$guard_active ? "Koruma aktif" : "Koruma kapalı"}]"
}
}
proc toggle_ctcp {nick uhost hand chan arg} {
global ctcp_block admins
if {[lsearch -exact $admins $hand] != -1} {
set ctcp_block [expr {!$ctcp_block}]
putquick "PRIVMSG $chan :[expr {$ctcp_block ? "CTCP Koruma açık" : "Kapalı"}]"
}
}
proc block_ctcp {nick uhost hand dest keyword text} {
global ctcp_block log_file
if {$ctcp_block} {
set ip [lindex [split $uhost @] 1]
putquick "PRIVMSG $nick :CTCP istekleri engellenmiştir."
write_log "CTCP BLOCK: $nick ($ip) -> $keyword"
return 1
}
return 0
}
proc check_massjoin {nick uhost hand chan} {
global guard_active
if {!$guard_active} { return }
set host [lindex [split $uhost @] 1]
set count [llength [chanlist $chan $host]]
if {$count > 5} {
putquick "KILL $nick :Mass Join Koruması"
write_log "MASS JOIN: $nick @ $host"
}
}
proc check_kufur {nick uhost hand text} {
set kufurler {salak aptal orospu amk aq}
foreach kelime $kufurler {
if {[string match -nocase *$kelime* $text]} {
putquick "PRIVMSG $nick :Küfür tespit edildi, uzaklaştırılıyorsunuz."
putquick "KILL $nick :Küfür yasak!"
write_log "KÜFÜR: $nick -> $text"
return
}
}
}
proc write_log {text} {
global log_file
set now [clock format [clock seconds] -format "%Y-%m-%d %H:%M"]
set fp [open $log_file a]
puts $fp "$now - $text"
close $fp
}
bind evnt - init-server check_proxy_on_connect
proc check_proxy_on_connect {type} {
global proxy_list
foreach user [users] {
set host [getchanhost $user]
set ip [lindex [split $host @] 1]
if {[file exists $proxy_list]} {
set data [readfile $proxy_list]
foreach line $data {
if {[string match *$ip* $line]} {
putquick "KILL $user :Proxy bağlantı engellendi"
write_log "PROXY BLOCK: $user -> $ip"
putserv "PRIVMSG OperServ :AKILL ADD $ip 30m Proxy Engeli"
}
}
}
}
}
proc readfile {filename} {
set f [open $filename r]
set lines [split [read $f] "\n"]
close $f
return $lines
}
# proxycheck.tcl - Proxy.txt IP'leri bağlanınca KLINE atar
set proxy_list_file "proxy.txt"
set proxy_kline_reason "Proxy tespit edildi. Erişiminiz engellendi."
bind evnt - init-server evnt_init_server
bind raw - "NICK" check_user_proxy
# Kullanıcı bağlandığında IP'yi kontrol eder
proc check_user_proxy {from keyword text} {
global proxy_list_file proxy_kline_reason
# Gelen IP'yi al
if {[regexp {^\S+ \S+ (\S+) \S+ :(.*)$} $text -> ip nick]} {
# Proxy listesi oku
if {[file exists $proxy_list_file]} {
set proxyfile [open $proxy_list_file r]
set proxies [split [read $proxyfile] "\n"]
close $proxyfile
foreach proxyip $proxies {
if {[string match $proxyip $ip]} {
putlog "proxycheck.tcl: $ip adresi proxy listesinde! KLINE uygulanıyor."
putquick "PRIVMSG OperServ :KLINE ADD $ip 7d $proxy_kline_reason"
break
}
}
}
}
return 0
}
proc evnt_init_server {} {
putlog "proxycheck.tcl yüklendi. Proxy.txt ile bağlantı IP'leri kontrol edilecek."
}