Modern, simple and fresh looking glass based on Bootstrap 5 and PHP 7

Overview

Looking Glass

Modern, simple and fresh looking glass based on Bootstrap 5 and PHP 7. A looking glass is a network utility which is made user-friendly for everyone to use. It allows you to execute network related commands within a remote network, usually that of an ISP.

Demo

See it in action here!

Features

  • Bootstrap 5 UI.
  • Real time command output using JavaScript.
  • Supports ping/ping6, traceroute/traceroute6 and mtr/mtr6.
  • Easy to customize and to configure.
  • DNS checking to prevent unnecessary executions.

Requirements

  • Any Linux distribution, this has been tested on RHEL.
  • PHP 7.1 or higher.
  • IPv6 connectivity if you want to use the v6 equivalents.
  • Root access.

Installation

For this installation we will assume that we are working on AlmaLinux 8 OS. Warning: This guide does not cover any security hardening or rate limiting.

  1. Install the required network tools: dnf install mtr traceroute -y.
  2. Install the web server with PHP (by default it will install 7.2): dnf install httpd mod_ssl php -y.
  3. Enable and start Apache/PHP-FPM: systemctl enable httpd; systemctl enable php-fpm and systemctl start httpd; systemctl start php-fpm.
  4. Let's help MTR to work, execute the following command: ln -s /usr/sbin/mtr /usr/bin/mtr and also mtr helper called mtr-packet: ln -s /usr/sbin/mtr-packet /usr/bin/mtr-packet.
  5. You must configure SELinux before this all works, or you can disable SELinux using setenforce 0 and possibly make it permanent: nano /etc/selinux/config change to SELINUX=disabled.
  6. Upload the contents of the ZIP to /var/www/html/.
  7. Rename config.dist.php to config.php and adjust the settings.
  8. (Optional) You might want to enable SSL using LetsEncrypt, take a look at acme.sh.

Customization

If you open up config.dist.php you will see that there are some features that allows you to customize the looking glass, this includes a custom CSS override. You may also extend the looking glass with a custom block.

TODO

  • Move to Composer;
  • Software-based rate limiting;
  • Implement a template engine, for advanced customization;
  • Switch to WebSockets.

Contribute

We would love to receive code contributions in the form of a pull request. We prefer this over forking, so if you have any code improvements feel free to commit.

Credits

This project is inspired by the LookingGlass project of @telephone and uses his procExecute() function, although slightly modified.

License

Mozilla Public License Version 2.0

Comments
  • Update config.php as const LG_CUSTOM_HEAD was missing

    Update config.php as const LG_CUSTOM_HEAD was missing

    Docker-Page generates an error because const LG_CUSTOM_HEAD is not defined in the original docker / config.php. When the const is added, the page is working as designed

    opened by deliciousbob 1
  • Fix ipv6 issues

    Fix ipv6 issues

    Discovered some ipv6 issues:

    • Ping may default to ipv4 since -4 is not specified
    • Incorrect use of || instead of && for the isValidIpv6/isValidHost check
    opened by kimma 1
  • Live MTR output

    Live MTR output

    • Live MTR Output
    • Rewrite POST handler
    • Added "templateData" with default values, this cleans up html
    • Added consts to LookingGlass, values used across multiple files
    • Added MAPS_QUERY, you can now point to the exact location
    • Fixed Docker config.php missing
    • Cleanup docker image by cleaning up APT repo data
    • Replace deprecated document.execCommand with navigator.clipboard
    opened by MarcHagen 1
  • Move root out of location context

    Move root out of location context

    We are also loading images, (like favicon.ico), these will also redirect to index.php. Side effect, this causes the CSRF to be regenerated in the session.

    opened by MarcHagen 1
  • Fix: Resolve AAAA record from hostname

    Fix: Resolve AAAA record from hostname

    Fixes an issue with IPv6 tests (ping6/mtr6/traceroute6) when you use hostnames.

    AAAA records were looked up correctly, but weren't extracted properly from the response given by dns_get_record() and would always fail if you specified a hostname.

    opened by Decicus 1
