PtokaX forum

Archive => Archived 4.0 boards => Finished Lua 4 scripts => Topic started by: chill on 23 April, 2004, 10:08:59

Title: SL
Post by: chill on 23 April, 2004, 10:08:59
strating a new bot soon so maybe someone finds thisone usefull

Quote<-SecuLite-> --- SecuLite V 0.42 Help ---

   +mm ? - Send a Mass Message to all Users.

   +nickinfo ? - Displays small info about the User.

   +logs? - Shows the latest Logs from Logqueue.

   +logs? - Shows the latest Logs from Logqueue.
   +iplog ? - Searches the Logs for an IP ( Days optional ).
   +nicklog ? - Searches the Logs for a NICK ( Days optional ).
   +rangelog ? - Searches the Logs for an IP-Range ( Days optional ).

   +watchrange ? - Add/Del an IP-Range to/from WatchList.
   +watchnick ? - Add/Del users IP-Range to/from WatchList.

   +bnick ? - Add/Del a Nick in BlockedNickList.

   +repnick ? - Add/Del a Nick from NicksToReportList.

   +immune ? - Add/Del a IP from ImmuneList.

   +addrange ? - Add a Range to DenyRanges.
   +delrange ? - Del a Range from DenyRanges.
   +listrange ? - List DenyRanges ( Num is optional ).
   +searchrange ? - Searches the DenyRanges for a Part of a IP.

   +whoisRI ? - Query RIPE Database.
   +whoisAR ? - Query ARIN Database.
   +whoisNI ? - Query NIC Database.
   +whoisAP ? - Query APNIC Database.

   +regbot ? - Reg/Unreg Bot: "-SecuLite-".

   +susip ? - Turn search fo Suspect IP's ON/OFF.

   +ipbot ? - Turn IP-Bot ON/OFF.

   +autodelaccount ? - Add/Del Accounts from AutoDelAccountList.

   +fromatranges ? - Format Ranges for SecuLite.

   +slhelp? - This Text.



