Nnet Posted January 14, 2016 Posted January 14, 2016 Hello, i have DOS program with maximum 30 users online. Sometimes some people let program running and oter users cant connect.Its posible watch NTBBS communication? And when its not running for 30minutes, to disconect user (mb for 30sec disconect this pc from port 139(netbios))Im trying to use TCPListen but it dont work :/I dont get anything. Just trying to discover how it works.When i use Wireshark i cant see all comunikations. But Autoit dont see it.192.168.1.250 192.168.1.96 TCP netbios-ssn > 51532 [SYN, ACK] Seq=0 Ack=1 Win=8192 Len=0 MSS=1460 WS=256 SACK_PERM=1192.168.1.96 192.168.1.250 TCP 51532 > netbios-ssn [FIN, ACK] Seq=73 Ack=7 Win=65692 Len=0 Func Example() TCPStartup() ; Start the TCP service. Local $sIPAddress = "192.168.1.96" ; This IP Address only works for testing on your own computer. Local $iPort = 139 ; Port used for the connection. While 1 Local $aInfo = _Net_Share_SessionGetInfo($sIPAddress, @ComputerName, @UserName) Local $iListenSocket = TCPListen($sIPAddress, $iPort, 200) local $iSocket = TCPAccept($iListenSocket) sleep(100) ConsoleWrite($aInfo[1] & $iListenSocket & $iSocket) sleep(50) WEnd EndFunc
jguinch Posted January 14, 2016 Posted January 14, 2016 Where is your script launched from ? From the server ? In this case, you can use _Net_Share_SessionGetInfo with the $aInfo[4] : Number of seconds the session has been idle Spoiler Network configuration UDF, _DirGetSizeByExtension, _UninstallList Firefox ConfigurationArray multi-dimensions, Printer Management UDF
Nnet Posted January 14, 2016 Author Posted January 14, 2016 (edited) Thank, Im trying to use it but still nothing.Script running on server.This is how first contact look in wireshark:192.168.1.198 192.168.1.96 NBSS 126 Session request, to NAVI42-N300114<03><00> from <00><00><00><00><00><00><00><00><00><00><1c>oe<81><e4><60>So what to do in code?Local $aInfo = _Net_Share_SessionGetInfo( "NAVI42-N300114<03><00>", "<00><00><00><00><00><00><00><00><00><00><1c>oe<81>", @UserName )I got absolutly nothing Im used IP, computer names, sesion name... Edited January 14, 2016 by Nnet
spudw2k Posted January 14, 2016 Posted January 14, 2016 I've never used the network share functions before, but I think you usage is malformed. I think perhaps you can use the _Net_Share_SessionEnum() function to collect a list (array) of the active sessions, then you could supply the params for your desired session to the GetInfo func. Spoiler Things I've Made: Always On Top Tool ◊ AU History ◊ Deck of Cards ◊ HideIt ◊ ICU ◊ Icon Freezer ◊ Ipod Ejector ◊ Junos Configuration Explorer ◊ Link Downloader ◊ MD5 Folder Enumerator ◊ PassGen ◊ Ping Tool ◊ Quick NIC ◊ Read OCR ◊ RemoteIT ◊ SchTasksGui ◊ SpyCam ◊ System Scan Report Tool ◊ System UpTime ◊ Transparency Machine ◊ VMWare ESX Builder Misc Code Snippets: ADODB Example ◊ CheckHover ◊ Detect SafeMode ◊ DynEnumArray ◊ GetNetStatData ◊ HashArray ◊ IsBetweenDates ◊ Local Admins ◊ Make Choice ◊ Recursive File List ◊ Remove Sizebox Style ◊ Retrieve PNPDeviceID ◊ Retrieve SysListView32 Contents ◊ Set IE Homepage ◊ Tickle Expired Password ◊ Transpose Array Projects: Drive Space Usage GUI ◊ LEDkIT ◊ Plasma_kIt ◊ Scan Engine Builder ◊ SpeeDBurner ◊ SubnetCalc Cool Stuff: AutoItObject UDF ◊ Extract Icon From Proc ◊ GuiCtrlFontRotate ◊ Hex Edit Funcs ◊ Run binary ◊ Service_UDF
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