Releases(1.1.2)
  • 1.1.2(Jan 5, 2023)

    What's Changed

    • Update config.php as const LG_CUSTOM_HEAD was missing by @deliciousbob in https://github.com/hybula/lookingglass/pull/10
    • Release 1.1.2 by @dqos in https://github.com/hybula/lookingglass/pull/11

    New Contributors

    • @deliciousbob made their first contribution in https://github.com/hybula/lookingglass/pull/10

    Full Changelog: https://github.com/hybula/lookingglass/compare/1.1.1...1.1.2

    Source code(tar.gz)
    Source code(zip)
  • 1.1.1(Dec 27, 2022)

    What's Changed

    • Fix ipv6 issues by @kimma in https://github.com/hybula/lookingglass/pull/8
    • Move bugfix into production by @dqos in https://github.com/hybula/lookingglass/pull/9

    New Contributors

    • @kimma made their first contribution in https://github.com/hybula/lookingglass/pull/8

    Full Changelog: https://github.com/hybula/lookingglass/compare/1.1.0...1.1.1

    Source code(tar.gz)
    Source code(zip)
  • 1.1.0(Nov 23, 2022)

    What's Changed

    • Move root out of location context by @MarcHagen in https://github.com/hybula/lookingglass/pull/5
    • Live MTR output by @MarcHagen in https://github.com/hybula/lookingglass/pull/6
    • Release 1.1.0 by @dqos in https://github.com/hybula/lookingglass/pull/7

    New Contributors

    • @MarcHagen made their first contribution in https://github.com/hybula/lookingglass/pull/5

    Full Changelog: https://github.com/hybula/lookingglass/compare/1.0.1...1.1.0

    Source code(tar.gz)
    Source code(zip)
  • 1.0.1(Apr 19, 2022)

  • 1.0.0(Apr 14, 2022)

  • 0.1.0(Jan 17, 2022)

Open source ERP software. Built on modern PHP and bootstrap 4. Easy and powerful.

