Leaked source code of windows server 2003
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
#include "resource.h" #include "windows.h"
#include "cmdlineres.h" #include "cmdline.rc"
STRINGTABLE DISCARDABLE BEGIN IDS_WHOAMI_HLP1 "\nWhoAmI has three ways of working: \n\nSyntax 1:\n" IDS_WHOAMI_HLP2 " WHOAMI [/UPN | /FQDN | /LOGONID]\n\n" IDS_WHOAMI_HLP3 "" IDS_WHOAMI_HLP4 "Syntax 2:\n" IDS_WHOAMI_HLP5 " WHOAMI { [/USER] [/GROUPS] [/PRIV] } [/FO format] [/NH]\n\n" IDS_WHOAMI_HLP6 "" IDS_WHOAMI_HLP7 "Syntax 3:\n" IDS_WHOAMI_HLP8 " WHOAMI /ALL [/FO format] [/NH]\n\n" IDS_WHOAMI_HLP9 "" IDS_WHOAMI_HLP10 "Description:\n" IDS_WHOAMI_HLP11 " This utility can be used to get user name and group information\n" IDS_WHOAMI_HLP12 " along with the respective security identifiers (SID), privileges,\n" IDS_WHOAMI_HLP13 " logon identifier (logon ID) for the current user (access token)\n" IDS_WHOAMI_HLP14 " on the local system. i.e. who is the current logged on user?\n" IDS_WHOAMI_HLP15 " If no switch is specified, tool displays the user name in NTLM\n" IDS_WHOAMI_HLP16 " format (domain\\username).\n\n" IDS_WHOAMI_HLP17 "" IDS_WHOAMI_HLP18 "" IDS_WHOAMI_HLP19 "Parameter List:\n" IDS_WHOAMI_HLP20 " /UPN Displays the user name in User Principal \n" IDS_WHOAMI_HLP21 " Name (UPN) format.\n\n" IDS_WHOAMI_HLP22 " /FQDN Displays the user name in Fully Qualified \n" IDS_WHOAMI_HLP23 " Distinguished Name (FQDN) format.\n\n" IDS_WHOAMI_HLP24 " /USER Displays information on the current user\n" IDS_WHOAMI_HLP25 " along with the security identifier (SID).\n\n" IDS_WHOAMI_HLP26 "" IDS_WHOAMI_HLP27 " /GROUPS Displays group membership for current user,\n" IDS_WHOAMI_HLP28 " type of account, security identifiers (SID)\n" IDS_WHOAMI_HLP29 " and attributes.\n\n" IDS_WHOAMI_HLP30 " /PRIV Displays security privileges of the current\n" IDS_WHOAMI_HLP31 " user.\n\n" IDS_WHOAMI_HLP32 " /LOGONID Displays the logon ID of the current user.\n\n" IDS_WHOAMI_HLP33 "" IDS_WHOAMI_HLP34 " /ALL Displays the current user name, groups \n" IDS_WHOAMI_HLP35 " belonged to along with the security \n" IDS_WHOAMI_HLP36 " identifiers (SID) and privileges for the \n" IDS_WHOAMI_HLP37 " current user access token.\n\n" IDS_WHOAMI_HLP38 "" IDS_WHOAMI_HLP39 " /FO format Specifies the output format to be displayed.\n" IDS_WHOAMI_HLP40 " Valid values are TABLE, LIST, CSV.\n" IDS_WHOAMI_HLP41 " Column headings are not displayed with CSV\n" IDS_WHOAMI_HLP42 " format. Default format is TABLE.\n\n" IDS_WHOAMI_HLP43 " /NH Specifies that the column header should not\n" IDS_WHOAMI_HLP44 " be displayed in the output. This is\n" IDS_WHOAMI_HLP45 " valid only for TABLE and CSV formats.\n\n" IDS_WHOAMI_HLP46 " /? Displays this help message.\n\n" IDS_WHOAMI_HLP47 "" IDS_WHOAMI_HLP48 "Examples:\n" IDS_WHOAMI_HLP49 " WHOAMI\n" IDS_WHOAMI_HLP50 " WHOAMI /UPN\n" IDS_WHOAMI_HLP51 " WHOAMI /FQDN \n" IDS_WHOAMI_HLP52 " WHOAMI /LOGONID\n" IDS_WHOAMI_HLP53 " WHOAMI /USER\n" IDS_WHOAMI_HLP54 " WHOAMI /USER /FO LIST\n" IDS_WHOAMI_HLP55 " WHOAMI /USER /FO CSV\n" IDS_WHOAMI_HLP56 " WHOAMI /GROUPS\n" IDS_WHOAMI_HLP57 " WHOAMI /GROUPS /FO CSV /NH\n" IDS_WHOAMI_HLP58 " WHOAMI /PRIV\n" IDS_WHOAMI_HLP59 " WHOAMI /PRIV /FO TABLE\n" IDS_WHOAMI_HLP60 " WHOAMI /USER /GROUPS\n" IDS_WHOAMI_HLP61 " WHOAMI /USER /GROUPS /PRIV\n" IDS_WHOAMI_HLP62 " WHOAMI /ALL\n" IDS_WHOAMI_HLP63 " WHOAMI /ALL /FO LIST\n" IDS_WHOAMI_HLP64 " WHOAMI /ALL /FO CSV /NH\n" IDS_WHOAMI_HLP65 " WHOAMI /?\n" END
STRINGTABLE DISCARDABLE BEGIN IDS_INVALID_SYNERROR "ERROR: Invalid syntax. \nType ""WHOAMI /?"" for usage.\n" IDS_INVALID_SID "ERROR: Unexpected error occurred.\n" IDS_INVALID_FORMAT "ERROR: Invalid format (/FO) specified.\nType ""WHOAMI /?"" for usage.\n" IDS_FORMAT_MSG_FAIL "ERROR: Unexpected error occurred - error code was %u.\n" IDS_NO_GROUPS "ERROR: Unable to get group membership information.\n" IDS_ERROR_UPN "ERROR: Unable to get User Principal Name (UPN) as the current logged-on user\n is not a domain user.\n" IDS_ERROR_FQDN "ERROR: Unable to get Fully Qualified Distinguished Name (FQDN) as the current\n logged-on user is not a domain user.\n" IDS_NOT_NH_LIST "ERROR: /NH switch cannot be used with the LIST format.\nType ""WHOAMI /?"" for usage.\n" END
STRINGTABLE DISCARDABLE BEGIN IDS_IGNORE_LOCALCREDENTIALS "\nWARNING: User credentials cannot be used for local connections.\n" END
STRINGTABLE DISCARDABLE BEGIN IDS_LIST_USER_NAMES "USER INFORMATION\n" IDS_DISPLAY_USER_DASH "----------------\n\n" IDS_LIST_GROUP_NAMES "GROUP INFORMATION\n" IDS_DISPLAY_GROUP_DASH "-----------------\n\n" IDS_LIST_LOGON_ID "LOGON ID INFORMATION\n" IDS_DISPLAY_LOGON_DASH "--------------------\n\n" IDS_LIST_PRIV_NAMES "PRIVILEGES INFORMATION\n" IDS_DISPLAY_PRIV_DASH "----------------------\n\n" IDS_LIST_FQDN "FQDN\n" IDS_LIST_UPN "UPN\n" IDS_SLASH "-----\n" IDS_STATE_ENABLED "Enabled" IDS_STATE_DISABLED "Disabled"
IDS_COL_USERNAME "User Name" IDS_COL_SID "SID"
IDS_COL_GROUP_NAME "Group Name" IDS_COL_TYPE_GROUP "Type" IDS_COL_GROUP_SID "SID" IDS_COL_ATTRIBUTE "Attributes"
IDS_COL_PRIV_NAME "Privilege Name" IDS_COL_PRIV_DESC "Description" IDS_COL_PRIV_STATE "State"
IDS_TYPE_USER "User" IDS_TYPE_GROUP "Group" IDS_TYPE_DOMAIN "Domain" IDS_TYPE_ALIAS "Alias" IDS_TYPE_WELLKNOWN "Well-known group" IDS_TYPE_DELETACCOUNT "Deleted account" IDS_TYPE_INVALIDSID "Invalid SID" IDS_TYPE_UNKNOWN "Unknown SID type"
IDS_ATTRIB_MANDATORY "Mandatory group" IDS_ATTRIB_BYDEFAULT "Enabled by default" IDS_ATTRIB_ENABLED "Enabled group" IDS_ATTRIB_OWNER "Group owner" IDS_ATTRIB_USEFORDENY "Group used for deny only" IDS_ATTRIB_LOGONID "Logon ID" IDS_ATTRIB_LOCAL "Local Group"
END
#include <ntverp.h> #define VER_FILETYPE VFT_APP #define VER_FILESUBTYPE VFT2_UNKNOWN #define VER_FILEDESCRIPTION_STR "whoami - displays logged on user information" #define VER_INTERNALNAME_STR "whoami.exe" #define VER_ORIGINALFILENAME_STR "whoami.exe" #include <common.ver>
|