cSlave 1.0 Complete
 

News:

29 December 2022 - PtokaX 0.5.3.0 (20th anniversary edition) released...
11 April 2017 - PtokaX 0.5.2.2 released...
8 April 2015 Anti child and anti pedo pr0n scripts are not allowed anymore on this board!
28 September 2015 - PtokaX 0.5.2.1 for Windows 10 IoT released...
3 September 2015 - PtokaX 0.5.2.1 released...
16 August 2015 - PtokaX 0.5.2.0 released...
1 August 2015 - Crowdfunding for ADC protocol support in PtokaX ended. Clearly nobody want ADC support...
30 June 2015 - PtokaX 0.5.1.0 released...
30 April 2015 Crowdfunding for ADC protocol support in PtokaX
26 April 2015 New support hub!
20 February 2015 - PtokaX 0.5.0.3 released...
13 April 2014 - PtokaX 0.5.0.2 released...
23 March 2014 - PtokaX testing version 0.5.0.1 build 454 is available.
04 March 2014 - PtokaX.org sites were temporary down because of DDOS attacks and issues with hosting service provider.

Main Menu

cSlave 1.0 Complete

Started by Corayzon, 07 September, 2004, 13:36:46

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Corayzon

u want cslave? to bad u have to wait :P

last update notes::

- Release system redone with +editrls command!
   - +getpass command added to registering system!
   - Main ip logging system implemented!
   - Ip removal cueing added and currently set to 3 days!
   - Profilelevel translations to profilenames fixed!
   - Templates added for scripts that have crapy settings!
   - Fixed and optismed alot of api script!

*** EDIT ***
Here is a stable build from not to long ago. Should give everyone a good idea of how it works =]

http://www.snooze.no-ip.com/sk/viewtopic.php?t=501

After i finish developing my current software ill be back on track to get it complete asap before any more work comes my way!

Corayzon

#1
What is cSlave :-

cSlave is a powerfull hubscript that allows hub owners to easily script and maintain their pTokaX Hubs.
It comes with 2 major major advantages over the pTokaX's scripting interface.

1:-

Instead of passing protocol or command strings ($Search\ +command) around from one script
to another, it simply links input strings to the relevent functions quickly and effeicently. For instance,
say you have 20 hub scripts running in pTokaX, and lets say 10 of them have the full hub data enabled.
When pTokaX receives say $ConnectToMe, pTokaX then passes this through the 10 scripts until a
DataArrival function actually returns true (anything thats not nil). This takes up process time and can
slow down a large hub with over 800 users.

Now, cSlave is a single script that allows full hub data and full search data. So to pTokaX the script
processing is minimal on the system. Once cSlave handles a input, it then checks tables for functions
that get executed in one quick loop. So then, when inputs are received, it will then stop pTokaX
passing and rehandling the data in lua scripts that are just going to return nothing anyway.

So in basic terms, this means that u can have the same amount of data being handled at a quicker
rate. Therefor:- your hub will run more effeicently on your system resources.

2:-

It comes with a huge range functions for scripters and scripts to use that are quick, effeicent and
effective aswell as a basic and manipulatable mainframe that is %99.9 sercure and effective.

The basic system is made up of serval functions that allow scripts to, in a few short lines:- handle
protocol or commands to functions. These functions are as follows:-

Purpose: This will register a function to be called when protocol data is inputted. (ex. $GetINFO)
Function: regProtocolEvent(sEvent, fFunction)
sEvent: can be $MyNick, $Key, $ValidateNick, $MyPass, $Version, $GetNickList, $MyINFO, $GetINFO,
$ConnectToMe, $MultiConnectToMe, $RevConnectToMe, $Search, $MultiSearch, $SR, $To:, $Kick,
$OpForceMove, $Quit or <
fFunction: is the function to execute when protocol data is inputted

Purpose: Registers a command to execute a function when type by a user
Function: regCommand(sCommand, fFunction, iLevel, iArgCount)
sCommand: is the name of the command to add to the system
fFunction: is the function to execute when a command is inputted
iLevel: is the minimum level needed by a user to execute the command
iArgCount: is the last argument in the command (enables spaces to be in the last argument!)

Purpose: This will register a function to be called when cslave receives a pTokaX function call.
Function: regPtokaxEvent(sEvent, fFunction)
sEvent: can be Main, DataArrival, NewUserConnected, OpConnected, OpDisconnected and UserDisconnected.
fFunction: is the function to execute when a ptokax event is called

more to be done::here

noza

??????Hawk??????

hi m8  ..

So  what will it give us..  


you got a List of  commands for it  ????

Corayzon

