Skip to content

Sec-Dan/LaserSight

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LaserSight

Keep your target in sight.

Platform Shell Desktop License Version

LaserSight is a lightweight Xfce panel tool for Kali Linux and other Xfce-based systems. It pins your current target directly to the taskbar so you never have to dig through notes, terminal history, or browser tabs just to remember an IP address or hostname.

Built for CTFs, HackTheBox, TryHackMe, internal assessments, and any security workflow where context-switching kills momentum.


Features

Feature Detail
Persistent target display Your target stays visible in the panel across reboots
One-click copy Click the panel text to copy the value to clipboard
One-click edit Click the icon to update the target via a dialog
Auto panel setup Installer wires itself into the Xfce panel automatically
Dependency management Required packages installed automatically on apt-based systems
Safe reinstall Re-running the installer preserves your existing target

Quick Start

git clone https://github.com/Sec-Dan/lasersight.git
cd lasersight
chmod +x install.sh
chmod +x bin/*.sh
./install.sh

The installer handles everything: dependencies, file placement, and panel configuration. Run it from inside an active Xfce desktop session to get the full auto-setup.


How It Works

  Panel bar
  +--------------------------------+
  |  [icon]  Target: 10.10.11.25   |
  +--------------------------------+
     ^            ^
     |            |
  Click to      Click to
  edit target   copy to clipboard

The panel item runs a Generic Monitor script every second that outputs the current target value. Clicking the icon opens a Zenity dialog to update it. Clicking the text copies it to the clipboard.


Installation Details

The installer runs the following steps:

  1. Install dependencies -- skips packages already present
  2. Copy files to ~/.local/share/lasersight
  3. Create config at ~/.config/lasersight/target.txt
  4. Detect the active Xfce panel
  5. Add a Generic Monitor plugin (or reuse an existing one)
  6. Configure the plugin with the correct command path
  7. Restart the panel and verify the setup

If the installer is run outside of an active Xfce session (e.g., over SSH), it installs the files and skips the panel step. Re-run from within Xfce to complete panel setup.

Dependencies

Installed automatically on apt-based systems:

xfce4-genmon-plugin
xclip
libnotify-bin
zenity
xfconf

Usage

Set a target

Click the crosshair icon in the panel. A dialog will appear where you can type any value:

10.10.11.25
dc01.roomname.htb
administrator@domain.local
192.168.1.0/24

Copy the target

Click the target text in the panel. The value is copied to the clipboard and a notification confirms it.

Edit from the terminal

echo "10.10.11.25" > ~/.config/lasersight/target.txt

The panel updates automatically within 1 second.


File Layout

lasersight/
+-- install.sh                  Entry point
+-- VERSION
+-- LICENSE
+-- README.md
+-- assets/
|   +-- lasersight.svg          Panel icon
+-- bin/
|   +-- lasersight-common.sh    Shared functions
|   +-- lasersight-copy.sh      Clipboard handler
|   +-- lasersight-doctor.sh    Diagnostics
|   +-- lasersight-edit.sh      Edit dialog
|   +-- lasersight-genmon.sh    Panel output script
|   +-- lasersight-install.sh   Full installer
|   +-- lasersight-uninstall.sh Uninstaller
+-- config/
    +-- target.txt.example      Default target placeholder

Install locations:

Path Purpose
~/.local/share/lasersight Application files
~/.config/lasersight/target.txt Active target value

Troubleshooting

Run the doctor script

~/.local/share/lasersight/bin/lasersight-doctor.sh

This checks that the install path exists, the script is executable, and shows all configured genmon commands in the panel.

Re-run the installer

~/.local/share/lasersight/bin/lasersight-install.sh

Safe to run multiple times. Existing target value is preserved.

Restart the panel manually

xfce4-panel -r

Plugin shows wrong command path

If you cloned the repo to a different location and reinstalled, the old path may still be in the panel config. Run the installer again to update it automatically, or set the command path directly:

xfconf-query -c xfce4-panel -p /plugins/plugin-N/command \
  -s ~/.local/share/lasersight/bin/lasersight-genmon.sh
xfce4-panel -r

Replace N with the correct plugin ID (shown in doctor output).


Uninstall

~/.local/share/lasersight/bin/lasersight-uninstall.sh

Then right-click the panel and remove the Generic Monitor item.


Roadmap

  • v0.1 -- basic genmon display
  • v0.1.2 -- one-command install with auto panel setup
  • v0.2 -- cleaner uninstall with automatic panel item removal
  • v0.3 -- multiple fields (Target, VPN IP, Hostname)
  • v0.4 -- .deb package
  • v1.0 -- stable release

License

MIT. See LICENSE.