Home Forum Download/Upload Links Search

NetTalk User Group

NetTalk User Group Meeting!
Live Webinar!
Saturday Nov. 16 
7am PST
Click Here To Register!
Home arrow Forum arrow NetTalk Web Serverarrow Web Server - Ask For Helparrow Security: Is it possible to drop a connection without sending a response?
NetTalk Central
October 19, 2017, 08:58:55 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Welcome to the NetTalk Central Forums!
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Security: Is it possible to drop a connection without sending a response?  (Read 139 times)
Flint G
Newbie
*
Posts: 48



View Profile Email
« on: June 15, 2017, 11:02:51 AM »

Easy question, that hopefully has a simple answer: in a NetWebServer procedure, is it possible to drop/close a connection without sending a response?

For instance, if the incoming session ID contains characters other than A-Za-z0-9, can I simply ignore the request because this is most certainly malicious?  If I receive enough of these kinds of requests, I would like to add the IP to a blacklist and never respond again.
Logged

NetTalk: 8.31
Clarion: 9.1.11529
Firefox: 44.0.1
Chrome: 48.0.2564.103 m
IE: 11.0.9600.18163
ExtJS: 5.1.0.107
Bruce
Global Moderator
Hero Member
*****
Posts: 8786



View Profile
« Reply #1 on: June 19, 2017, 11:58:10 PM »

Hi Flint,

>> is it possible to drop/close a connection without sending a response?

p_web.CloseConnection()

you may also want to call
p_web.RequestData.WebServer.AddLog(p_web)
it all depends on where you do this test whether it will be in the log already or not.

>>  I would like to add the IP to a blacklist and never respond again.

p_web.Ban(self.requestdata.fromip)

This will add the address to the banned list. This list is a maximum of 10 IP's long. The list is cleared at the next start of the program, so if you want to remember it then you will need to code the save/load.

Bear in mind that
a) Machines get dynamic IP addresses and
b) multiple machines, sometimes _lots_ of machines, can share the same IP address thanks to NAT.

Cheers
Bruce
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC
Joomla Bridge by JoomlaHacks.com
Valid XHTML 1.0! Valid CSS!

Login Form

Welcome Guest.






Lost Password?
No account yet? Register
home contact search contact search