Page 2 of 2 FirstFirst 12
Results 11 to 17 of 17

Thread: change color of text in shell

  1. #11
    Developer balding_parrot's Avatar
    Join Date
    May 2007
    Posts
    3,399

    Default

    Quote Originally Posted by PrairieFire View Post
    At least this is more interesting than watching this slowly work.
    been there, done that.

  2. #12
    Senior Member
    Join Date
    Apr 2007
    Posts
    3,385

    Default

    Quote Originally Posted by PrairieFire View Post
    At least this is more interesting than watching this slowly work.
    Geesh..that long?? Damn..I still havent uncompressed mine yet. I need a larger HD to do it.


    Quote Originally Posted by balding_parrot View Post
    Here you go Xploitz

    Code:
    # /etc/profile: This file contains system-wide defaults used by
    # all Bourne (and related) shells.
    
    # Set the values for some environment variables:
    export MINICOM="-c on"
    export MANPATH=/usr/local/man:/usr/man:/usr/X11R6/man
    export HOSTNAME="`cat /etc/HOSTNAME`"
    export LESSOPEN="|lesspipe.sh %s"
    export LESS="-M"
    
    # If the user doesn't have a .inputrc, use the one in /etc.
    if [ ! -r "$HOME/.inputrc" ]; then
      export INPUTRC=/etc/inputrc
    fi
    
    # Set the default system $PATH:
    PATH="/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/usr/local/apache/bin:/usr/local/pgsql/bin:/opt/mono/bin:/usr/local/pgsql/bin:."
    
    # For root users, ensure that /usr/local/sbin, /usr/sbin, and /sbin are in
    # the $PATH.  Some means of connection don't add these by default (sshd comes
    # to mind).
    if [ "`id -u`" = "0" ]; then
      echo $PATH | grep /usr/local/sbin 1> /dev/null 2> /dev/null
      if [ ! $? = 0 ]; then
        PATH=/usr/local/sbin:/usr/sbin:/sbin:$PATH
      fi
    fi
    
    # I had problems using 'eval tset' instead of 'TERM=', but you might want to 
    # try it anyway. I think with the right /etc/termcap it would work great.
    # eval `tset -sQ "$TERM"`
    if [ "$TERM" = "" -o "$TERM" = "unknown" ]; then
     TERM=linux
    fi
    
    # Set ksh93 visual editing mode:
    if [ "$SHELL" = "/bin/ksh" ]; then
      VISUAL=emacs
    #  VISUAL=gmacs
    #  VISUAL=vi
    fi
    
    # Set a default shell prompt:
    #PS1='`hostname`:`pwd`# '
    if [ "$SHELL" = "/bin/pdksh" ]; then
     PS1='! $ '
    elif [ "$SHELL" = "/bin/ksh" ]; then
     PS1='! ${PWD/#$HOME/~}$ '
    elif [ "$SHELL" = "/bin/zsh" ]; then
     PS1='%n@%m:%~%# '
    elif [ "$SHELL" = "/bin/ash" ]; then
     PS1='$ '
    else
    #My colour additions (muts)
    
    #PS1="\u@\h:\w\$ "
    #PS1="\[\033[1;34m\]\u@\h:\w\$ \033[0m "
    #PS1='\[\e[34;1m\]\u@\h:\w\$ \[\e[0m\]'
    PS1='\[\033[01;31m\]\h \[\033[01;34m\]\W \$ \[\033[00m\]'
    fi
    PS2='> '
    export PATH DISPLAY LESS TERM PS1 PS2
    
    # Default umask.  A umask of 022 prevents new files from being created group
    # and world writable.
    umask 022
    
    # Set up the LS_COLORS and LS_OPTIONS environment variables for color ls:
    if [ "$SHELL" = "/bin/zsh" ]; then
     eval `dircolors -z`
    elif [ "$SHELL" = "/bin/ash" ]; then
     eval `dircolors -s`
    else
     eval `dircolors -b`
    fi
    
    # Notify user of incoming mail.  This can be overridden in the user's
    # local startup file (~/.bash.login or whatever, depending on the shell)
    if [ -x /usr/bin/biff ]; then
     biff y
    fi
    
    # Append any additional sh scripts found in /etc/profile.d/:
    for profile_script in /etc/profile.d/*.sh ; do
      if [ -x $profile_script ]; then
        . $profile_script
      fi
    done
    unset profile_script
    
    # For non-root users, add the current directory to the search path:
    if [ ! "`id -u`" = "0" ]; then
     PATH="$PATH:."
    fi
    AAHhh!! Thank you b_p! Now I can go tinker some more till i figure out where to stick it to make it permanent.
    [CENTER][FONT=Book Antiqua][SIZE=5][B][COLOR=blue][FONT=Courier New][COLOR=red]--=[/COLOR][/FONT]Xploitz[FONT=Courier New][COLOR=red]=--[/COLOR][/FONT][/COLOR][/B][/SIZE][/FONT][FONT=Courier New][COLOR=Black][SIZE=6][B] ®[/B][/SIZE][/COLOR][/FONT][/CENTER]
    [CENTER][SIZE=4][B]Remote-Exploit.orgs Master Tutorialist.[/B][/SIZE][SIZE=6][B]™
    [/B][/SIZE]
    [URL="http://forums.remote-exploit.org/showthread.php?t=9063"][B]VIDEO: Volume #1 "E-Z No Client WEP Cracking Tutorial"[/B]
    [/URL]
    [URL="http://forums.remote-exploit.org/showthread.php?t=7872"][B]VIDEO: Volume #2 "E-Z No Client Korek Chopchop Attack Tutorial"[/B]
    [/URL]
    [URL="http://forums.remote-exploit.org/showthread.php?t=8230"][B]VIDEO: Volume #3 "E-Z WPA/WPA2 Cracking Tutorial"[/B][/URL]

    [URL="http://forums.remote-exploit.org/showthread.php?t=8041"][B]VIDEO: Volume #4 "E-Z Cracking WPA/WPA2 With Airolib-ng Databases"[/B][/URL]
    [/CENTER]

  3. #13
    Senior Member PrairieFire's Avatar
    Join Date
    Apr 2007
    Posts
    705

    Default

    Quote Originally Posted by -=Xploitz=- View Post
    Geesh..that long?? Damn..I still havent uncompressed mine yet. I need a larger HD to do it.
    Going on 45 minutes now P4 2.5Ghz 512mb of ram Only took 12 hours to download.
    Μολὼν λαβέ - Great spirits encounter heavy opposition from mediocre minds.

  4. #14
    Member
    Join Date
    Jul 2007
    Posts
    145

    Default

    Quote Originally Posted by -=Xploitz=- View Post
    Way to go balding_parrot!. Now I've gone and jacked with my .bashrc and screwed it all up!! I fixed most of it, but i'm still a Linux Novice..and something told me not to **** with this..but did I listen?? NNOooooo! I need just a little help with this stuff. I did this command in an empty shell window...

    export PS1="\[\e[36;1m\]\[\e[34;1m\]\H \[\e[0m\]"

    and it made my "prompt" go from

    {-=Xploitz=-} ~ #

    to
    ......

    {-=Xploitz=-}

    Which is what I want. But where do I put it my .bashrc when I do ..

    nano /root/.bashrc

    This is what it looks like after i tried to edit it with the above export PS1..etc..

    Code:
    # /etc/profile: This file contains system-wide defaults used by
    # all Bourne (and related) shells.
    
    # Set the values for some environment variables:
    export MINICOM="-c on"
    export MANPATH=/usr/local/man:/usr/man:/usr/X11R6/man
    export HOSTNAME="`cat /etc/HOSTNAME`"
    export LESSOPEN="|lesspipe.sh %s"
    export LESS="-M"
    
    # If the user doesn't have a .inputrc, use the one in /etc.
    if [ ! -r "$HOME/.inputrc" ]; then
      export INPUTRC=/etc/inputrc
    fi
    
    # Set the default system $PATH:
    PATH="/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/usr/local/apache/bin:/usr/local/pgsql/bin:/opt/mono/bin:/usr/local/pgsql/bin:."
    
    # For root users, ensure that /usr/local/sbin, /usr/sbin, and /sbin are in
    # the $PATH.  Some means of connection don't add these by default (sshd comes
    # to mind).
    if [ "`id -u`" = "0" ]; then
      echo $PATH | grep /usr/local/sbin 1> /dev/null 2> /dev/null
      if [ ! $? = 0 ]; then
        PATH=/usr/local/sbin:/usr/sbin:/sbin:$PATH
      fi
    fi
    
    # I had problems using 'eval tset' instead of 'TERM=', but you might want to 
    # try it anyway. I think with the right /etc/termcap it would work great.
    # eval `tset -sQ "$TERM"`
    if [ "$TERM" = "" -o "$TERM" = "unknown" ]; then
     TERM=linux
    fi
    
    # Set ksh93 visual editing mode:
    if [ "$SHELL" = "/bin/ksh" ]; then
      VISUAL=emacs
    #  VISUAL=gmacs
    #  VISUAL=vi
    fi
    
    # Set a default shell prompt:
    #PS1='`hostname`:`pwd`# '
    if [ "$SHELL" = "/bin/pdksh" ]; then
     PS1='! $ '
    elif [ "$SHELL" = "/bin/ksh" ]; then
     PS1='! ${PWD/#$HOME/~}$ '
    elif [ "$SHELL" = "/bin/zsh" ]; then
     PS1='%n@%m:%~%# '
    elif [ "$SHELL" = "/bin/ash" ]; then
     PS1='$ '
    else
    #My colour additions (muts)
    
    #PS1="\u@\h:\w\$ "
    #PS1="\[\033[1;34m\]\u@\h:\w\$ \033[0m "
    #PS1='\[\e[34;1m\]\u@\h:\w\$ \[\e[0m\]'
    export PS1="\[\e[36;1m\]\[\e[34;1m\]\H \[\e[0m\]"
    fi
    PS2='> '
    export PS1="\[\e[36;1m\]\[\e[34;1m\]\H \[\e[0m\]"
    
    # Default umask.  A umask of 022 prevents new files from being created group
    # and world writable.
    umask 022
    
    # Set up the LS_COLORS and LS_OPTIONS environment variables for color ls:
    if [ "$SHELL" = "/bin/zsh" ]; then
     eval `dircolors -z`
    elif [ "$SHELL" = "/bin/ash" ]; then
     eval `dircolors -s`
    else
     eval `dircolors -b`
    fi
    
    # Notify user of incoming mail.  This can be overridden in the user's
    # local startup file (~/.bash.login or whatever, depending on the shell)
    if [ -x /usr/bin/biff ]; then
     biff y
    fi
    
    # Append any additional sh scripts found in /etc/profile.d/:
    for profile_script in /etc/profile.d/*.sh ; do
      if [ -x $profile_script ]; then
        . $profile_script
      fi
    done
    unset profile_script
    
    # For non-root users, add the current directory to the search path:
    if [ ! "`id -u`" = "0" ]; then
     PATH="$PATH:."
    fi

    I know I don't have that in the right spot...so where do i put it?? I want it to be permanent. So upon boot up I don't have to type in
    export PS1="\[\e[36;1m\]\[\e[34;1m\]\H \[\e[0m\]" all the time. What I bolded is what I changed...lol..and now i fear I need to copy and paste someones "virgin" .bashrc over mine cause I ****ed with it 2 much. So could someone please post theirs up for me?? Thanks!


    And finally.....@
    unlazyfree


    I don't have the menu in my shell like you do, howd you get that? I can't figure it out for the life of me

  5. #15
    Senior Member
    Join Date
    Apr 2007
    Posts
    3,385

    Default

    LOL!! ROTFLMAO!!!

    Just right click anywhere in the black area and select "Show Menubar"

    Or if that 2 much work...lol..you can
    Code:
    Ctrl Alt m
    Just don't.........
    [CENTER][FONT=Book Antiqua][SIZE=5][B][COLOR=blue][FONT=Courier New][COLOR=red]--=[/COLOR][/FONT]Xploitz[FONT=Courier New][COLOR=red]=--[/COLOR][/FONT][/COLOR][/B][/SIZE][/FONT][FONT=Courier New][COLOR=Black][SIZE=6][B] ®[/B][/SIZE][/COLOR][/FONT][/CENTER]
    [CENTER][SIZE=4][B]Remote-Exploit.orgs Master Tutorialist.[/B][/SIZE][SIZE=6][B]™
    [/B][/SIZE]
    [URL="http://forums.remote-exploit.org/showthread.php?t=9063"][B]VIDEO: Volume #1 "E-Z No Client WEP Cracking Tutorial"[/B]
    [/URL]
    [URL="http://forums.remote-exploit.org/showthread.php?t=7872"][B]VIDEO: Volume #2 "E-Z No Client Korek Chopchop Attack Tutorial"[/B]
    [/URL]
    [URL="http://forums.remote-exploit.org/showthread.php?t=8230"][B]VIDEO: Volume #3 "E-Z WPA/WPA2 Cracking Tutorial"[/B][/URL]

    [URL="http://forums.remote-exploit.org/showthread.php?t=8041"][B]VIDEO: Volume #4 "E-Z Cracking WPA/WPA2 With Airolib-ng Databases"[/B][/URL]
    [/CENTER]

  6. #16
    Senior Member
    Join Date
    Apr 2007
    Posts
    3,385

    Default

    Ok! So I got it all figured out. And Im bout to post a tutorial in the "General IT Discussion" forum...since this info is not SPECIFIC to BT2's intended purpose.
    [CENTER][FONT=Book Antiqua][SIZE=5][B][COLOR=blue][FONT=Courier New][COLOR=red]--=[/COLOR][/FONT]Xploitz[FONT=Courier New][COLOR=red]=--[/COLOR][/FONT][/COLOR][/B][/SIZE][/FONT][FONT=Courier New][COLOR=Black][SIZE=6][B] ®[/B][/SIZE][/COLOR][/FONT][/CENTER]
    [CENTER][SIZE=4][B]Remote-Exploit.orgs Master Tutorialist.[/B][/SIZE][SIZE=6][B]™
    [/B][/SIZE]
    [URL="http://forums.remote-exploit.org/showthread.php?t=9063"][B]VIDEO: Volume #1 "E-Z No Client WEP Cracking Tutorial"[/B]
    [/URL]
    [URL="http://forums.remote-exploit.org/showthread.php?t=7872"][B]VIDEO: Volume #2 "E-Z No Client Korek Chopchop Attack Tutorial"[/B]
    [/URL]
    [URL="http://forums.remote-exploit.org/showthread.php?t=8230"][B]VIDEO: Volume #3 "E-Z WPA/WPA2 Cracking Tutorial"[/B][/URL]

    [URL="http://forums.remote-exploit.org/showthread.php?t=8041"][B]VIDEO: Volume #4 "E-Z Cracking WPA/WPA2 With Airolib-ng Databases"[/B][/URL]
    [/CENTER]

  7. #17
    Senior Member
    Join Date
    Apr 2007
    Posts
    3,385

    Default

    Quote Originally Posted by -=Xploitz=- View Post
    Ok! So I got it all figured out. And Im bout to post a tutorial in the "General IT Discussion" forum...since this info is not SPECIFIC to BT2's intended purpose.

    Forgot to follow up on this!!

    Sorry...heres the link...

    Code:
    http://forums.remote-exploit.org/showthread.php?t=8102&highlight=colors
    [CENTER][FONT=Book Antiqua][SIZE=5][B][COLOR=blue][FONT=Courier New][COLOR=red]--=[/COLOR][/FONT]Xploitz[FONT=Courier New][COLOR=red]=--[/COLOR][/FONT][/COLOR][/B][/SIZE][/FONT][FONT=Courier New][COLOR=Black][SIZE=6][B] ®[/B][/SIZE][/COLOR][/FONT][/CENTER]
    [CENTER][SIZE=4][B]Remote-Exploit.orgs Master Tutorialist.[/B][/SIZE][SIZE=6][B]™
    [/B][/SIZE]
    [URL="http://forums.remote-exploit.org/showthread.php?t=9063"][B]VIDEO: Volume #1 "E-Z No Client WEP Cracking Tutorial"[/B]
    [/URL]
    [URL="http://forums.remote-exploit.org/showthread.php?t=7872"][B]VIDEO: Volume #2 "E-Z No Client Korek Chopchop Attack Tutorial"[/B]
    [/URL]
    [URL="http://forums.remote-exploit.org/showthread.php?t=8230"][B]VIDEO: Volume #3 "E-Z WPA/WPA2 Cracking Tutorial"[/B][/URL]

    [URL="http://forums.remote-exploit.org/showthread.php?t=8041"][B]VIDEO: Volume #4 "E-Z Cracking WPA/WPA2 With Airolib-ng Databases"[/B][/URL]
    [/CENTER]

Page 2 of 2 FirstFirst 12

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •