Sign in to follow this  
Followers 0
archrival

VNC Plugin Ver. 2

16 posts in this topic

With thanks to pacman and this-is-me, I changed the code so psservice is no longer needed. So all instances of psservice have been removed from the script. The upgrade part of the installer will ask you if you would like to remove it if it is found. The check status code isn't as robust anymore, it will tell you if the service exists, is running or not running or if there is an error checking the service. Unfortunately right now if access is denied, it just says the service is not running. I also split it up into 3 individual files; the main script, the installer script and the service script. It's a little easier to maintain now as well.

The Scripts:

http://www.autoitscript.com/fileman/users/public/archrival/vncview.au3

http://www.autoitscript.com/fileman/users/public/archrival/install-vnc.au3

http://www.autoitscript.com/fileman/users/public/archrival/services-net.au3

Compiled Version (with version changes via resource hacker):

http://www.autoitscript.com/fileman/users/public/archrival/vncview.exe

UltraVNC's VNC Viewer (some sort of VNC viewer is required):

http://www.autoitscript.com/fileman/users/public/archrival/vncviewer.exe

Share this post


Link to post
Share on other sites



With thanks to pacman and this-is-me, I changed the code so psservice is no longer needed. So all instances of psservice have been removed from the script. The upgrade part of the installer will ask you if you would like to remove it if it is found. The check status code isn't as robust anymore, it will tell you if the service exists, is running or not running or if there is an error checking the service. Unfortunately right now if access is denied, it just says the service is not running. I also split it up into 3 individual files; the main script, the installer script and the service script. It's a little easier to maintain now as well.

The Scripts:

http://www.autoitscript.com/fileman/users/public/archrival/vncview.au3

http://www.autoitscript.com/fileman/users/public/archrival/install-vnc.au3

http://www.autoitscript.com/fileman/users/public/archrival/services-net.au3

Compiled Version (with version changes via resource hacker):

http://www.autoitscript.com/fileman/users/public/archrival/vncview.exe

UltraVNC's VNC Viewer (some sort of VNC viewer is required):

http://www.autoitscript.com/fileman/users/public/archrival/vncviewer.exe

<{POST_SNAPBACK}>

I wonder what is this plug-ins for ? mind to show / attach

pictures ?

I know there are few VNC programs out there... but I don't

see what your program does.

Share this post


Link to post
Share on other sites

With thanks to pacman and this-is-me, I changed the code so psservice is no longer needed. So all instances of psservice have been removed from the script. The upgrade part of the installer will ask you if you would like to remove it if it is found. The check status code isn't as robust anymore, it will tell you if the service exists, is running or not running or if there is an error checking the service. Unfortunately right now if access is denied, it just says the service is not running. I also split it up into 3 individual files; the main script, the installer script and the service script. It's a little easier to maintain now as well.

The Scripts:

http://www.autoitscript.com/fileman/users/public/archrival/vncview.au3

http://www.autoitscript.com/fileman/users/public/archrival/install-vnc.au3

http://www.autoitscript.com/fileman/users/public/archrival/services-net.au3

Compiled Version (with version changes via resource hacker):

http://www.autoitscript.com/fileman/users/public/archrival/vncview.exe

UltraVNC's VNC Viewer (some sort of VNC viewer is required):

http://www.autoitscript.com/fileman/users/public/archrival/vncviewer.exe

<{POST_SNAPBACK}>

Hi,

You can remote create the VNC service using DllCall as well. Check out CreateService on MSDN.

Basically,

Connect to the remote admin$ share

FileInstall your VNC files to this share - for UltraVNC, you just need winvnc.exe and vnchooks.dll

Using RegWrite to remotely create default VNC registry settings

Remotely create the service with the binary path as %WINDIR%\winvnc.exe -service

Remotely start the new service

Start vncviewer and connect to remote pc

Wait for vncviewer to close

Remotely stop the winvnc service

Remotely delete the winvnc service

One caveat of course is that you must have local admin rights on the remote pc to connect to the admin$ share and create the vnc service.

Share this post


Link to post
Share on other sites

Hi,

You can remote create the VNC service using DllCall as well. Check out CreateService on MSDN.

Basically,

Connect to the remote admin$ share

FileInstall your VNC files to this share - for UltraVNC, you just need winvnc.exe and vnchooks.dll

Using RegWrite to remotely create default VNC registry settings

Remotely create the service with the binary path as %WINDIR%\winvnc.exe -service

Remotely start the new service

Start vncviewer and connect to remote pc

Wait for vncviewer to close

Remotely stop the winvnc service

Remotely delete the winvnc service

One caveat of course is that you must have local admin rights on the remote pc to connect to the admin$ share and create the vnc service.

<{POST_SNAPBACK}>

That's something I never even thought about doing, that's a pretty cool idea though. And I must thank you for the service script. Unfortunately here at work I don't have admin rights to any other machine but my own, so I can't really hack that together. I could try, I'd just wouldn't be able to know if it's working. I could obviously see if it works on my own machine though. I'll hack that out when I get home. It could certainly be useful. I still have plans for adding remote desktop.

2nd, a question:

Do you know of a way to scan for all PCs in a domain/workgroup without trying to contact every possible IP in a subnet? I'd like to be able to implement something that will return every PC that is running a particular service (winvnc, termsrv, telnet, etc.) .

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

