Greenseed Posted December 2, 2005 Share Posted December 2, 2005 (edited) Ok guys! sorry! i remove this project from here! np this is just for fun! and im not sure if i understand! but i was not stealing nothing from anyone! the only think i have keeped it the Getip() function! and i told in the script the real author! anyway! sorry for the inconvinient! i will no more send code of my chat script or talk about it. and when you say i was stealing =sinister= look at me script! the structure is very very differente! except the getip() nothing was keeped from the other! Do you think, be inspirated from someone is copy that persone? for my part i think not! i think everyon here are inspirated from somebody! anyway im very Sorry Autoit Smith! hope you excuse me! Just to let everyone know! Autoit Smith send me a msg with excuse for this! and i accept is excuse with pleasure! then please ... i don't know in english. soyer pas rencunier envers lui pour sa everyone make mistake! i will resubmit the code i originaly sumited with this post because some people asked me! the code is in alpha version! and i work no more on this methode for a server chat because some probleme to authenticate client! my methode is very sensible to a little ddos attack then i change it! i have a brand new idea! witch will work with 2 process! and protect my self for ddos attack! i will post my new code for server when im a little more advance! and for the client im not planning to created one for the moment! if i can do what i wan for the server! it will be easy to created personal chat client! and adopte my syntaxe for communicating! i think a update to autoit will be made on the network function to reencapsulated the packet will all info needed to bypass the probleme of mapping port at client side! im not sure but i think i read this somehere and if im right! i will have to completely rewrite my server. then for the moment im writing the engine for analysing data recv and preparing data to send. i don't make a chat server to make competition again ITS chat! ITS chat Is a very great application in autoit! i love it! i just made it because i wan my method, hehe you know codding is funny for me! i love it! and a chat server is a great defie for me! i don't think i'm better than anyone! im just another guys with a keyboard having fun! expandcollapse popupOpt("CaretCoordMode", 1) ;1=absolute, 0=relative Opt("ColorMode", 0) ;0 = Colors are defined as RGB 1 = Colors are defined as BGR (0xBBGGRR) Opt("ExpandEnvStrings", 0) ;0=don't expand, 1=do expand Opt("ExpandVarStrings", 0) ;Changes how literal strings and variable/macro ($ and @) symbols are interpreted 0=Default Opt("FtpBinaryMode" , 1) ;Binary=1 AscII=0 Opt("GUICloseOnESC", 0) ; 0=Default Opt("GUICoordMode",1) ; 0=relative to CTRL 1=absolute To Box(default) 2= Cell Positioning Opt("GUIDataSeparatorChar","|"); default "|" Opt("GUIOnEventMode",0) ;Default =0 Opt("GUIResizeMode",0) ;Default=0 See Resize mode Opt("GUIEventCompatibilityMode",0); default=0 1= Absolute 2=Client Area Opt("MouseClickDelay", 10) ;10 milliseconds Opt("MouseClickDownDelay", 10) ;10 milliseconds Opt("MouseClickDragDelay", 250);250 milliseconds Opt("MouseCoordMode",0) ;Default=0 Opt("MustDeclareVars", 0) ;0=no, 1=require pre-declare Opt("OnExitFunc","OnAutoItExit");Default=OnAutoItExit Opt("PixelCoordMode", 1) ;1=absolute, 0=relative Opt("RunErrorsFatal", 0) ;1=fatal, 0=silent set @error Opt("SendAttachMode", 0) ;0=don't attach, 1=do attach Opt("SendCapslockMode", 1) ;1=store and restore, 0=don't Opt("SendKeyDelay", 8) ;5 milliseconds Opt("SendKeyDownDelay", 1) ;1 millisecond Opt("TCPTimeout",100) ;Default=100 Opt("TrayAutoPause",0) ;Default=1 Opt("TrayIconDebug", 0) ;0=no info, 1=debug line info Opt("TrayIconHide", 1) ;0=show, 1=hide tray icon Opt("TrayMenuMode",0) ;2=User 1=Disable Opt("TrayOnEventMode",0) ;Default=0 Opt("WinDetectHiddenText", 0) ;0=don't detect, 1=do detect Opt("WinSearchChildren", 1) ;0=no, 1=search children also Opt("WinTextMatchMode",1) ;Default=1 2=modeFast Opt("WintitleMatchMode", 1) ;1=start, 2=subStr, 3=exact, 4=... Opt("WinWaitDelay", 250) ;250 milliseconds #include <array.au3> #Include <Date.au3> #include <string.au3> AdlibEnable("ConnectNewClients",500) TCPStartup() Global Const $Port = 8000; Port Global Const $MaxConnections = 100; MaxUsers Global $Position = 0 Global Const $AutoItMTU=262144 Global $ChannelsFile = @ScriptDir&"\Channels.ini" Global $PasswordsFile = @ScriptDir&"\Passwords.ini" $UsersPasswordSave = IniReadSection ($PasswordsFile, "Passwords") Global $Channels = IniReadSectionNames($ChannelsFile) $RecvBuffer = _ArrayCreate("0") $SendBuffer = _ArrayCreate("0") ;~ UsersInfo Array[>1] - Server Info Array[0] $Usersname = _ArrayCreate("GreenChatServer Version 1.0 Beta") $Passwords = _ArrayCreate("DummyPassWord") $IpAdress = _ArrayCreate(@IpAddress1) $ConnectedSocket = _ArrayCreate(TCPListen($IpAdress, $Port, $MaxConnections)) $ConnectionTime = _ArrayCreate(_NowCalc()) $Rights = _ArrayCreate(100) ;~ --------------------------------------------------------------------- ;~ main function run continious ;~ for = $xxxx ;~ ----------------------------------------------------------------- While $Position >= 1 Local $xxxx Local $TCPRecvReturn For $xxxx = 1 to $Position $TCPRecvReturn=TCPRecv($ConnectedSocket[$xxxx],$AutoItMTU) If $TCPRecvReturn <> "" Then _arrayAdd($RecvBuffer,$TCPRecvReturn) Next if Ubound($RecvBuffer) > 1 Then AnalyseRecvBuffer() EndIf WEnd ;~ ------------------------------------------------------------------------------ ;~ Analyse recv data check for command and MsgBox ;~ for = $xxx ;~ call sendMSG() if OK ;~ ---------------------------------------------------------------------------- Func AnalyseRecvBuffer() Local $xxx Local $StringToAnalyse Local $MsgToSend Local $MsgFrom Local $MsgTo Local $Commands for $xxx = 1 to (Ubound($RecvBuffer) - 1) If StringInStr($RecvBuffer[$xxx],"msg") Then $StringToAnalyse = StringSplit($RecvBuffer[$xxx],"|") $Commands = StringSplit($StringToAnalyse[1],";") SendMSGToSendBuffer($Commands[2],$Commands[3],$StringToAnalyse[2]) _ArrayDelete($RecvBuffer,$xxx) ElseIf StringInStr($RecvBuffer[$xxx],"ping") Then $Commands = StringSplit($RecvBuffer[$xxx],";") SendCommandToSendBuffer($commands[1],$Commands[2]) _ArrayDelete($RecvBuffer,$xxx) ElseIf StringInStr($RecvBuffer[$xxx],"join") Then $Commands = StringSplit($RecvBuffer[$xxx],";") SendCommandToSendBuffer($commands[1],$Commands[2],$Commands[3]) _ArrayDelete($RecvBuffer,$xxx) Else _ArrayDelete($RecvBuffer,$xxx) EndIf Next EndFunc Func SendMSGToSendBuffer($user,$channel,$msgtosend) Local $To Select Case StringLeft($channel,1)=="c" $To = ;~ ---------------------------------------------------------------- ;~ Check if a a new socket open if yes call getlogininfo($Socket) ;~ For = $xx ;~ --------------------------------------------------------------- Func ConnectNewClients() Local $xx Local $TCPAcceptReturn $TCPAcceptReturn = TCPAccept($ConnectedSocket[0]) if $TCPAcceptReturn <> -1 Then If GetLoginInfo($TCPAcceptReturn) = 1 Then $Position = $Position + 1 EndIf for $xx = 1 to Ubound($ConnectedSocket) if not TCPSend($ConnectedSocket[$xx],"ping") Then _ArrayDelete($UsersName,$xx) _ArrayDelete($Passwords,$xx) _ArrayDelete($IpAdress,$xx) _ArrayDelete($ConnectedSocket,$xx) _ArrayDelete($ConnectionTime,$xx) _ArrayDelete($Rights,$xx) for $y = 1 to $channels[0] step 1 IniDelete($ChannelsFile,$Channels[$y],$ConnectedSocket[$xx]) Next $Position = $Position - 1 EndIf Next EndFunc ;~ ---------------------------------------------------------------------------------------------------------- ;~ Function: GetLoginInfo ;~ Check A socket 200x In A 1 Seconde to receive the login info ;~ the login info is send in HEX separated by "|" ex: HEX(Username)|HEX(password) ;~ Is the username and password are registered correctely set the right privilege for the user ;~ if the user send info are ok then it add info into specific array and return 1 ;~ if the login is not ok then return -1 or $Error level! ;~ for = $x et $y ;~ ---------------------------------------------------------------------------------------------------------- Func GetLoginInfo($Socket) Local $TCPRecvString Local $GetIpReturn Local $x Local $y TCPSend($Socket,"LoginInfo: ") For $x = 1 to 150 step 1 Local $Retry Local $TCPRecvString $TCPRecvString=TCPRecv($Socket,4000) if $TCPRecvString <> "" then $LoginInfo = StringSplit($TCPRecvString,"|") If IsArray($LoginInfo) And UBound($LoginInfo) = 2 Then $LoginInfo[0] = _HexToString($LoginInfo[0]) $LoginInfo[1] = _HexToString($LoginInfo[1]) For $y = 1 to $UsersPasswordSave[0][0] If $UsersPasswordSave[$y][0] = $LoginInfo[0] And StringTrimLeft($UsersPasswordSave[$y][1],3) = $LoginInfo[1] Then _ArrayAdd($Rights,StringLeft($UsersPasswordSave[$y][1],3)) ElseIf $UsersPasswordSave[$y][0] = $LoginInfo[0] And StringTrimLeft($UsersPasswordSave[$y][1],3) <> $LoginInfo[1] Then TCPSend($Socket,"Please Use Differente UserName This One Is Registered") TCPCloseSocket($Socket) Return -1 EndIf Next _ArrayAdd($Usersname,$LoginInfo[0]) _ArrayAdd($Passwords,$LoginInfo[1]) $GetIPReturn = GetIp($Socket) If $GetIPReturn = 0 Then _ArrayAdd($IpAdress,"Unavailable") Else _ArrayAdd($IpAdress,$GetIPReturn) EndIf _ArrayAdd($ConnectedSocket, $Socket) _ArrayAdd($ConnectionTime,_NowCalc()) IniWrite($ChannelsFile,"Status",$Socket,"") return 1 Else TCPCloseSocket($Socket) EndIf EndIf Sleep(3) Next Return -1 EndFunc;==> 1 if ok -1 if not ;~ ------------------------------------------------------------------- ;~ Function GetIP($Socket) ;~ Retrive IP Adress Of Connected Socket - Return 0 If Unavailable ;~ Autor Max Gardner(AutoIt Smith;king.of.all@comcast.net) ;~ ------------------------------------------------------------------- Func GetIP($Socket) Local $SocketAddress $SocketAddress = DllStructCreate("short;ushort;uint;char[8]") $IP = DllCall("Ws2_32.dll", "int", "getpeername", "int", $Socket, "ptr", DllStructGetPtr($SocketAddress), "int_ptr", DllStructGetSize($SocketAddress)) If Not @error And $IP[0] = 0 Then $IP = DllCall("Ws2_32.dll", "str", "inet_ntoa", "int", DllStructGetData($SocketAddress, 3)) If Not @error Then $IP = $IP[0] Else $IP = 0 EndIf DllStructDelete($SocketAddress) Return $IP EndFunc ;==>SocketToIp The syntaxe in msg! msg are send and recv in this format TCPSEND($socket,"command,from,to,optional1,optional2,optional...|_StringToHEX($message)) the command can be: FILE ; to send file to user MSG ; to send msg to channel or user CONNECT; can be for connect to channel, server or direct to another User like DCC in mIRC and dicconnect SOUND ; to send sound to channel or user OPENVPN ; Implepenting a vpn connection between 2 or more user openvon is free and very great he can broadcast over multiple physique connection in bridge mode! very great to play game or simply secure conenction 1024bit encryption. and maybe more command! the syntax for command remain the same in my other server but the methode to connect and send msg to client is very differente of this one! anyway! i resend this code because maybe someone reading it will be inspirated with a great idea! it will be my pleasure! then bye bye everyone! Edited December 6, 2005 by Greenseed GreenseedMCSE+I, CCNA, A+Canada, QuebecMake Love Around You. Link to comment Share on other sites More sharing options...
=sinister= Posted December 2, 2005 Share Posted December 2, 2005 are you saying this is an update to the ITS Chat Servers? Link to comment Share on other sites More sharing options...
Greenseed Posted December 2, 2005 Author Share Posted December 2, 2005 no im saying it a new one! but my inspiration come from ITS chat. and im searching for freind developing it! it a alpha version just to let you know my vision of this(structure). GreenseedMCSE+I, CCNA, A+Canada, QuebecMake Love Around You. Link to comment Share on other sites More sharing options...
themax90 Posted December 3, 2005 Share Posted December 3, 2005 Ummmm Greenseed, I would extremely appreciate it if you didn't start ANOTHER chat project. If you are that inspired form ideas and workarounds and acomplish goals and we can add you to the development team. I just don't think it would be that great to have 2 different chat projects in autoit. You are free to do as your will but it will not be thought of with any hospitality by me or the other devs of ITS. Link to comment Share on other sites More sharing options...
=sinister= Posted December 3, 2005 Share Posted December 3, 2005 yes, it is AutoIt Smith's chat so I think that would be stealing... you should really think these things over. Link to comment Share on other sites More sharing options...
themax90 Posted December 3, 2005 Share Posted December 3, 2005 It's AutoIt ITS chat which is completely created except for the Advanced Client by me. I see how he re arranged the code, but you should either join my project, or do not try at all. It will not wade well. This project has been going on for about a month or so. You have your chance to join. We just ask do not try making your own chat. We will beat you, 6 developers against 1 with a chat project almost at a v1 official release status. Not a good idea to start another. You can, and I will support you and help you if needed, but let this one be a educational based script, not ment for mainstream. Link to comment Share on other sites More sharing options...
LxP Posted December 3, 2005 Share Posted December 3, 2005 (edited) Are we running under some form of fascist dictatorship here? (Edit: This all hangs on the assumption that Greenseed's code is in fact original, which he has stated. If it was in fact a rip of AutoIt Smith's work then you can disregard this message.)If Greenseed wants to post his own chat script then he is bloody well entitled to that right. There is nothing wrong with two similar projects running at the same time and there is no suggestion at all that he is attempting to threaten the AutoIt ITS project. Hey, you may even learn something useful from his code should you choose to look over it.Greenseed, whether or not you choose to continue with your work I would appreciate that you restore your first post with the original code. I don't know the first thing about chatting via AutoIt but I sure wouldn't mind the privilege of learning via two different approaches. Edited December 3, 2005 by LxP Link to comment Share on other sites More sharing options...
Greenseed Posted December 3, 2005 Author Share Posted December 3, 2005 @LxP i'm not sure about it, i will think about! When i come here(on this forum) it to make freind not war! And i think there is a little too much polymic on this subject for the moment! GreenseedMCSE+I, CCNA, A+Canada, QuebecMake Love Around You. Link to comment Share on other sites More sharing options...
LxP Posted December 3, 2005 Share Posted December 3, 2005 Greenseed, I'm not here to make war either but I'm definitely not going to tolerate people taking away your right to share your work simply because it's based on the idea of another piece of code. Can you imagine a world where there's only one operating system? One internet browser?** This still hangs on the assumption that your code was original and not a copy of AutoIt Smith's work. I'll believe this until I see otherwise. Link to comment Share on other sites More sharing options...
Valuater Posted December 3, 2005 Share Posted December 3, 2005 (edited) Greenseed... My name is Robert M.. aka Valuater.. one of the Dev's on the ITS ProjectAs Autoit Smith should remember i put a lot of effort into building a web-site. JS was able to create a web site that the team voted for... JS's web site over mine....so lets be clear, i stood down and allowed what was best in the eyes of the other dev's. AND i only want the best for Autoit-ITS. The Whole Idea of the ITS project is to put to use... THE BEST AUTOIT HAS TO OFFER.So, I completely agree with LxP... there is no dictatorship here!Please fell free to continue on your endeavor, It would be great if you and Autoit Smith could work together.... but if not, then that should not stop you from making anthing you wish with Autoit..You obviously were inspired by Autoit Smiths original Chat Client, and any script posted on this web site is free to use as you wish ( alongs as it is not malicious ) and nothing is stated to the contrary.Please build your TCP, we want THE BEST OF THE BEST, Autoit smith could possibly learn a few things from your code also..@Autoit Smith, Greenseed is looking to build this client WITH someone else, dont you want the best for ITS, as i did, not stoping others whom could possibly build something better, as i did - i stepped asside - to allow progress.... find a way to work with him??? what do you think??8)either way , please replace your script above and continue greenseed Edited December 3, 2005 by Valuater Link to comment Share on other sites More sharing options...
themax90 Posted December 3, 2005 Share Posted December 3, 2005 It's cool, he can, but I am saying it would not be that wise to make it a chat that will be advertised and marketed. He's open to do whatever he chooses but I am saying that it would be not only trouble for him, but for us if he tried to advertise it. I think having two would be a great educational and learning tool, but two in a running just isn't worth the hassle. My posts were ment to warn him of the hassles we may have to go through if he wants to market it. I think its great that he is working on his own chat, but I just want to make sure we both arent troubled in the processes. I meant nothing to the reguard of threating. Please repost your code, it does look a bit like mine but its a different point of view that could enlighten my current server. I do however advise you to join our project. I hope no offense was really taken, I should have been a bit more direct with my posts Link to comment Share on other sites More sharing options...
JSThePatriot Posted December 3, 2005 Share Posted December 3, 2005 Even though everyone and their brother has already given their two cents on this situation. I decided to give my 2 cents worth because I am one of the afore mentioned developers of the ITS project. Greenseed so long as you didnt directly copy the code I think you would make a good addition to the ITS team. It is like Valuater said, we are here to make the best to help support AutoIt. Our project has more directions to go. I am working on multiple things for the project. There are many more things available to work on. I think a second server developed completely from scratch like the two clients would be a good idea. I would encourage you to join our project and do just that. We all need encouragement to improve. I think a second server "from scratch" would be a great addition to the project. I am sure your intentions werent meant to cause any rukus or harm. Please continue your development whether you join us or not. IMHO, JS AutoIt Links File-String Hash Plugin Updated! 04-02-2008Â Plugins have been discontinued. I just found out. ComputerGetInfo UDF's Updated! 11-23-2006 External Links Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more) Link to comment Share on other sites More sharing options...
themax90 Posted December 3, 2005 Share Posted December 3, 2005 I have not intentions of threating or saying to him not to. Please read my previous post!! Link to comment Share on other sites More sharing options...
JSThePatriot Posted December 3, 2005 Share Posted December 3, 2005 I have not intentions of threating or saying to him not to. Please read my previous post!!I read all the posts. I know you meant no harm. I didnt think my post directed anything at you negatively?Sorry hehe.JS AutoIt Links File-String Hash Plugin Updated! 04-02-2008Â Plugins have been discontinued. I just found out. ComputerGetInfo UDF's Updated! 11-23-2006 External Links Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more) Link to comment Share on other sites More sharing options...
themax90 Posted December 3, 2005 Share Posted December 3, 2005 That was directed at Valuaters big long speach he made AFTER editing his post AFTER I posted what I said. Link to comment Share on other sites More sharing options...
JSThePatriot Posted December 3, 2005 Share Posted December 3, 2005 That was directed at Valuaters big long speach he made AFTER editing his post AFTER I posted what I said.LOL I see. Well dont sweat it. I am sure he meant no harm. Glad it wasnt directed at me though. JS AutoIt Links File-String Hash Plugin Updated! 04-02-2008Â Plugins have been discontinued. I just found out. ComputerGetInfo UDF's Updated! 11-23-2006 External Links Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more) Link to comment Share on other sites More sharing options...
Valuater Posted December 4, 2005 Share Posted December 4, 2005 That was directed at Valuaters big long speach he made AFTER editing his post AFTER I posted what I said.i dont understandi posted at 6:15i edited at 6:17 ( spelling for sure)your "next post" was at 6:19 ????8) Link to comment Share on other sites More sharing options...
Greenseed Posted December 6, 2005 Author Share Posted December 6, 2005 look at the first post for the code! GreenseedMCSE+I, CCNA, A+Canada, QuebecMake Love Around You. Link to comment Share on other sites More sharing options...
Valuater Posted December 6, 2005 Share Posted December 6, 2005 looks good greenseeed.... sure could use your talent on our team Autoit Smith is doing a great job... maybe you could look at being helpful on the ITS TCP stuff we have a long ways we want to go... and sharing ideas is how to get there the best and fastest way 8) Link to comment Share on other sites More sharing options...
Greenseed Posted December 6, 2005 Author Share Posted December 6, 2005 (edited) it will be a pleasure to exchange and try helping! let me know what you need! you can contact me by PM or e-mail. my email for that will be: itschat@aleajecta.com and i'm offent on ventrilo at: ventrilo.aleajecta.com : voice server just ask me for user/pass! it will be a pleasure! Finaly i got some session in CItrix terminal for working on same session it nice to see your partner working or simply for helping! Or simply join my OpenVPN network is very secure,then you can relax your firewall on the vpn subnet and let other freind connect to your computer RemoteDesktop or simply samba file sharing! without opening the access to the whole internet! you know like me im sure! you can't no more connect a windows platform on the internet without blocking all this function i mention here. port: 445,137,138,139... or you will be a assimililated by a botnet hehe i love the way i told it in english: assimilated .... hehe Please be patient with me my english is not so good! i trying to develop here! bye bye Edited December 6, 2005 by Greenseed GreenseedMCSE+I, CCNA, A+Canada, QuebecMake Love Around You. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now