FacturaScripts Open source ERP software. Built on modern PHP and bootstrap 4. Easy and powerful. Install Clone and deploy with composer and npm (compo

Carlos Garcia 313 Jan 4, 2023
A great looking and easy-to-use photo-management-system you can run on your server, to manage and share photos.

Lychee A great looking and easy-to-use photo-management-system. Since the 1st of April 2018 this project has moved to it's own Organisation (https://g

Tobias Reich 6.2k Jan 5, 2023
AdoteUm.Dev has the proposal to connect people who are looking for developers for their projects

AdoteUm.Dev has the proposal to connect people who are looking for developers for their projects. AdoteUmDev is a web application, developed in PHP language and the Laravel Framework.

Beer And Code 101 Oct 19, 2022
Project of Simple Blog using: HTML, CSS, PHP, MYSQL, and BOOTSTRAP

Project-Stormwind Project of Simple Blog using: HTML, CSS, PHP, MYSQL, and BOOTSTRAP Functions : A personal blog about Blizzard and their work Main Th

Jan Andrzejewski 2 Aug 24, 2022
A simple todo app, built with bootstrap, php native, mysql

A simple todo app, built with bootstrap, php native, mysql

Muhammad Fatkurozi 1 Apr 3, 2022
Laravel Angular Time Tracker is a simple time tracking application built on Laravel 5.2, Angular 2, and Bootstrap 3.

Laravel 5.2, Angular 2, and Bootstrap 3.3.* Time Tracker Laravel Angular Time Tracker is a simple time tracking application built on Laravel 5.2, Angu

Jeremy Kenedy 25 Oct 11, 2022
Modern, Crazy Fast, Ridiculously Easy and Amazingly Powerful Flat-File CMS powered by PHP, Markdown, Twig, and Symfony

Grav Grav is a Fast, Simple, and Flexible, file-based Web-platform. There is Zero installation required. Just extract the ZIP archive, and you are alr

Grav 13.6k Dec 24, 2022
UserFrosting is a secure, modern user management system written in PHP and built on top of the Slim Microframework, Twig templating engine, and Eloquent ORM.

UserFrosting 4.6 Branch Version Build Coverage Style master hotfix develop https://www.userfrosting.com If you simply want to show that you like this

UserFrosting 1.6k Jan 1, 2023
Dolibarr ERP & CRM is a modern software package that helps manage your organization's activity (contacts, suppliers, invoices, orders, stocks, agenda…).

Dolibarr ERP CRM is a modern software package to manage your company or foundation activity (contacts, suppliers, invoices, orders, stocks, agenda, accounting, ...). It is open source software written in PHP and designed for small and medium businesses, foundations and freelancers. You can freely install, use and distribute it as a standalone application or as a web application to use it from every internet access and media.

Dolibarr ERP & CRM 3.7k Jan 7, 2023
Complete Login and Registration system using HTML, CSS, JAVASCRIPT, BOOTSTRAP, PHP and MYSQL

Complete Login and Registration system using HTML, CSS, JAVASCRIPT, BOOTSTRAP, PHP and MYSQL

JehanKandy 11 Jul 13, 2022
Complete Login and Registration System with HTML CSS Bootstrap PHP and MYSQL

Complete-Login-and-Registration-System Complete Login and Registration System with HTML CSS Bootstrap PHP and MYSQL for .sql file run xampp server ope

JehanKandy 10 Jul 13, 2022
Frontend repository of libreoupas project, mostly written in PHP and JavaScript, using Bootstrap for responsivity.

libreoupas Description libreoupas est un site Internet permettant aux étudiant de la Faculté des Sciences et Technologies de Vandoeuvre-Lès-Nancy d'av

Clément Colné 4 Jan 6, 2022
Multilingual PHP CMS built with Laravel and bootstrap

Lavalite This is an open source of Content Management System developed with Laravel framework. Documentation Visit Documentation section in the websit

LavaLite 2.6k Dec 26, 2022
Um modelo de loja virtual utilizando HTML, CSS, JS, Bootstrap e PHP, utilizando ferramentas de edição de texto (VS Code), Edição de imagens (Adobe photoshop) e de vetorização (Adobe Illustrator).

Loja virtual fictícia Um modelo de loja virtual utilizando HTML, CSS, JS, Bootstrap e PHP, utilizando ferramentas de edição de texto (VS Code), Edição

Emily Leme 2 Sep 8, 2021
Desarrollo de una aplicación muy sencilla, desarrollada con HTML - Bootstrap - PHP - (PDO)- Mysql. (Login - Registro - Create Read Update Delete)

php-mysql-aplicacion-web Desarrollo de una aplicación muy sencilla, desarrollada con HTML - Bootstrap - PHP - (PDO)- Mysql. (Login - Registro - Create

Ángel Daniel Fuentes Segura 4 Sep 18, 2022
Aplikasi Point of Sale berbasis website menggunakan PHP native, Vanila Javascript , Bootstrap 5, Datatables dan MySQL

POS adalah sebuah aplikasi point of sale berbasis website yang dibangun menggunakan tech stack JS - PHP - MySQL.

Oka R. Abdillah 2 Feb 12, 2022
A powerful open source Laravel Blog with WYSWYG and CRUD (Create Read Update Delete) built on Laravel 5.8 and Bootstrap 4

Larablog A powerful open source Laravel Blog with WYSWYG and CRUD (Create Read Update Delete) built on Laravel 5.8 and Bootstrap 4 Table of contents F

Jeremy Kenedy 144 Oct 11, 2022
BraincraftedBootstrapBundle integrates Bootstrap into Symfony2 by providing templates, Twig extensions, services and commands.

BraincraftedBootstrapBundle BraincraftedBootstrapBundle helps you integrate Bootstrap in your Symfony2 project. BootstrapBundle also supports the offi

Braincrafted 403 Aug 13, 2022
This is a web application for management of employees. This was done with the stack - HTML, CSS, BOOTSTRAP, VUEJS AND LARAVEL

About Laravel Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experie

igudy 2 Dec 24, 2021