SecuLite V 0.42 (http://www.bbfree.com/cannaforum/index.php?act=Attach&type=post&id=947)
Title:
Post by: sander815 on 27 April, 2004, 14:40:21
what does the allow ranges do?
do i have to add every ip in it for every user that connects to the hub?
Title:
Post by: sander815 on 27 April, 2004, 15:20:56
hmm, all logged sharesizes are 0 gb....

my own: <--IpgUarD--> Nick: sandoz, IP: 10.0.0.155, Descr: ..........<++ V:0.401,M:A,H:0/0/1,S:3>, Share: 0.00 GB

and i am sharing 7 gb
i already logged in and out, no difference
Title:
Post by: chill on 27 April, 2004, 18:27:54
hmmm...  thats odd, must be a different myinfo string, than the one dc++ uses, can you post your whole $MyINFO string, or can somebody tell, me if there are different MyINFO strings or shares in the MyINFo string?
Title:
Post by: sander815 on 28 April, 2004, 08:50:16
what do you mean? from the log?

{ [1] = "068.0xx.1xx.128", [2] = "Arctic", [3] = "27/04/04 - 23:39:10", [4] = "OFF", [5] = "$MyINFO $ALL testuser <++ V:0.306,M:A,H:0/1/0,S:3>$ $Cable$$5787494432$" }
Title:
Post by: sander815 on 28 April, 2004, 09:09:52
can you also edit the scripts so i can turn on/off pm'ing admins when a blocked ip tries to enter? like L.I.S. can?
Title:
Post by: chill on 28 April, 2004, 21:56:01
Quotecan you also edit the scripts so i can turn on/off pm'ing admins when a blocked ip tries to enter? like L.I.S. can?

it should be in there also.

here is the fix, it was because TD4 has a different MyINFO string than later versions, I forgot about that.

sl 0.4 (http://www.bbfree.com/cannaforum/index.php?act=Attach&type=post&id=973)
Title:
Post by: sander815 on 29 April, 2004, 08:29:46
i am sorry to say, but i installed this version, but still i get 0 gb

f.i. in the log: { [1] = "010.000.000.155", [2] = "sandoz", [3] = "29/04/04 - 05:55:37", [4] = "ON", [5] = "$MyINFO $ALL sandoz checking FAKESHARES/LIMITERS etc.<++ V:0.401,M:A,H:0/1/0,S:3>$ $LAN(T1)$-$7792540884$" }

+nicklog sandoz:
1 - Date: 29/04/04 - 05:55:37, Nick: sandoz, IP: 10.0.0.155, Logged: ON
   Descr: checking FAKESHARES/LIMITERS etc.<++ V:0.401,M:A,H:0/1/0,S:3>, Share: 0.00 GB

with SecuLite-V-0.43
Title:
Post by: sander815 on 29 April, 2004, 16:56:38
and something else:
when i do +logs
i get this
----------------------------------
<--IpgUarD-->    LOGS: 13
----------------------------------
and then 13 logs

there are WAY more logs in the file in the logs folder, like 500 or so, why doin't i see these?
Title:
Post by: chill on 29 April, 2004, 19:52:21
yepp you only see the logs in logqueue,

and i copied your MyINFO to my logs and I got

<-SecuLite->    LOGS, Searched for: sandoz, Matches: 1
[19:45] ----------------------------------
[19:45] 1 - Date: 29/04/04 - 05:55:37, Nick: sandoz, IP: 10.0.0.155, Logged: ON
[19:45]    Descr: checking FAKESHARES/LIMITERS etc.<++ V:0.401,M:A,H:0/1/0,S:3>, Share: 7.26 GB

with this one where I actually only also fromat the infostring

sl o.43 (http://www.bbfree.com/cannaforum/index.php?act=Attach&type=post&id=979)
Title:
Post by: sander815 on 30 April, 2004, 21:49:43
so, what am i doing wrong then?
Title:
Post by: sander815 on 01 May, 2004, 00:55:26
btw: i am running PtokaX DC Hub 0.3.2.6 TestDrive 4  on a winnt 4.0 PIII 450 / 512 mb ram
Title:
Post by: sander815 on 01 May, 2004, 01:35:16
after some fooling around, it now worx....odd

but it worx :)
Title:
Post by: sander815 on 01 May, 2004, 09:43:38
is it possible that you make  a better helpfile?
f.i.: +susip on/off, what does it mean, seacr for suspect ips on/off?

i am getting msgs of members that i know like: SUSPECT IP: 24.50.xxx.xxx, Nick: spd logged ON 21 times today.

their ips are not oin the deny ranges


maybe a bit better help file would be nice :)
Title:
Post by: chill on 01 May, 2004, 15:31:54
okey supect IP what it does,

it logs to each IP their number of connects,
the nicknames used at each connect, and checks, that not too many people using the same IP can enter the hub, by default its 5 I guess,

it will report IP that connect with more than 3 different nicks per day

and will ban a ip when connected more often than 50 times per day,

and will deny access tot he hub if a ip is used by more than 5 users,

cause i think mostly search bots use tha same ip to connect but always change their nicks, so when one is reported i check the whois for the ip, and i then can either ban the ip-range or leave em'. Or if not sure put them on watched list to see what they are doing in the hub, connects & searches.
Title:
Post by: sander815 on 26 May, 2004, 14:00:34
how can i turn off antihammer?
Title:
Post by: chill on 26 May, 2004, 18:32:28
i forgot to add a function for it, so you have to do it manually, int the script

check for this line

SLSettings.AntiHammer = "ON"

and change it to

SLSettings.AntiHammer = "OFF"

or in the settingsfile in the sl folder
do the same with it.

but beware that, then you may get myinfo or chat flooded.
Title:
Post by: sander815 on 02 June, 2004, 01:45:17
its for a private hub, so no prblem
can't you edit the script?
Title:
Post by: blackwings on 02 June, 2004, 23:39:55
[3] = {
[1] = "4.0.38.42",
[2] = "4.0.38.52",
[3] = "s0.wbcsanfran.bbnplanet.net",
},

Does this mean that it also blocking the hostname or is it just a "name" to identify the ip-range?
Title:
Post by: sander815 on 03 June, 2004, 17:34:52
where can i download a updated IP-Denyranges file?
Title:
Post by: chill on 03 June, 2004, 19:23:55
whats new:

 - SL V 0.44: 03.06.04
   1. Added AntiHammer ON/OFF command "+antihammer" ON/OFF
   2. Added new ranges from P2P thx to aCe.

the ranges are I guess almost a month old, totally forgot that I had them, 9000 around, and mem is around 6 MB,
will reduce the mem in next version.
Or if anybody has got the new ranges from P2P, just post em'.

and blackwings, the rangename is neccessary to add the ranges, but else they don't have any effect, but that you see it when they get reported, but if you got allowed ranges then you can do a ISP check for the name.

download here

SL V 0.44 (http://www.bbfree.com/cannaforum/index.php?act=Attach&type=post&id=1007)
Title:
Post by: sander815 on 04 June, 2004, 08:33:39
great!

great scripts also  :D :))
Title:
Post by: chill on 04 June, 2004, 14:15:17
thx,
but I'd like to know what you use it for since its not a public hub. Just curious.
Title:
Post by: sander815 on 04 June, 2004, 15:42:39
to keep MSA, RIAA etc out....
i know its private, but just to be sure, so they can't login either, after they got a login in some way
Title:
Post by: sander815 on 04 June, 2004, 16:18:55
i get ip block warnings around 10-30 / day, so...
Title:
Post by: [NL]trucker on 05 June, 2004, 16:02:00
hmm cant d/l chill websote seems to be down:-)
Title:
Post by: chill on 05 June, 2004, 19:22:34
w version, some optimising  ,

