Menu
Forums
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Trending
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
Upgrades
Log in
Register
What's new
Search
Search
Search titles only
By:
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
Server Development
Habbo Retros
Habbo Q&A
Server gets ddosed (Hostsavor & PlusEmulator)
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Calcium" data-source="post: 440775" data-attributes="member: 73425"><p>Here is the fix:</p><p>to dont want that bot ip adresses can logging into your emulator</p><p></p><p></p><p></p><p>Socket replyFromComputer = ((Socket)iAr.AsyncState).EndAccept(iAr);</p><p> replyFromComputer.NoDelay = disableNagleAlgorithm;</p><p></p><p> string Ip = replyFromComputer.RemoteEndPoint.ToString().Split(':')[0];</p><p></p><p> //write a code that if(ddostextfile.txt IP adress = Ip ) { return; } // Streamwriter and co.</p><p> </p><p></p><p> string valid;</p><p> using (IQueryAdapter dbClient = PlusEnvironment.GetDatabaseManager().GetQueryReactor())</p><p> {</p><p> dbClient.SetQuery("SELECT ip_last FROM `users` WHERE `ip_last` = @ip LIMIT 1");</p><p> dbClient.AddParameter("ip", Ip);</p><p> valid = dbClient.GetString();</p><p> }</p><p></p><p> if (valid == null || Ip == null)</p><p> {</p><p> Console.WriteLine("IP IS NULLED");</p><p> return;</p><p> }</p><p></p><p></p><p> if (valid != Ip)</p><p> {</p><p> Console.WriteLine("IP ADRESS: {0} doesn't exists in users.sql", Ip); // uncomment when you dont want to show it</p><p> // write a code that writes the ip adresse in the ddostextfile.txt</p><p> return;</p><p> }</p><p> else</p><p> {</p><p> int ConnectionCount = getAmountOfConnectionFromIp(Ip);</p><p> if (ConnectionCount < maxIpConnectionCount)</p><p> {</p><p></p><p></p><p> _acceptedConnections++;</p><p> ConnectionInformation c = new ConnectionInformation(_acceptedConnections, replyFromComputer, this, parser.Clone() as IDataParser, Ip);</p><p> reportUserLogin(Ip);</p><p> c.connectionChanged += c_connectionChanged;</p><p></p><p> if (connectionEvent != null)</p><p> {</p><p> connectionEvent(c);</p><p> connectionListener.BeginAccept(newConnectionRequest, connectionListener);</p><p> }</p><p></p><p> return;</p><p> }</p></blockquote><p></p>
[QUOTE="Calcium, post: 440775, member: 73425"] Here is the fix: to dont want that bot ip adresses can logging into your emulator Socket replyFromComputer = ((Socket)iAr.AsyncState).EndAccept(iAr); replyFromComputer.NoDelay = disableNagleAlgorithm; string Ip = replyFromComputer.RemoteEndPoint.ToString().Split(':')[0]; //write a code that if(ddostextfile.txt IP adress = Ip ) { return; } // Streamwriter and co. string valid; using (IQueryAdapter dbClient = PlusEnvironment.GetDatabaseManager().GetQueryReactor()) { dbClient.SetQuery("SELECT ip_last FROM `users` WHERE `ip_last` = @ip LIMIT 1"); dbClient.AddParameter("ip", Ip); valid = dbClient.GetString(); } if (valid == null || Ip == null) { Console.WriteLine("IP IS NULLED"); return; } if (valid != Ip) { Console.WriteLine("IP ADRESS: {0} doesn't exists in users.sql", Ip); // uncomment when you dont want to show it // write a code that writes the ip adresse in the ddostextfile.txt return; } else { int ConnectionCount = getAmountOfConnectionFromIp(Ip); if (ConnectionCount < maxIpConnectionCount) { _acceptedConnections++; ConnectionInformation c = new ConnectionInformation(_acceptedConnections, replyFromComputer, this, parser.Clone() as IDataParser, Ip); reportUserLogin(Ip); c.connectionChanged += c_connectionChanged; if (connectionEvent != null) { connectionEvent(c); connectionListener.BeginAccept(newConnectionRequest, connectionListener); } return; } [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Server Development
Habbo Retros
Habbo Q&A
Server gets ddosed (Hostsavor & PlusEmulator)
Top