Skip to content

Instantly share code, notes, and snippets.

@curi0usJack
Forked from ccammilleri/msfconsole.rc
Created October 12, 2017 03:05
Show Gist options
  • Save curi0usJack/3c9f19653773e4083375d58899bcfe38 to your computer and use it in GitHub Desktop.
Save curi0usJack/3c9f19653773e4083375d58899bcfe38 to your computer and use it in GitHub Desktop.
set PROMPT %red%L %yel%J %grn%S %blu%W
load nessus
load pentest
load sounds
load alias
alias j "jobs -v"
alias s "sessions -v"
alias -f w "workspace"
alias so "show options"
alias sa "show advanced"
alias -f e "exploit -j -z"
alias psexec_psh "use exploit/windows/smb/psexec_psh"
alias psexec_cmd "use auxiliary/admin/smb/psexec_command"
alias psexec "use exploit/windows/smb/psexec"
alias handler "use exploit/multi/handler"
alias screen_spy "use post/windows/gather/screen_spy"
alias sphttps "set payload windows/meterpreter/reverse_https"
alias sphttp "set payload windows/meterpreter/reverse_http"
alias sptcp "set payload windows/meterpreter/reverse_tcp"
alias smart_hashdump "use post/windows/gather/smart_hashdump"
#setg enablecontextencoding true
#setg enablestageencoding true
setg exitonsession false
setg MeterpreterUserAgent "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Win64; x64; Trident/4.0)"
setg MeterpreterServerName "Microsoft-IIS/8.0"
@curi0usJack
Copy link
Author

@NeodymiumPhish - are you referring to the main console text? When I look at my console (using the PROMPT in my gist), the prompt > and text are both white. ??

@NeodymiumPhish
Copy link

Yes, but the color carries through beyond the %W until msf changes the color. For example, if you use exploit/whatever, msf will change the color of the exploit title to red, then change the close parenthesis to white and the promptchar also turns white. However, the open parenthesis is still blue fro the %blu before %W. I'm trying to turn the text back to white at the end of the set PROMPT because it looks awkward, especially if I use a custom PROMPTCHAR, since the promptchar also changes color until I set a module for use.

@NeodymiumPhish
Copy link

Here's an example of how that %blu carries over until the next time the terminal's colors are changed:
Annotation 2020-05-22 075045

@NeodymiumPhish
Copy link

After some trial and error, it's just %whi to set text to white, so putting %whi at the end of the set PROMPT fixes this.
Annotation 2020-05-22 075606

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment