ConsoleUser

Copyright (c) 2010-2023 Skaion Corporarion, www.skaion.com

This project was developed in part by numerous sponsorships from the U.S. Government. The U.S. Government is authorized to reproduce and distribute reprints of Governmental purposes notwithstanding any copyright notation thereon.

All content reflects those of the authors and should not be interpreted as necessarily representing the official policies or endorsements, either expressed or implied, of the U.S. Government or Skaion Corporation.

class WindowsPlatform.WindowsPlatform(system, config)

This class abstracts much of the common functionality of classes which interact with assorted flavors of Windows.

Parameters:

  • system: a <no title> object which can be used to interact with the target system

  • config: a <no title> object defining the current user

allow_through_firewall()

Handle a dialog that announces that an application is being blocked by the firewall, and allow it to have access through.

Return True if the access was granted or no such dialog was found, False if an error occured

expand_program_menu()

Assuming the Start Menu is already open, expand the All Programs menu.

Return: True if the menu is expanded, False otherwise

get_resolution()

Get the expected resolution of the target system, not necessarily what it currently is.

Return: A tuple of rows and cols (e.g., (800, 600)) of the desired resolution of the target system

handle_uac(region)

The UAC window has been found, let’s handle it.

Parameters:

  • region: the region that was identified triggering this call

handle_uac_creds(username, password)

Enter the credentials to authorize a UAC action.

Parameters:

  • username: the authorized username

  • password: the appropriate password

handle_uac_unfocused(region)

The UAC window has been found, but it is unfocused, let’s handle it.

Parameters:

  • region: the region that was identified triggering this call

handle_uac_yes(region)

While looking for a UAC window we found a “Yes” button, which is probably what we’re looking for.

Parameters:

  • region: the region that was identified triggering this call

open_run_dialog()

This is provided to share a common-er interface with WindowsXP in Win 7 we can accomplish the same thing (generally) by just opening the start menu and typing.

save_as(path)

Save the current document to the given filename.

Subclasses may well want to do this in more specific ways.

Parameters:

  • path: the string to enter in the filename field for where to save this file

try_config()

Attempt to configure this system for use.