Skip to content

A simple widget to show the IPs of your VPN interface and your target machine in the awesomewm windows manager wibar while you are playing in https://app.hackthebox.com.

License

Notifications You must be signed in to change notification settings

rubenhortas/awesome-htb-widget

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

awesome htb widget

A simple widget to show the IPs of your VPN interface and your target machine (if is set) in the awesomewm window manager wibar while you are playing in hack the box (hackthebox.com).

It's also a good widget to see the IP of your VPN interface (and) if the interface is up.

GitHub repo file count GitHub code size in bytes GitHub repo size

GitHub issues GitHub closed issues GitHub pull requests GitHub closed pull requests

GitHub

Screenshots

  • With target on
    Screenshot target on

  • With target off
    Screenshot target off

(If the VPN interface is down the widget is not shown)

Installation and configuration

Clone the repo under your widgets folder:

  • If you are using a custom theme: ~/.config/awesome/widgets/
  • If you are using a default theme: /usr/share/awesome/lib/ (requires root privileges)

Edit awesome-htb-widget/ip.lua file and set your interface name

local interface = "tun0" --Change tun0 for your interface name

Edit your lua.rc file and add the following

  • If you are using a custom theme: ~/.config/awesome/rc.lua
  • If you are using a default theme: /etc/xdg/awesome/lua.rc (requires root privileges)
local htb_widget = require("widgets.awesome-htb-widget.htb")

...
s.mytasklist, -- Middle widget
{ -- Right widgets
  layout = wibox.layout.fixed.horizontal,
	...
	htb_widget,
	...
},

Add the following alias to your shell (.bashrc, .zshrc, etc):

function target() {
    if [[ $# -eq 0 ]] then
        rm -rf /tmp/target
    else
        echo $1 > /tmp/target
    fi
}

Getting the target alias working

Log off and log in or read and execute your shell with the source command to get the new alias working:

$ source ~/.bashrc # or .zshrc, etc

Restart awesome ;)

Setting and unsetting the target

  • Setting a target (execute target passing as parameter the ip of the target machine)
     $ target 13.12.11.10
  • Unsetting a target (execute target without paramters)
     $ target

Troubleshooting

In case of any problem create an issue

Discussions

If you want ask (or answer) a question, leave an opinion or have a open-ended conversation you can create (or join) a discussion

Support

If you find this widget useful you can star this repo.

About

A simple widget to show the IPs of your VPN interface and your target machine in the awesomewm windows manager wibar while you are playing in https://app.hackthebox.com.

Topics

Resources

License

Stars

Watchers

Forks

Languages