lol, me too mate :P

nuh, the forums a neglected by me atm cause im working heaps. but if u wanna see cSlave in action u can login into mi hub 'om-tribe.no-ip.org'

*** om-tribe is running cSlave 1.0 b 0.3, when the current version is 0.1 b 0.8, so there are some large differences u might see from the hosted cSlave to the current build.

*** btw, om-tribe is currently down as the host is updating his server ;)

Corayzon

function showNews(tUser)
	tUser:SendPM(sBotName, getFile("cSlave Addons/Templates/News.txt"))
end

regCommand("news", showNews, 100)

now that is easy!

noza

??????Hawk??????

yeh  but to run  cSlave we need to dump all our other scripts  ..


so what will  cSlave give us in replacement for all the  Hub security / Fun and hub settings  ????

Corayzon

before i paste the help screen, all of these commands can be turned off, edited and renamed at will from easy to edit settings files. Also note the this help screen was generatored by a hubowner profile from the hub im building for a mate atm.

+!   					- opens a pm with the cSlave bot
	+help  					- shows this help dialog
	+dhelp  					- show help on downloading information
	+rules  					- shows the rules for the hub in English
	+hrules  					- shows the rules for the hub in Hebrew
	+prules  					- shows the rules for the hub in Portuguese
	+urls  					- shows the hub list of fav url's
	+sfv  					- shows information about sfv files
	+commands   				- sends the hubs user commands to your client
	========================================
	A w a y   A n d   B a c k   C o m m a n d s !
	========================================
	+away [sReason] 				- sets your status to away
	+back [sReason] 				- sets your status to back
	========================================
	K i c k i n g   A n d   B a n n i n g   C o m m a n d s !
	========================================
	+kick  [sReason] 			- kicks a user from the hub.
	+ban  [sReason] 			- bans a userip address from the hub.
	+timeban   [sReason]		 - bans a user from the hub for a specific amount of time.
	+unban  				- unbans a user from the hub.
	+clrtimebans   				- clears all the timebans
	+clrpermbans   				- clears all the permbans
	+banlist   					- shows the list of banned users.
	+kickstats  			- shows the kick stats for specific users,
	========================================
	 P r o f i l e   M a n a g e r   C o m m a n d s !
	========================================
	+addprofile   	- adds a profile to the system
	+delprofile  			- removes a profile to the system
	+profiles  					- shows a list of the registered profiles and their levels
	========================================
	R e g i s t e r i n g   C o m m a n d s !
	========================================
	+reg    	- registers a user to the hub.
	+unreg  			- unregisters a user to the hub.
	+rereg   		- reregisters a user to a new profile.
	+getpass  				- gets a nicks current password
	+changepass  			- changes your current password (you have to be registered!)
	+reglist [sProfileName] 			- shows a list of users in a specific profile (if sProfileName is nothing then it shows the profile list)
	========================================
	R e l e a s e   C o m m a n d s !
	========================================
	+addrls   			- adds a release to the list
	+delrls  		- deletes a release from the list
	+rls  					- shows a list of the latest 30 releases
	+rlsfull  					- shows the list of all releases
	+findrls  			- shows a list of releases that match the search string
	========================================
	P r o t e c t i o n   C o m m a n d s !
	========================================
	+addsafeuser  			- adds a user to the safelist
	+remsafeuser  			- removes a user from the safelist
	+safelist   					- shows the list of currently safe users
	========================================
	S a y    C o m m a n d s :
	========================================
	+say   		 - Sends sMessage to the hub as sUsername
	+saypm    		 - Sends sMessage in a pm from sFrom as sUsername
	+sayme   		 - Sends sMessage to the hub as sUsername in the format '*  
	========================================
	U s e r   I n f o r m a t i o n   C o m m a n d s !
	========================================
	+userinfo  			- shows information for inputted users
	+myinfo   					- shows your own user information

noza

Corayzon

cSlave supports pTokaX style scripts so hubs with many hubscripts can simply just copy them into the addons\scripts directory and they will run just like before.

So most of ur game scripts can be left execatly as they are.

But when it comes to sercurity, cSlave just cant be beaten. It protects hubs from a wide range of attacks, and the only attacks left open are the exploits in ptokax that cant be handled by scripts.

here is the hub sercurity settings file...

iHackKickTime = 60
sHackKickReason = "Bad client Detected! Please download the lastest DC++ from [URL]http://dcplusplus.sourceforge.net[/URL] to avoid future bans!"

iRevConnectToMeHackKickTime = 60
sRevConnectToMeHackKickReason = "Hacking $RevConnectToMe strings! (if you dont understand this then get a new client!)"