2nd, a question:

Do you know of a way to scan for all PCs in a domain/workgroup without trying to contact every possible IP in a subnet? I'd like to be able to implement something that will return every PC that is running a particular service (winvnc, termsrv, telnet, etc.)

Im asuming u dont want to ping every possible IP in a subnet because that could take ages ?

How about this

Use net view to return a list of all computers in ur network and save the results to a txt file

Then scan each name in the txt file ,ur scanning by the comp names instead of their ips !

This should be quicker than scanning a huge network range which would include ips that arent being used !

Maby u could refine the scan to the default ports used by the programs that you are looking for (if its ur workplace, and if theres alot of pcs in use, its mostly likly that custom defined ports were not specified for programs <cause it ppl are lazy :idiot: >)!

Edited by nova

Share this post


Link to post
Share on other sites

Im asuming u dont want to ping every possible IP in a subnet because that could take ages ?

How about this

Use net view to return a list of all computers in ur network and save the results to a txt file

Then scan each name in the txt file ,ur scanning by the comp names instead of their ips !

This should be quicker than scanning a huge network range which would include ips that arent being used !

Maby u could refine the scan to the default ports used by the programs that you are looking for (if its ur workplace, and if theres alot of pcs in use, its mostly likly that custom defined ports were not specified for programs <cause it ppl are lazy  :idiot: >)!

<{POST_SNAPBACK}>

That of course would work, but in a perfect world I'd be able to do that without using an external program besides what's already in AutoIt. I think at this point, I'm just going to force myself to learn C and do it that way. It's the route I want to go anyway, just a little sooner than I had planned.

Share this post


Link to post
Share on other sites

@pacman, any examples on how to do the complete createservice on a remote system from dllcall?


Who else would I be?

Share this post


Link to post
Share on other sites

@pacman, any examples on how to do the complete createservice on a remote system from dllcall?

<{POST_SNAPBACK}>

I am gonna rewrite all the service functions to take advantage of the new DllOpen and DllClose functions. I will include _CreateService and _DeleteService.

Share this post


Link to post
Share on other sites

Was just trying to source the VNC Plugin. Any available links. Ones in the post all seem dead now....

Thanks

With thanks to pacman and this-is-me, I changed the code so psservice is no longer needed. So all instances of psservice have been removed from the script. The upgrade part of the installer will ask you if you would like to remove it if it is found. The check status code isn't as robust anymore, it will tell you if the service exists, is running or not running or if there is an error checking the service. Unfortunately right now if access is denied, it just says the service is not running. I also split it up into 3 individual files; the main script, the installer script and the service script. It's a little easier to maintain now as well.

The Scripts:

http://www.autoitscript.com/fileman/users/public/archrival/vncview.au3

http://www.autoitscript.com/fileman/users/public/archrival/install-vnc.au3

http://www.autoitscript.com/fileman/users/public/archrival/services-net.au3

Compiled Version (with version changes via resource hacker):

http://www.autoitscript.com/fileman/users/public/archrival/vncview.exe

UltraVNC's VNC Viewer (some sort of VNC viewer is required):

http://www.autoitscript.com/fileman/users/public/archrival/vncviewer.exe

Share this post


Link to post
Share on other sites

Use net view to return a list of all computers in ur network and save the results to a txt file

Then scan each name in the txt file ,ur scanning by the comp names instead of their ips !

Then you could use psview and pskill from Sysinternals to find and/or remove any service you need to...

...by the way, it's pronounced: "JIF"... Bob Berry --- inventor of the GIF format

Share this post


Link to post
Share on other sites

Or you could use a variant of this code to find any service on any remote machine you want:

; Generated by AutoIt Scriptomatic

$wbemFlagReturnImmediately = 0x10
$wbemFlagForwardOnly = 0x20
$colItems = ""
$strComputer = "localhost"

$Output=""
$Output = $Output & "Computer: " & $strComputer  & @CRLF
$Output = $Output & "==========================================" & @CRLF
$objWMIService = ObjGet("winmgmts:\\" & $strComputer & "\root\CIMV2")
$colItems = $objWMIService.ExecQuery("SELECT * FROM Win32_Service", "WQL", _
                                          $wbemFlagReturnImmediately + $wbemFlagForwardOnly)

If IsObj($colItems) then
   For $objItem In $colItems
       $Output = $Output & "Caption: " & $objItem.Caption & @CRLF
      $Output = $Output & "ProcessId: " & $objItem.ProcessId & @CRLF
      if Msgbox(1,"WMI Output",$Output) = 2 then ExitLoop
      $Output=""
   Next
Else
   Msgbox(0,"WMI Output","No WMI Objects Found for class: " & "Win32_Service" )
Endif

...by the way, it's pronounced: "JIF"... Bob Berry --- inventor of the GIF format

Share this post


Link to post
Share on other sites

The links to the scripts are not working?

Share this post


Link to post
Share on other sites

Can you reupload it please?

Fileman is down.


-jaenster

Share this post


Link to post
Share on other sites

Can you reupload it please?

Fileman is down.

Yes, links are down. Is it possible to reupload it. This cool project is what i am looking for.

So please. Thanks.

Share this post


Link to post
Share on other sites
+1

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0