Nmap Development mailing list archives
Locking a mutex by name?
From: Ron <ron () skullsecurity net>
Date: Thu, 13 Nov 2008 21:17:28 -0600
Hey, I've been trying to use mutexes to stop SMB from breaking itself, but, after some further research, I don't think I'm doing it right. I suspect I know how to fix it, but I want to make sure I'm fixing it the right way. The issue is that a single Windows server can't handle multiple SMB connections from the same person at the same time. If a second person connects from the same IP, the first gets kicked off. The most logical way to fix that is to use a mutex. What I initially tried to do was lock a mutex based on the name of the server, basically: local mutex = nmap.mutex("SMB" .. server_name) Unfortunately, I don't think that works the way I expected it to, since the nmap.mutex() function expects an object, and multiplexes on that object. I don't think two instances of that string, especially in different scripts being run, will result in the same object, so it falls apart. So, is there a right way to do this? My thought is to store the mutexable objects in the nmap registry, in a table based on the name. That would give the different scritps access to the same actual object. Is that the best way of handling this situation, or is there a better way I can do it? Thanks! Ron -- Ron Bowes http://www.skullsecurity.org/ _______________________________________________ Sent through the nmap-dev mailing list http://cgi.insecure.org/mailman/listinfo/nmap-dev Archived at http://SecLists.Org
Current thread:
- Locking a mutex by name? Ron (Nov 13)
- Re: Locking a mutex by name? Patrick Donnelly (Nov 13)
- Re: Locking a mutex by name? Ron (Nov 14)
- Re: Locking a mutex by name? Patrick Donnelly (Nov 14)
- Re: Locking a mutex by name? Ron (Nov 14)
- Re: Locking a mutex by name? Patrick Donnelly (Nov 14)
- Re: Locking a mutex by name? Ron (Nov 14)
- Re: Locking a mutex by name? Patrick Donnelly (Nov 14)
- Re: Locking a mutex by name? Ron (Nov 14)
- Re: Locking a mutex by name? Kris Katterjohn (Nov 14)
- Re: Locking a mutex by name? Patrick Donnelly (Nov 14)
- Re: Locking a mutex by name? Ron (Nov 14)
- Re: Locking a mutex by name? Patrick Donnelly (Nov 13)