HappyDebugger Posted January 19, 2008 Share Posted January 19, 2008 Can anyone tell me how to find usernames on other pcs on my network. I am working on a messaging util. Thanks Link to comment Share on other sites More sharing options...
FreeFry Posted January 20, 2008 Share Posted January 20, 2008 I don't think that's possible.. not without .. hacking the other computer.. sort of speak.. Link to comment Share on other sites More sharing options...
Bert Posted January 20, 2008 Share Posted January 20, 2008 registry - logon name The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
FreeFry Posted January 20, 2008 Share Posted January 20, 2008 How's that supposed to help him finding usernames on other peoples computers over the network? Link to comment Share on other sites More sharing options...
HappyDebugger Posted January 21, 2008 Author Share Posted January 21, 2008 Thats right, usernames over my home network. I don't have to hack, I can just change the firewall settings if needed. You know how those lan messengers get the usernames on the network that you can send messages to? Thats the sort of thing I'm looking for. Link to comment Share on other sites More sharing options...
Richard Robertson Posted January 21, 2008 Share Posted January 21, 2008 You could write a client-server script in AutoIt. It could read the user macro and send it to the server. A suggestion if you can't find anything better. Link to comment Share on other sites More sharing options...
HappyDebugger Posted January 21, 2008 Author Share Posted January 21, 2008 That wouldn't work with multiple users though. Link to comment Share on other sites More sharing options...
PsaltyDS Posted January 21, 2008 Share Posted January 21, 2008 Thats right, usernames over my home network. I don't have to hack, I can just change the firewall settings if needed. You know how those lan messengers get the usernames on the network that you can send messages to? Thats the sort of thing I'm looking for. What you are talking about are NetBIOS WINS records (specifically 0x03 Computer_Name/Username records). Modern versions of Windows are leaving that off by default because it's a huge security hole, and one day it will no longer be available at all. If I recall correctly, the Username record indicates the Messanger service is up, which is yet another huge security hole. Run "NBTStat -n" to see your local NetBIOS records (if it's running). The \\ComputerName[00h] record shows the Workstation service is talking to NetBIOS, the \\ComputerName[20h] record is from the Server service, and any [03h] records are from the Messanger service. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
Danny35d Posted January 21, 2008 Share Posted January 21, 2008 This script will set @error to 0 and return an array will all user accounts of local or remote computer otherwise it will set @error to 1 and return NUL.#include <Array.au3> $LocalAccounts = _GetLocalAccounts() If Not @error Then _ArrayDisplay($LocalAccounts, 'Local Computer') $RemoteLocalAccounts = _GetLocalAccounts('RemoteComputerName') If Not @error Then _ArrayDisplay($RemoteLocalAccounts, 'Remote Computer') Func _GetLocalAccounts($strComputer = 'localhost') Local $colItems = "" Local $aUsers = '' Local $wbemFlagForwardOnly = 0x20 Local $wbemFlagReturnImmediately = 0x10 $objWMIService = ObjGet("winmgmts:\\" & $strComputer & "\root\CIMV2") If Not IsObj($objWMIService) Then Return(SetError(1, 1, '')) $colItems = $objWMIService.ExecQuery("SELECT * FROM Win32_UserAccount Where LocalAccount = True", "WQL", _ $wbemFlagReturnImmediately + $wbemFlagForwardOnly) If Not IsObj($colItems) Then Return(SetError(1, 1, '')) For $objItem In $colItems $aUsers &= $objItem.Name & '|' Next Return(SetError(0, 0, StringSplit(StringTrimRight($aUsers, 1), '|'))) EndFunc ;==>_GetLocalAccounts AutoIt Scripts:NetPrinter - Network Printer UtilityRobocopyGUI - GUI interface for M$ robocopy command line Link to comment Share on other sites More sharing options...
PsaltyDS Posted January 21, 2008 Share Posted January 21, 2008 This script will set @error to 0 and return an array will all user accounts of local or remote computer otherwise it will set @error to 1 and return NUL.Nice. And that's the right way for it to be available because proper perms are required to get the info. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
DW1 Posted January 22, 2008 Share Posted January 22, 2008 registry - logon nameHow's that supposed to help him finding usernames on other peoples computers over the network?You can read the registry of remote computers too: RegEdit>File>Connect Network Registry..... so thats how it could help. AutoIt3 Online Help Link to comment Share on other sites More sharing options...
Ghost21 Posted January 22, 2008 Share Posted January 22, 2008 You can read the registry of remote computers too: RegEdit>File>Connect Network Registry..... so thats how it could help. $Line = "" $get = Run(@ComSpec & " /c net view", @SystemDir, @SW_HIDE, 2) While $get $Line &= StdoutRead($get) If @error Then ExitLoop WEnd $Line = StringSplit(StringStripCR($Line), @LF) $Out = "" For $I = 1 To $Line[0] If StringLeft($Line[$I], 2) = "\\" Then $Line[$I] = StringTrimLeft($Line[$I], 2) $PC = StringLeft($Line[$I], StringInStr($Line[$I], Chr(32))) $USER = StringTrimLeft(StringStripWS($Line[$I], 4), StringLen($PC)) msgbox(0,"",$user) EndIf Next rockin fast... 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