Skip to content

Instantly share code, notes, and snippets.

@rdrgox
Last active July 12, 2024 03:04
Show Gist options
  • Save rdrgox/d82552d19f5eb9aad7edf8fa22f58996 to your computer and use it in GitHub Desktop.
Save rdrgox/d82552d19f5eb9aad7edf8fa22f58996 to your computer and use it in GitHub Desktop.
Custom xfce panel

Custom gtk.css in KaliLinux

Create

cd /.config/bin/
.
├── ethernet_status.sh
├── hackthebox_status.sh
├── target
└── target_to_hack.sh
  • ethernet_status.sh
#!/bin/bash

echo -e "${GREEN}󰈀 $(/usr/sbin/ifconfig eth0 | grep "inet " | awk '{print $2}')"
  • hackthebox_status.sh
#!/bin/bash

IFACE=$(/usr/sbin/ifconfig | grep tun0 | awk '{print $1}' | tr -d ':')

if [ "$IFACE" = "tun0" ]; then
   echo "$(/usr/sbin/ifconfig tun0 | grep "inet " | awk '{print $2}')"
else
   echo "  Disconnected"
fi
  • target_to_hack.sh
#!/bin/bash

ip_address=$(cat /home/user/.config/bin/target | awk '{print $1}')
machine_name=$(cat /home/user/.config/bin/target | awk '{print $2}')

if [ $ip_address ] && [ $machine_name ]; then
    echo " 󰯐 $ip_address $machine_name"
else
    echo " 󰯐 No target"
fi
nano ~/.zshrc
function settarget(){
    ip_address=$1
    machine_name=$2
    echo "$ip_address $machine_name" > /home/user/.config/bin/target
}

function cleartarget(){
    echo '' > /home/user/.config/bin/target
}

# Custom 
alias ll='lsd -lh --group-dirs=first'
alias la='lsd -a --group-dirs=first'
alias l='lsd --group-dirs=first'
alias lla='lsd -lha --group-dirs=first'
alias ls='lsd --group-dirs=first'

# kitty icat
alias icat="kitten icat"


# mkt
function mkt() {
        mkdir {nmap,content,exploits}
}

function rmk() {
  scrub -p dod $1
  shred -zun 10 -v $1
}

function extractPorts(){
        ports="$(cat $1 | grep -oP '\d{1,5}/open' | awk '{print $1}' FS='/' | xargs | tr ' ' ',')"
        ip_address="$(cat $1 | grep -oP '\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}' | sort -u | head -n 1)"
        echo -e "\n[*] Extracting information...\n" > extractPorts.tmp
        echo -e "\t[*] IP Address: $ip_address"  >> extractPorts.tmp
        echo -e "\t[*] Open ports: $ports\n"  >> extractPorts.tmp
        echo $ports | tr -d '\n' | xclip -sel clip
        echo -e "[*] Ports copied to clipboard\n"  >> extractPorts.tmp
        cat extractPorts.tmp; rm extractPorts.tmp
}

Edit:

nano  ~/.config/gtk-3.0/gtk.css 2>/dev/null
/*-- Custom CSS --*/

/*  Settings/Window Manager Tweaks/Compositor
Uncheck -show shadow under regular windows */
#XfcePanelWindow { 
    border-bottom-left-radius: 10px 40px;
    border-bottom-right-radius: 10px 40px;
    font-size: 12px;
}

/*Panel izquierdo*/

#whiskermenu-1 {
    font-weight: bold;
}

#places-4 {
    font-weight: bold;
}

#genmon-21 {
    color: #bb9af7;
}

#genmon-2 {
    color: #71d7c7;
}

/*Panel Derecho*/


#genmon-9 {
    color: #f1738a;
}

imagen

/home/user/.config/bin/ethernet_status.sh

imagen

/home/user/.config/bin/hackthebox_status.sh

imagen

imagen

/home/user/.config/bin/target_to_hack.sh

imagen

Restar panel:

xfce4-panel -r

imagen

imagen

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