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.

sicherheit scripts

Old posts that have not been replied to for several years.
r
r0t3n
Owner
Posts: 507
Joined: Tue May 31, 2005 6:56 pm
Location: UK

Post by r0t3n »

Well.

Code: Select all

proc clone:scan {host chan} { 
  set fp [open "clonescan.$chan" a] 
  foreach host {[chanlist $chan]} { 
    set host *!*@[lindex [split $host "@"] 1] 
    puts $fp $host 
  } 
  close $fp 
  clone:check $host $chan 
} 

proc clone:check {host chan} { 
  set fp [open "clonescan.$chan" r] 
  set data [read -nonewline $fp] 
  close $fp 
  set hosts [split $data "\n"] 
  foreach host {[chanlist $chan]} { 
    set host *!*@[lindex [split $host "@"] 1] 
    if {[string match "$host" $hosts]} { 
      inc clones($chan) 1 
    } 
  } 
}


Thats basic. Just a file and a string match. But hopefully it works. I havn't tested it yet. Oh, and nice script metriod never noticed you made it this morning.
r0t3n @ #r0t3n @ Quakenet
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

let me enlighten you on a very important subject: if you don't test your code - and I don't think you've ever tested a single line written by yourself - it's basically the same if you believe you can drive since you have seen other people drive, having never driven a car yourself

for starters, [chanlist] doesn't return a host list, it returns a nick list, so your code is absolutely disfunctional

and apparently you haven't bothered to consider what I suggested to you earlier, about file access and maintaining list structures in memory... remember? I even wrote an example of that, especially for you
r
r0t3n
Owner
Posts: 507
Joined: Tue May 31, 2005 6:56 pm
Location: UK

Post by r0t3n »

that memory stuff is complicated for me. I will loke through a guide to find out more. Then i will correct my script. I need to change:

Code: Select all

foreach host {[chanlist $chan]} { 
    set host *!*@[lindex [split $host "@"] 1] 
    puts $fp $host 
  } 
To

Code: Select all

foreach nick {[chanlist $chan]} { 
    set host [getchanhost $nick $chan
    set host *!*@[lindex [split $host "@"] 1] 
    puts $fp $host 
  } 
Then if you could please help me more of this memory stuff i could ditch that puts fp and the file stuff and just use memory. Im not good with this memory stuff. Then, can i still use string match with this memory stuff to match any hosts. Also, how can i increase a variable by 1. Thanks for your help so far, im willing to learn more about this memory stuff and get this script tested and completed. Also maybe a antipjen-drone script if you could help with that aswell. Trying my best ;p.
r0t3n @ #r0t3n @ Quakenet
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

precisely which part of this you did not understand?
r
r0t3n
Owner
Posts: 507
Joined: Tue May 31, 2005 6:56 pm
Location: UK

Post by r0t3n »

Code: Select all

foreach nick {[chanlist $chan]} { 
    set host [getchanhost $nick $chan] 
    set host *!*@[lindex [split $host "@"] 1] 
    }
set clonescan($channel) {}
foreach hosts {[$host]} {
    if {[set idx [lsearch $clonescan($chan) $hosts]] != -1} { 
      lset $clonescan($channel) $idx $hosts
} 
}
set clonecheck 1
if {$clonecheck} {
foreach hostcheck {[$hosts]} {
if {[string match "$hostcheck" "$clonescan($channel)"]} {
incr clones($channel)
}
}
}
Ok, I read some guides and made this simple script. Hopefully it works. Demond can you check that code is correct as you know alot about data structures in memory. Atleast i tryed :D.
r0t3n @ #r0t3n @ Quakenet
m
metroid
Owner
Posts: 771
Joined: Wed Jun 16, 2004 2:46 am

Post by metroid »

TEST IT YOURSELF AND FIND OUT IF ITS CORRECT.
D
Dizzle
Op
Posts: 109
Joined: Thu Apr 28, 2005 11:21 am
Contact:

Post by Dizzle »

man tosser learn too test ot out yourself dude, 90 % of your post are filled with question "is this code alright, i dont want too test it"
What's this real life ppl keep talking about ??? And where can I download it ???
r
r0t3n
Owner
Posts: 507
Joined: Tue May 31, 2005 6:56 pm
Location: UK

Post by r0t3n »

Ok. I have tested the script but got some errors which i can fix myself. But, can anyone tell me how i can get a random bot to join the channel.
r0t3n @ #r0t3n @ Quakenet
g
greenbear
Owner
Posts: 733
Joined: Mon Sep 24, 2001 8:00 pm
Location: Norway

Post by greenbear »

this should let you pick a random bot

Code: Select all

set randombot [lindex [bots] [rand [llength [bots]]]]
r
rt
Voice
Posts: 25
Joined: Fri Jul 08, 2005 4:00 pm

Post by rt »

Tosser^^ wrote:Ok. I have tested the script but got some errors which i can fix myself. But, can anyone tell me how i can get a random bot to join the channel.
i recall you from IRC miethering me like mad to create you a clonescan
User avatar
^DooM^
Owner
Posts: 772
Joined: Tue Aug 26, 2003 5:40 pm
Location: IronForge
Contact:

Post by ^DooM^ »

rt wrote:
Tosser^^ wrote:Ok. I have tested the script but got some errors which i can fix myself. But, can anyone tell me how i can get a random bot to join the channel.
i recall you from IRC miethering me like mad to create you a clonescan
He does that a lot ;)
The lifecycle of a noob is complex. Fledgling noobs gestate inside biometric pods. Once a budding noob has matured thru gestation they climb out of their pod, sit down at a PC, ask a bunch of questions that are clearly in the FAQ, The Noob is born
r
r0t3n
Owner
Posts: 507
Joined: Tue May 31, 2005 6:56 pm
Location: UK

Post by r0t3n »

oh no. not rt. The one how banned me on all the #antipjen bots because he didnt get his own way. what a loser he is. And now he has got himself banned on 19 bots on 153 channels.

Thanks for that random bot code greenbear.
r0t3n @ #r0t3n @ Quakenet
r
rt
Voice
Posts: 25
Joined: Fri Jul 08, 2005 4:00 pm

Post by rt »

Tosser^^ wrote:oh no. not rt. The one how banned me on all the #antipjen bots because he didnt get his own way. what a loser he is. And now he has got himself banned on 19 bots on 153 channels.

Thanks for that random bot code greenbear.
please please refrase that.

You mess me around, I ban you.

And I'm banned on 19 bots, like I care? Get out more, please. :)
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

rt wrote:
Tosser^^ wrote:oh no. not rt. The one how banned me on all the #antipjen bots because he didnt get his own way. what a loser he is. And now he has got himself banned on 19 bots on 153 channels.

Thanks for that random bot code greenbear.
please please refrase that.

You mess me around, I ban you.

And I'm banned on 19 bots, like I care? Get out more, please. :)
in case you haven't noticed, here you are not on your local qnet ban discussion forum, so better stick to the topic(s)
m
metroid
Owner
Posts: 771
Joined: Wed Jun 16, 2004 2:46 am

Post by metroid »

carefull demond, or everyone will ban you on quakenet

:P :D
Locked