def GetSpecialFolder(self, arg): log.ThugLogging.add_behavior_warn('[Scripting.FileSystemObject ActiveX] GetSpecialFolder("%s")' % (arg, )) arg = int(arg) folder = '' if arg == 0: folder = WScriptShell.ExpandEnvironmentStrings(self, "%windir%") elif arg == 1: folder = WScriptShell.ExpandEnvironmentStrings(self, "%SystemRoot%\\system32") elif arg == 2: folder = WScriptShell.ExpandEnvironmentStrings(self, "%TEMP%") log.ThugLogging.add_behavior_warn('[Scripting.FileSystemObject ActiveX] Returning %s for GetSpecialFolder("%s")' % (folder, arg, )) return folder
def GetComputerName(self): return WScriptShell.ExpandEnvironmentStrings(self, "%COMPUTERNAME%")
def GetUserName(self): return WScriptShell.ExpandEnvironmentStrings(self, "%USERNAME%")
def GetUserDomain(self): return WScriptShell.ExpandEnvironmentStrings(self, "%USERDOMAIN%")