[Kc] Accessing Windows Registry remotely with Perl

Garrett Goebel ggoebel at goebel.ws
Tue May 15 17:51:19 PDT 2007


Did you read the documentation for  
Win32API::Registry::RegConnectRegistry?

If the current account you're logged in as doesn't have pass thru  
authentication to the remote computer, you'll need to look into  
NetUseAdd from Jens Helbergs' Win32::lanman or find an equivalent  
module which will allow you to connect to remote computer's IPC$  
share with appropriate credentials first.

if(!Win32::Lanman::NetUseAdd({
     remote => "\\\\testserver\\ipc\$",
     password => "testpass",
     username => "testuser",
     domain => "testdomain",
     asg_type => &USE_IPC}
)) {
     print "Sorry, something went wrong; error: ";
     # get the error code
     print Win32::Lanman::GetLastError();
     exit 1;
}

cheers,

Garrett

On May 14, 2007, at 9:43 AM, Frank Wiles wrote:

> On Mon, 14 May 2007 09:41:17 -0500
> "Daryl Fallin" <darylvf at gmail.com> wrote:
>
>> Does anyone know if there is a way to connect to a remote windows
>> system and pull registry entries using Perl?
>>
>> It looked like Win32API::Registry was going to be a way to do this
>> but it appears to be only accessing the local systems Registry.
>
>    I'm not a Windows user, but I seriously doubt this is possible  
> as it
>    would be a huge gaping hole for security problems.



More information about the kc mailing list