Commit cf85b015 authored by Billy Hulbert's avatar Billy Hulbert
Browse files

Add 'whoami' feature to identify current user of process.

parent bf56b7cf
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -8,5 +8,6 @@
#include <vector>
#include <psapi.h>
#include <SubAuth.h>
#include <lmcons.h>

#define NT_SUCCESS(Status) ((NTSTATUS)(Status) >= 0)
+1 −0
Original line number Diff line number Diff line
@@ -121,3 +121,4 @@

void PrintConsoleRevision();
void PrintDevkitType();
void PrintCurrentUser();
+8 −0
Original line number Diff line number Diff line
@@ -113,3 +113,11 @@ void PrintDevkitType()

	printf("Console Flavour: %s\n", flavour);
}

void PrintCurrentUser()
{
	char username[UNLEN + 1];
	DWORD usernameLength = UNLEN + 1;
	GetUserNameA(username, &usernameLength);
	printf("Running as: %s", username);
}
 No newline at end of file