iChatHackKickTime = 60
sChatHackKickReason = "Hacking the main chat! (if you dont understand this then get a new client!)"

iToHackKickTime = 60
sToHackKickReason = "Hacking $To: strings! (if you dont understand this then get a new client!)"

iSearchReturnHackKickTime = 60
sSearchReturnHackKickReason = "Hacking $SR strings! (if you dont understand this then get a new client!)"

iSearchHackKickTime = 60
sSearchHackKickReason = "Hacking $Search strings! (if you dont understand this then get a new client!)"

sIpGuardMessage = "*** Your ip is configured incorrectly! Set IP in 'file->settings->general->connection settings' to #ip"

iChatFloodTime = 3 * Second
iChatFloodCount = 10
iChatFloodKickTime = 60
sChatFloodKickReason = "Dont flood the main chat!"

iPmFloodTime = 1 * Second
iPmFloodCount = 3
iPmFloodKickTime = 60
sPmFloodKickReason = "Dont spam in private messages!"

the sercure system also has fixs for socks users, so they dont get disconnected say there ip is incorrect. aswell as the hub checks that they arnt faking socks to attack other hubs by sending and waiting for search return strings.

noza

chill

#8
now I think your way of handling things is a good way, but, there is one faster way, if you cut the protocoll to the lenght of 4 or 3 chars, I use 5, got this idea from plop,  but then you can also already see whitch input is whitch, well this is only a bit faster, but the more users this can become reasonable.

but I actually wanted to know about this part
Quote1:-     Instead of passing protocol or command strings ($Search\ +command) around from one script   to another, it simply links input strings to the relevent functions quickly and effeicently. For instance,   say you have 20 hub scripts running in pTokaX, and lets say 10 of them have the full hub data enabled.   When pTokaX receives say $ConnectToMe, pTokaX then passes this through the 10 scripts until a   DataArrival function actually returns true (anything thats not nil). This takes up process time and can   slow down a large hub with over 800 users.     Now, cSlave is a single script that allows full hub data and full search data. So to pTokaX the script   processing is minimal on the system. Once cSlave handles a input, it then checks tables for functions   that get executed in one quick loop. So then, when inputs are received, it will then stop pTokaX   passing and rehandling the data in lua scripts that are just going to return nothing anyway.     So in basic terms, this means that u can have the same amount of data being handled at a quicker   rate. Therefor:- your hub will run more effeicently on your system resources.

I don't know if I got it right, but does that now mean you execute other scripts functions or, you think your script is soo good that, other scripts functions get denied, now what if everyone scripts like that, then it only depends on ptokax whitch script get executed first and all others won't get any data anymore, even yours.

But else I like the input, in these 3 simple ways, you
have for the functions, and it makes it easy to add new functions, I also do that but in a cut way.


ahm just read this now
QuotecSlave supports pTokaX style scripts so hubs with many hubscripts can simply just copy them into the addons\scripts directory and they will run just like before.     So most of ur game scripts can be left execatly as they are.     But when it comes to sercurity, cSlave just cant be beaten. It protects hubs from a wide range of attacks, and the only attacks left open are the exploits in ptokax that cant be handled by scripts.     here is the hub sercurity settings file...

so I guess my questions were already answered, okey,
other thing is, when you execute the other scripts,
then you won't make em run faster if the coding is made slow.
And I also think is dangerous to think one has the best scripts, sorry but Bill Gates thinks he has the best
OS, lol. Never heard people talking like that about Linux,
although it runs 24/7. Because these poeple know that
there can be done better, and that way it will get better.
Just my opinion.

But you have to expalin to me how you did to execute the DataArrival of a other script through your script, don't
see a way to do that.

Corayzon

nice post chill!

the first thing is that protocol handling, ... very nice thoughts and indeed that could help aslong as
you dont match entire patterns because u would still be processing the entire string. but yea =]

the second ur right with the ptokax style scripts within cslave. they will process slower, and even moreso
because cslave pass's the data through all the scripts and doesnt stop execution on a return.

next, not once RECENTLY have a said cSlave is the best script... all i say is powerfull, effeicent and
effective which it is, dont mistake that.

and finally here is the script that executes cSlave Addon Scripts 'CAS'.

