#Include %A_ScriptDir%\src\lib\SHA256.ahk console(input) { global StringTrimLeft, cc, input, 1 StringSplit, cc, cc, %A_Space% ifWinNotExist, DEBUG { EventMonitor = 1 Gui 10: Show, x%dX% y%dY% w280 h570, DEBUG GuiControl 1: Focus, input } Gui 10: Submit, NoHide if cc1 = registry { gosub runregedit return } else if cc1 = sysinfo { gosub sysinfo return } else if cc1 = settings { gosub Settings return } else if cc1 = savesysinfo { gosub savesysinfo return } else if cc1 = getsize { if (cc2 = "k" or cc2 = "m") { FileGetSize, ps, %A_ScriptFullPath%, %cc2% printps = %ps% %cc2% Print(,, "printps") } else { MsgBox,, Error, Parameter needed: /getsize return } } else if cc1 = debug { ifWinNotExist, DEBUG { if rank not contains admin MsgBox,, Note!, Debug view will show sensitive information like passwords. EventMonitor = 1 Print(, "Event Monitor on (debug)") Gui 10: Show, x%dX% y%dY% w280 h570, DEBUG GuiControl 1: Focus, input return } } else if cc1 = newuser { if rank not contains admin { MsgBox,, Error, This command is only for administrators. return } if cc0 < 4 { MsgBox,, Error, Too few parameters passed.`n`nParameters:`n/newuser return } CreateUsername := cc2 CreatePassword := cc3 CreateEmailAddress := cc4 gosub SendCreateGUI return } else if cc1 = gethash { if rank not contains admin { MsgBox,, Error, This command is only for administrators. return } gethash := SHA256(cc2) loop, % iterations { gethash := SHA256(gethash) } clipboard := gethash TrayTip, HASH copied to your clipboard, %gethash% return } else if cc1 = loginuser { RegWrite, REG_SZ, HKEY_LOCAL_MACHINE, SOFTWARE\Unblock, LoginUser, %cc2% Print(, "LoginUser: ", "cc2") return } else if (cc1 = "logout" or cc1 = "logoff") { Print(, "Logging out") gosub LogOut return } else if cc1 = disable { if cc2 = taskmanager { RegWrite, REG_DWORD, HKEY_CURRENT_USER, Software\Microsoft\Windows\CurrentVersion\Policies\System, DisableTaskMgr, 1 return } else if cc2 = registry { RegWrite, REG_DWORD, HKEY_CURRENT_USER, Software\Microsoft\Windows\CurrentVersion\Policies\System, DisableRegistryTools, 1 return } } else if cc1 = enable { if cc2 = taskmanager { RegWrite, REG_DWORD, HKEY_CURRENT_USER, Software\Microsoft\Windows\CurrentVersion\Policies\System, DisableTaskMgr, 0 return } else if cc2 = registry { RegWrite, REG_DWORD, HKEY_CURRENT_USER, Software\Microsoft\Windows\CurrentVersion\Policies\System, DisableRegistryTools, 0 return } } else if cc1 = open { if Logging = 0 { MsgBox,, Error, Logging is disabled.`n`nEnable logging in the settings menu. return } if cc2 = log run %dir%\log.txt if (cc2 = "cmdlog" or cc2 = "commandlog") run %dir%\cmdlog.txt return } else if cc1 = me { iDid = %LoginUser% %cc2% %cc3% %cc4% %cc5% %cc6% Print(,, "iDid") Clear("iDid") } else if cc1 = del { if cc2 = MsgBox,, Error, Too few parameters provided.`n`n/del if cc2 = dir FileDelete, %dir%\*.* if cc2 = reg { if cc3 = MsgBox,, Error, Too few parameters provided.`n`n/del reg if cc3 = LoginKey { RegDelete, HKEY_LOCAL_MACHINE, SOFTWARE\Unblock, LoginKey Print(, "Entry LoginKey deleted") } if cc3 = LoginUser { RegDelete, HKEY_LOCAL_MACHINE, SOFTWARE\Unblock, LoginUser Print(, "Entry LoginUser deleted") } if cc3 = isUserRequested { RegDelete, HKEY_LOCAL_MACHINE, SOFTWARE\Unblock, isUserRequested Print(, "Entry isUserRequested deleted") } if cc3 = version { RegDelete, HKEY_LOCAL_MACHINE, SOFTWARE\Unblock, Version Print(, "Entry Version deleted") } } } else if (cc1 = "help" or cc1 = "cmdlist" or cc1 = "commandlist" and cc2 = "") { Loop, 16 { Print(, "`n") } Print(, "Current commands:") Print(, "`n") Print(, "/help") Print(, "/registry") Print(, "/sysinfo") Print(, "/settings") Print(, "/debug - bugged") Print(, "/print") Print(, "/newuser") Print(, "/loginuser") Print(, "/enable") Print(, "/disable") Print(, "/del") Print(, "/open") Print(, "/getsize") Print(, "/gethash") Print(, "/logout") Print(, "`n") Print(, "`n") Print(, "For detailed documentation on each command enter:") Print(, "/help *command*") GuiControl 1: Focus, input } else if (cc1 = "doc") { if cc2 != { Print(, "`n") Print(, "- - - - - - - - - - - - - - - - - - - - - - -") if cc2 = help { Print(, "/help") Print(, "`n") Print(, "Shows this list.") } else if cc2 = doc { Print(, "/doc ") Print(, "`n") Print(, "Shows documentation.") } else if cc2 = registry { Print(, "/registry") Print(, "`n") Print(, "Opens the registry editor.") } else if cc2 = sysinfo { Print(, "/sysinfo") Print(, "`n") Print(, "Opens the system information message box Beta.") } else if cc2 = settings { Print(, "/settings") Print(, "`n") Print(, "Opens the settings window.") } else if cc2 = debug { Print(, "/debug") Print(, "`n") Print(, "Toggles the debug monitor.") } else if cc2 = print { Print(, "/print ") Print(, "`n") Print(, "Prints a set of variables or simply a word to the debug monitor.") } else if cc2 = newuser { Print(, "/newuser ") Print(, "`n") Print(, "Creates a new user - currently only for devs.") } else if cc2 = loginuser { Print(, "/loginuser") Print(, "`n") Print(, "Sets a default user upon startup.") } else if cc2 = enable { Print(, "/enable ") Print(, "`n") Print(, "Enables the set parameter.") } else if cc2 = disable { Print(, "/disable ") Print(, "`n") Print(, "Disables the set parameter.") } else if cc2 = del { Print(, "/del dir") Print(, "/del reg ") Print(, "`n") Print(, "*dir* deletes the program directory.") Print(, "*reg* deletes the specified registry entry key.") } else if cc2 = open { Print(, "/open ") Print(, "`n") Print(, "Opens either the program log or the command log.") } else if cc2 = getsize { Print(, "/getsize ") Print(, "`n") Print(, "Retrieves the program size in either kilobytes or megabytes.") } else if cc2 = gethash { Print(, "/gethash ") Print(, "`n") Print(, "Get the hash of a string - for devs only.") } else if cc2 = logout { Print(, "/logout") Print(, "`n") Print(, "I think you can figure this one out.") } Print(, "- - - - - - - - - - - - - - - - - - - - - - -") Print(, "`n") } } else { MsgBox,, Error, "%cc1%" is not a valid command. } }