- SL V 0.45: 05.06.04
1. Added StrDB for SusIP table. (memory is down to 3 MB  ) with over 10.000 ranges :))
2. Created IP-Bot with StrDB, and included it
3. Added CleanSusIP() to clean the susip table at midnght, it will only keep entreis of users that are online
to make sure that Connects per IP, are always accurate.
4. change command formatranges to reloadranges, this command lets you reload ranges from the DenyRangeTXT file, by default the guardian.p2p file.

simple thing to add your new denyranges, go here (http://methlabs.org/sync/)
download the file you need, and unpack into the SLfolder (SecuLite)

then start the hub, and to update the file overwrite the last p2pfile,
and type +reloadranges

SL V 0.45 (http://www.uknnet.com/lua/attachment.php?attachmentid=28&sid=6633d43449257f475bea21df109ae8f7)
Title:
Post by: sander815 on 07 June, 2004, 15:50:22
very nice!

only +slhelp doesn't give my anything
Title:
Post by: Couger on 08 June, 2004, 09:38:42
Very nice
Chilla

once again what a fantastic script youve wrote

your first one logger was great and now this one is even better the favorite part is the way you integrated the feature ti import ranges from methlabs P2P file which is easy

Keep up the good work

Cheers [UKF]Couger
Title:
Post by: sander815 on 11 June, 2004, 08:40:33
QuoteOriginally posted by chill

simple thing to add your new denyranges, go here (http://methlabs.org/sync/)
download the file you need, and unpack into the SLfolder (SecuLite)

then start the hub, and to update the file overwrite the last p2pfile,
and type +reloadranges

SL V 0.45 (http://www.uknnet.com/lua/attachment.php?attachmentid=28&sid=6633d43449257f475bea21df109ae8f7)

odd, now it worx again...

do i just need the guarding.p2p file and reload that?
Title:
Post by: chill on 11 June, 2004, 16:56:15
yepp place it in the sl folder by default 'SecuLite'
Title:
Post by: sander815 on 27 July, 2004, 23:19:46
any new updates on this script?
Title:
Post by: YASHOV on 07 August, 2004, 16:58:43
After I enter "+slhelp", nothing happens ?(

I also get:
Syntax Error: attempt to call field `Getn' (a nil value)
Title:
Post by: YASHOV on 08 August, 2004, 09:19:54
Could someone please have a look at this bot?

I really need this bot, but getting errors

1) +slhelp  does not work
2) Syntax Error: attempt to call field `Getn' (a nil value)
3) share is shown as 0.00

PLEASE!!!!!!!!

I am running PetokaX v0.3.2.6 test drive 4

Thank you very much!!!!
Title: +slhelp
Post by: Bobby1999 on 12 August, 2004, 01:49:03
same here
Title:
Post by: YASHOV on 14 August, 2004, 05:01:38
Hmmmm, looks like nobody is going to fix the problems with this bot............ :(  :(  :(
Title:
Post by: chill on 15 August, 2004, 12:17:30
no I'm looking in :).

Quote1) +slhelp does not work   2) Syntax Error: attempt to call field `Getn' (a nil value)   3) share is shown as 0.00

well 1. could be that a script also uses the same prefix and then blocks all commands beginning with that prefix.
So try running sl alone, and see if it works, if it works then you can change the name of the script maybe to A...SLNAme.lua so it get loaded at first.

the second, I couldn't localize, but I fixed a mistake in TDB so the error could be gone.

The third is tuff, SL will only shows those share as correct that match the patternmatching, clear ;), but you could help me by giving me the MyINFO string of the user who's share is shown false, or at least the rest of it, you should be able to find it in one of the log files.

sl 0.46 (http://lua.uknnet.com/attachment.php?attachmentid=50&sid=5d171c78cabd5fa6cecacd384624834c)
Title:
Post by: YASHOV on 15 August, 2004, 14:42:30
Thank you for looking in to it :)

I upgraded to v0.46 and:

1) If I run the script by itself, +slhelp still does not work if I enter +slhelp in the main chat window or if I select "Display SecuLite Help" from the right click menu.

2) I still get "Syntax Error: attempt to call field `Getn' (a nil value)" every time a reg connects to the hub.

3) All users are showing as having 0.00GB in their share.
Not sure if this is what you want, it's from the SL log file:
{ [1] = "192.168.000.003", [2] = "Yashov", [3] = "15/08/04 - 21:10:45", [4] = "ON", [5] = "\"$MyINFO $ALL Yashov Admin<++ V:0.403,M:A,H:0/1/0,S:8>$ $DSL$yas@mail.com$802119155096$\"" }

I see this when I select "Check logs for UserNick" from the right click menu:
[01:03:02] 3 - Date: 15/08/04 - 21:10:45, Nick: Yashov, IP: 192.168.0.3, Logged: ON
[01:03:02]    Descr: N/A, Share: 0.00 GB

It says Descr: N/A, even though I have "Admin" as description and my share is definitely not 0.00GB LOL

Thank you very much
Title:
Post by: Herodes on 15 August, 2004, 19:18:43
I was looking in this and number [5] dont look healthy unless chill needed it to be so ...
[5] = "\"$MyINFO $ALL Yashov Admin<++ V:0.403,M:A,H:0/1/0,S:8>$ $DSL$yas@mail.com$802119155096$\""}.. ?
Title:
Post by: chill on 17 August, 2004, 19:13:46
okey fixed the MyINFO ;), and yepp I formatted it twice by accident,

I also connected as a reg and didn't get any errors,
I only call Getn for the IPBot, so no idea why the error should happen, maybe you can give me more details,
does it happen with all regged or only with a specific reg?

About the help, try renameing the script to something like

1SecuLite...   or
ASeculite...  or
ZSecuLite...  one should work I hope,

Well anyways fixed version is here

sl 0.47 (http://lua.uknnet.com/attachment.php?attachmentid=53&sid=00aaf37090305638338bb64fb514f1a8)
Title:
Post by: YASHOV on 19 August, 2004, 00:30:36
Thank you very much for fixing MyINFO,works great now :-)

I get "Syntax Error: attempt to call field `Getn' (a nil value)" when any and all members connect
There are as many errors showing as there are members connected, REGs, OPs, Admins............
But not the bots.

As for help, I tried everything..........
I renamed it and I got it to run as the only bot and I still can't get help to work :-(
Title:
Post by: YASHOV on 20 August, 2004, 01:10:15
I found out why I was getting the " Syntax Error: attempt to call field `Getn' (a nil value) " error.
It happens if DenyRanges.txt is in the scripts\SecuLite folder.
I removed it from the folder and errors stopped.
I got the "DenyRanges.txt" from "SecuLite_V_0[1].44.zip"

OK, I got a new guarding.p2p.zip from HERE (http://methlabs.org/sync/), reloaded and the deny ranges is now working and I am not getting any errors :-)

As for help, it works if I login as an OP or Admin or Master:-) but it does not work when I login as a NetworkFounder...... :-(

And I would like to request a function:
If a member loges in with a different IP more than a set number of times during a set period of time (like a month or adjustable), I would like SecuLite to send Admins and OPs a PM with the members name and the IPs he/she has used.
And I would like this function to have an Immune List for members on dialup and ISDN

Thank you very much
Title:
Post by: chill on 22 August, 2004, 11:18:25
good to hear its working now :),
I will add a function where you can adjust the profiles which are allowed to use SL.

To your other request,
I don't understand what its good for,
see it could only check registered users, since the others just change their nick and you would have a new entrie in your NicktoIP table.
Or it could end up that your regged users connect as unregged. But maybe you got some other arguments.

What I could do and what sounds reasonable to me, is, if you search the logs for a nick I could add a msg with how many different ip's the person connected. if found in the logs.

greets chill
Title:
Post by: YASHOV on 22 August, 2004, 15:51:33
Thank you very much!! :-)

As for my request, I want this function so that I am notified as soon as a members IP changes.
The reason for this, it seems there are a few people around that are selling their private hub login info........
And I need to know when a members IP changes so that I can investigate the reasons for the change.
I know I could do it manually, I just thought an automated process will save me a lot of time........
It is a private hub so the nick will never change.

Thank you
Title:
Post by: chill on 05 October, 2004, 01:52:38
is sorta done..

but you will have to check the nick for yourself, cause keepin an table with all users and their used IP's can end in huge mem usage so I added the GeoIP databas to the script, whitch you have to download from the net and you can update is yoursefl if you want, as the guardian.p2p also.

[01:23] +nicklog chill 1
[01:23]  ----------------------------------
[01:23] <-SecuLite->    LOGS, Searched for: chill, Matches: 3
[01:23]  ----------------------------------
[01:23]  1 - Date: 05/10/04 - 01:09:36, Nick: chill, IP: 23.0.0.1, From: South Africa (ZA), Logged: ON
[01:23]     Descr: <++ V:0.401,M:P,H:0/1/0,S:4>, Share: 1.68 GB
[01:23]  2 - Date: 05/10/04 - 00:58:23, Nick: chill, IP: 4.0.0.1, From: United States (US), Logged: ON
[01:23]     Descr: <++ V:0.401,M:P,H:0/1/0,S:4>, Share: 1.68 GB
[01:23]  3 - Date: 05/10/04 - 00:53:45, Nick: chill, IP: 93.0.0.1, From: South Africa (ZA), Logged: ON
[01:23]     Descr: <++ V:0.401,M:P,H:0/1/0,S:4>, Share: 1.68 GB
[01:23] +nicklog reg 1
[01:23]  ----------------------------------
[01:23] <-SecuLite->    LOGS, Searched for: reg, Matches: 4
[01:23]  ----------------------------------
[01:23]  1 - Date: 05/10/04 - 00:44:38, Nick: reg, IP: 55.0.0.6, From: United States (US), Logged: ON
[01:23]     Descr: <++ V:0.4032,M:A,H:0/1/0,S:1>, Share: 0.00 B
[01:23]  2 - Date: 05/10/04 - 00:44:06, Nick: reg, IP: 80.0.0.6, From: United Kingdom (GB), Logged: OFF
[01:23]     Descr: <++ V:0.4032,M:A,H:0/1/0,S:1>, Share: 0.00 B
[01:23]  3 - Date: 05/10/04 - 00:44:04, Nick: reg, IP: 217.0.0.6, From: Germany (DE), Logged: ON
[01:23]     Descr: <++ V:0.4032,M:A,H:0/1/0,S:1>, Share: 0.00 B
[01:23]  4 - Date: 05/10/04 - 00:44:03, Nick: reg, IP: 9.0.0.6, From: United States (US), Logged: OFF
[01:23]     Descr: <++ V:0.4032,M:A,H:0/1/0,S:1>, Share: 0.00 B

this is what the logs look like it also show the country next to the IP. I cannot gurante for the accuracy of the Countryname, but you can update the File by yourself, anytime you like.

If you use this bot you need a clean install.
Anybody should read the SecuLite Changelog, cause I
but the addys there where to find the guardian.p2p file
and the GeoIPDataBase file.

This script uses IP-Ranges and looks them up through Binary search witch is the fastest way of doing a IP-Range search, I advise anybody making scripts that search a table with IP-Ranges to use a binary search since it is the fastest, you can also find it in the GeoIP script from VidFamme, where you might find it easier to understand than in this script. But in a test once we found out that its like dunno forgot, since it was ages
ago, but really much faster than normal for i,v in table do , when using tables bigger than 10 entries, and it gets faster the bigger the table,
GeoIP has for exsamp 65.000 entries.
Well only if you are interested, else a snale also
gets to its aim, sometime.


SL V.048 (http://lua.uknnet.com/attachment.php?attachmentid=68&sid=9a91b6c98d3a5b97f33c1086d95b6b86)
Title:
Post by: YASHOV on 27 October, 2004, 16:15:55
Thank you very much!!!

But the download link does not work :-(
Title:
Post by: Psycho_Chihuahua on 27 October, 2004, 16:44:34
Try this one

SecuLite-V-0.48.zip (http://helvetia.ath.cx/downloads/SecuLite-V-0.48.zip)
Title:
Post by: chill on 20 November, 2004, 14:18:37
new version, did some fixes due to long testing.
Check the ChangeLog.

Remeber to update your denyranges, and GeoIP file yourself, from time to time.

sl 0.50 (http://lua.uknnet.com/attachment.php?attachmentid=70&sid=7733ba52de145247cc27d2660507fd98)

* right edited, :) *
Title:
Post by: Psycho_Chihuahua on 20 November, 2004, 18:04:41
Guess u meant sl 0.50  :D
Title:
Post by: sander815 on 11 April, 2005, 23:05:07
what are the correct places to get the denyranges?