function ExecuteAddonScripts()
	execute("dir \"cSlave Addons\\Scripts\\*.lua\" /b > \"cSlave System\\Data\\Directory Dumps\\Addons\\Scripts.dir\"")
	local hFile = openfile("cSlave System/Data/Directory Dumps/Addons/Scripts.dir", "r")
	local sLine = read(hFile)
	while sLine ~= nil do
		if strsub(sLine, strlen(sLine) - 3, strlen(sLine)) == ".lua" then
			ClearCslavePtokaxFunctions()
			assert(dofile("cSlave Addons/Scripts/" .. sLine), "Error traceback :- " .. sLine .. "!")
			if type(Main) == "function" then
				tPtokaxEvents["Main"][sLine] = Main
			end
			if type(DataArrival) == "function" then
				tPtokaxEvents["DataArrival"][sLine] = DataArrival
			end
			if type(NewUserConnected) == "function" then
				tPtokaxEvents["NewUserConnected"][sLine] = NewUserConnected
			end
			if type(OpConnected) == "function" then
				tPtokaxEvents["OpConnected"][sLine] = OpConnected
			end
			if type(UserDisconnected) == "function" then
				tPtokaxEvents["UserDisconnected"][sLine] = UserDisconnected
			end
			if type(OpDisconnected) == "function" then
				tPtokaxEvents["OpDisconnected"][sLine] = OpDisconnected
			end
		end
		sLine = read(hFile)
	end
	closefile(hFile)
	RestoreCslavePtokaxFunctions()
end

noza

chill

#10
yeah okey, I believe you about the best script sorry,
I just mean t your post about when you said
you had the best security functions, and we can't really compare them right now.

but to the thing again I ddidn't/don't understand.

so I see you add the lua files into table, so you know
whicth files you need to execute on different events.
And to make sure your functions, are avaible again after
the scripts got loaded you do a

RestoreCslavePtokaxFunctions()

And the you run through the table on each function.
Correct>?

I like that cause even I can understand it and it works :)
Not that I would use it, but at least I see a way of doing what you explained. thx.

Corayzon

correct chill,

it makes references to the main cslave functions and then when loading the ptokax style scripts, it then make new references in a table that pointS to that function, and after the scripts are loaded it does restore the backup references to cslave's ptokax script ;)

but using this method isnt a good idea. It dramaticly slows down the system when u have more then 5 scripts running like so. Its best to convert your scripts to cslave script, to allow fast and function commands.

the main things to think about is to stop ptokax style scripts from all processing a nil return when a function directly related to the command\protocol can be executed without pass's the data to all the scripts. but i think u got that :P

now to move to the sercurity, ages ago when i was here, if u remember i was trying to get all major scripts to add protection on things like ip faking and search faking. basicly, if your hub aint protected and it has over 500 users, i can use it to crash any online server including ur own hub! the only place i havnt taken down is microsoft.com

some info on these attacks...

yahoo.com - 25 secs with 1200 users
msn.com - 40 secs with 800 users
a ptokax hub on a crap connection - 10 secs with 500 users!

if your smart u can easyerly use hubs to attack targets u dont like, even from dc++ u can with user commands!

noza

Corayzon

This is a function from cSlave's secure system script. Here it gets the ip sent in a $connecttome string and then compaires it to the one they are logged in under. Now ull notice it returns on socks users because most of the time there connection ip is truly different to thier logged ip. Now u could think that u can exploit the system when ur a socks users, but cSlave actually forces u to send a searchreturn to then ensure that ur client is a real socks user.

function doConnectToMe(tUser, sData)
	local _,_, sToGet, sIP, sPort = strfind(sData, "^$ConnectToMe (%S+) (%S+):(%d+)|")
	if sIP ~= tUser.sIP and not isSafe(tUser.sName) then
		if tSocksNicks[tUser.sName] then
			return
		end
		tUser:SendPM(sBotName, TranslateString(sIpGuardMessage, {["#ip"] = tUser.sIP}))
		tUser:Disconnect()
		return 1
	end
end

noza

chill

#13
Quoteif your hub aint protected and it has over 500 users, i can use it to crash any online server including ur own hub! the only place i havnt taken down is microsoft.com     some info on these attacks...

I suppose you used the Active ConnectToMe
and Search, to do it. If its that then I am sure you weren't the only one who had the idea, but maybe the only who did, it. Well on the other hand, good proof to
see it actually works.

To you code above:
Yepp that is a good way of doing what you did,
now again to fast processing

LUA can also macth patterns form the back of the string

strfind(sData, "(%S+):(%d+)|$")

would process faster, and if you leave the port, free it won't need to create an extar variable for it. But I guess you know that ;), and mabye you had other reasons for that.

Other question, does ptokax check for a correct $ConnectToMe, cause what is if sIP returns nil. But I dunno.

No doubt you have good functions in your script.
But still hubs with 5.000 users+ won't run any scripts anymore, or at least I haven't seen any, and don't run on windows, so I ask myself,
if its really worth it to make one script ticks better than the other, I also try to convince all to use binary search,
for IP-Bots but don't see em'. And the Hubowners are
fine with that anyways.

Corayzon

#14
um...

there are a few hub killers out that ive seen, not including my testing apps. The basic symptems
of these attacks will...

1st - fill up the server ports that are passed from the listening connection. (stops new connections from being accepted)

2nd - slowly starts disconnecting users from the hub (caused by timeouts because of the amount of lag)

3rd - overprocess's the server and causes a system crash (basicly from heat, and only large attacks from multiple sources with atleast a constant attack count of 50, 000 users can really do this)

to the script:

the secure system has only been built once and hasnt been optimised as of yet, and the reverse pattern matching will save some time, thankz for that one =]

Quoteif its really worth it to make one script ticks better than the other, I also try to convince all to use binary search,
for IP-Bots but don't see em'. And the Hubowners are
fine with that anyways.

i kinda lost ya there ?

noza

Corayzon

#15
hey all,

after a good half years work and around 7 rewrites, cSlave is allmost finally complete. But it needs some proper testing on large hubs and the addon studio requiers some intensive scripting for testing also.

Basicly atm, the main system needs some good fuking around with the setting via the gui, to test that all the lean and mean features are working correctly aswell and the saving and loadign in the gui doesnt have any coruption bugs. Aswell as the secure system needs some proper testing with real socks users.

neways...cSlave 1.0 Lean & Mean will be released soon for large hub owners. And then followed by cSlave 1.0 Fat and Full for all the small hubs that like their features.

So, if you would like to help do some testing on the system, give me a yell here in a pm, or get onto my hub at 'om-tribe.no-ip.org'

*feels excited!!!*

noza

Corayzon

Here is a stable build from not to long ago. Should give everyone a good idea of how it works =]

http://www.snooze.no-ip.com/sk/viewtopic.php?t=501

After i finish developing my current software ill be back on track to get it complete asap before any more work comes my way!

Optimus

Good work Corayzon, the inside looks verry nice. Much improvement.

Keep it up, as moderator i needed to say that


Corayzon

#19
yo all,

i been busy as shit again with organic mechanics here, and havnt had time to do much but...

a few days ago i hired myself a new technition, and as it ends out, he is a hardcore electronics geek.

To the point, he has a awsome knowledge of c++ and we decided together to write a new simple hubosft like ptokax with lua support.

This means... cSlaves development for ptokax will slow down even more, whilst cSlave is turned into its own hubsoft.

The future looks bright!

matt

blackwings

#20
looks good, but the gui configuration is a bit wierd :P Guess I'm used to RoboCops simple GUI :P


BeeR

QuoteOriginally posted by blackwings
looks good, but the gui configuration is a bit wierd :P Guess I'm used to RoboCops simple GUI :P

I agree ,, GUI must be more userfriendly for hubrunners to configure
A cold BeeR is stunning !!

Corayzon

yo all,

i havnt been around for along time cause im getting my crew off its feet here in australia, but...

over the last few months snoozes forums have been shutdown cause he cant afford the bandwidth being in a microsoft campus...

but cSlave is still getting work done on it. The ptokax side script is now moving very slow due to the full dev of cSlave as a standalone hubsoft. But the GUI has had some major updates for ease of use.

i have mad a awsome profile editor and the dev studio now has alot of bug fixs done. The settings editor now contains a proper function setting with a arg list on a table! so u dont have to put in ur own commers between arguments...

all in all, its alot better for ease of use, but their is no download!

if ur interested in cSlave as a ptokax addon or as its own hubsoft u can come and ask ur questions directly to me at my hub if im around, otherwise we dont have webspace and theirfor, u wont find out much :P

ohh, and my hub is now running the complete system of cSlave if u wanna come and see, and remember that my hub is made up of bindless cSlave addons which make it the way it is.

now i shutup and get to work so i can get back to working on dev =]

i give a hugh thankz to all the support i have got over the months of building cSlave with ptokax from multiple ppl including, wombat, plop, blackwings and not Optimus cause he crys so much.

matt

Optimus

hehe, I woundn't care more or less i hope you die soon. LOOLL (are you having nightmares of me, it seems you still can't forget me.) D:

Corayzon

crying again i see like i mentioned in my post!!!!

u wanna know the dif between u and me...

i have brains and u dont..and thats y u leave stupid posts like last one of urs...

grow some respek and and learn to close ur mouth!

btw... u lose because u hide your source cause ur ass is tight like a monkeys ancle...

see ya dik and...

*** can a mod delete these 2 lasts posts, cheers ***

SMF spam blocked by CleanTalk