Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Subscribe to our newsletter

Advertise on LowEndTalk.com

Latest LowEndBox Offers

    [Source] PHP LookingGlass
    New on LowEndTalk? Please read our 'Community Rules' by clicking on it in the right menu!

    [Source] PHP LookingGlass

    telephonetelephone Member
    edited September 2012 in General

    Hey guys!

    I've just finished my "boredom" project for the week (spare time), and figured I'd give a shout out to LowEndTalk as I know a few people wanted the source for a PHP based looking glass.

    So without further ado, I present LookingGlass:

    • PHP based looking glass
    • Setup takes less than a minute using the included Bash script
    • Long polling (Ajax) to simulate live output of given commands
    • Easily customizable

    Installation instructions and more information can be found on GitHub:
    Stable release: LookingGlass - Stable
    Source: GitHub - LookingGlass
    Demo: LookingGlass

    The demo is currently hosted on a 50MB VPS (Prometeus). 502 errors may occur in events of high use.

    Anyway, let me know what you think ;)

    «1

    Comments

    • Thanks for sauce

      D4jsp - Where virgins roam free
    • Hot Sauce ;) ... Clean look - Thanks!

      LiquidLayer.net - Shared ZFS SSD Cluster | US UK AU BG and Finland

      • [MailEdge] - [TheSpamBusters] | Spam Filtering
    • SimpleNodeSimpleNode Member, Provider

      I...AM...TELEPHONE!

      SimpleNode | VPS Hosting | KVM and OpenVZ | Dallas, TX | PayPal and Bitcoin accepted

    • jarjar Provider

      Nicely done. Going to be using this :)

      HB | Block AS9009 (M247) for unfiltered abuse and ignoring abuse complaints

    • nunimnunim Member
      edited September 2012

      Looks very very similar to mine how the information is displayed, but I guess there's only so many ways to build a looking glass with php, the live results are neat though.

      SonicBoxes.com - VPS Tips, Tricks & Tutorials
      6UA.net Various tools, screenshots, password gen, looking glass, etc..

    • @SimpleNode said: I...AM...TELEPHONE!

      You can thank the 99cent promo for that :)

      @nunim said: Looks very very similar to mine how the information is displayed, but I guess there's only so many ways to build a looking glass with php, the live results are neat though.

      And yours looks "very very similar" to @William's :p
      I used a Bootstrap theme from an old project and went from there.

      Just to be knit-picky "...only so many ways to build a looking glass with php".
      There's actually quite a few ways: exec(), popen(), proc_open(), shell_exec(), and system(). (There's actually even more...)

      Anyway, feel free to use any of the code for your project.

    • Just a thought, maybe someone could toss all the Looking Glasses on the Wiki?

    • SimpleNodeSimpleNode Member, Provider

      Incero Dallas.
      http://beryllium.node.simpleno.de/lg/

      MTR and Host don't work (I know Host doesn't work as it isn't installed, but MTR is installed)

      SimpleNode | VPS Hosting | KVM and OpenVZ | Dallas, TX | PayPal and Bitcoin accepted

    • Would install, but I don't own a dedi so I don't see a purpose. :P

      Shane Elmore | Programmer In Progress

    • @SimpleNode

      Did you run configure.sh? configure.sh is setup to install the needed commands via apt-get or yum. (Unless you're on a distro that doesn't use those two).

      Can you run an mtr report via terminal? (mtr --report google.com)

    • SimpleNodeSimpleNode Member, Provider

      @telephone Yes, I did run it. It didn't install Host because the package was not found.

      I'll go do the mtr report now.

      SimpleNode | VPS Hosting | KVM and OpenVZ | Dallas, TX | PayPal and Bitcoin accepted

    • SimpleNodeSimpleNode Member, Provider
      edited September 2012

      [[email protected] ~]# mtr --report iamtelephone.com

      HOST: beryllium.node.simpleno.de Loss% Snt Last Avg Best Wrst StDev
      1. 23.29.124.225 0.0% 10 1.9 2.0 1.9 2.5 0.2
      2. 23.29.112.73 0.0% 10 3.8 2.1 0.7 4.7 1.5
      3. incero.corexchange.com 0.0% 10 0.3 0.3 0.3 0.4 0.0
      4. tengigabitethernet2-2.asr1.d 0.0% 10 0.5 17.9 0.5 132.4 41.1
      5. xe-8-1-1.dal33.ip4.tinet.net 0.0% 10 0.5 1.2 0.5 7.8 2.3
      6. xe-4-0-0.lon11.ip4.tinet.net 0.0% 10 107.7 109.3 107.6 117.8 3.6
      7. connect4london-gw.lon10.ip4. 0.0% 10 107.8 109.0 107.8 114.2 2.5
      8. kusanagi-ringo.c4l.co.uk 0.0% 10 107.9 108.4 107.8 112.2 1.4
      9. ringo-cg4.c4l.co.uk 0.0% 10 110.9 117.9 110.8 177.9 21.1
      10. 109.104.117.26 0.0% 10 110.9 111.1 110.9 112.3 0.4
      11. point.cloud.atechmedia.net 10.0% 10 111.2 111.2 111.1 111.3 0.1

      So... it works.

      SimpleNode | VPS Hosting | KVM and OpenVZ | Dallas, TX | PayPal and Bitcoin accepted

    • SimpleNodeSimpleNode Member, Provider

      http://beryllium.node.simpleno.de/lg/

      Host works now, also new size test files. Thanks to @telephone
      (except MTR is still borked)

      SimpleNode | VPS Hosting | KVM and OpenVZ | Dallas, TX | PayPal and Bitcoin accepted

    • telephonetelephone Member
      edited September 2012

      @SimpleNode said: Yes, I did run it. It didn't install Host because the package was not found.

      Fixed "Host" for CentOS.
      I'm unsure of the error regarding mtr, but I'll investigate into it more.

      EDIT: MTR seems to be bung on CentOS :/ It's returning NULL for some reason. As I mentioned above, I'll look into it more.

    • How is the security? How do you filter user input, can the shell script go rouge?

      Quis custodiet ipsos custodes?
      https://raymii.org - https://cipherli.st
    • @SimpleNode

      I fixed the MTR issue. Download the configure.sh script and run it again :)

      @Raymii

      Security is alright. IP's are validated, and hosts will only have their hostname passed through to the script. Furthermore, the user input is stripped of single quotes, and then run within a pair of single quotes. (Anything that the user inputs will be quoted)

      To all those who have downloaded or forked LookingGlass and are on a RHEL OS, you'll want to re-download/update your fork.

      Thanked by 1emilv
    • SimpleNodeSimpleNode Member, Provider

      @telephone Everything works now :D

      Now, back to bugging Incero for IPv6 ;)

      Thanked by 1jimpop

      SimpleNode | VPS Hosting | KVM and OpenVZ | Dallas, TX | PayPal and Bitcoin accepted

    • fileMEDIAfileMEDIA Member
      edited September 2012

      Nice script, i think we replace this with our old script.
      Thanks!

      ready: http://lg.filemedia.net/

      fileMEDIA - Dedify: German Private Cloud @ https://www.dedify.com - CloudStack+XenServer+SSD

    • nunimnunim Member
      edited September 2012

      @telephone said: Just to be knit-picky "...only so many ways to build a looking glass with php".

      There's actually quite a few ways: exec(), popen(), proc_open(), shell_exec(), and system(). (There's actually even more...)

      It was more the display then backend I was talking about, and yes mine does look similar to William's but not the same.

      SonicBoxes.com - VPS Tips, Tricks & Tutorials
      6UA.net Various tools, screenshots, password gen, looking glass, etc..

    • WintereiseWintereise Member
      edited September 2012

      Telephony, any chance of building a 'network,' where we could perhaps include multiple servers (from different locations, of course)?

      -- BOFH

    • That would be awesome.

    • mikhomikho Member, Provider

      I installed it to test out and found that when entering the sitename, backspace ain't working. It inserts some ^H characters instead.

      Get a LES NAT VPS! (or 10) in United States (3), Germany, Bulgaria, France, Norway, Australia (2), Singapore. | -> 500gb NAT Storage
    • @MikHo said: I installed it to test out and found that when entering the sitename, backspace ain't working. It inserts some ^H characters instead.

      Backspace works fine for me.

    • @MikHo said: I installed it to test out and found that when entering the sitename, backspace ain't working. It inserts some ^H characters instead.

      Simple solution would be not to use backspace ;) Or in your case use Shift+Backspace instead.
      What OS and terminal app are you using?

      @Nick said: Backspace works fine for me.

      Some terminals set backspace to "^H" instead of the normal "^?"... I know on Linux OS's you can simply run "stty erase ^H" to apply a temporary fix.

      @Wintereise said: Telephony, any chance of building a 'network,' where we could perhaps include multiple servers (from different locations, of course)?

      The HTML layout is just bootstrap, so it won't be hard for others to add in their "flavor", but I'll add it to the list.... There's a few other to-dos first.

    • Thank you. I'm using it on my blog now :

      http://www.erawanarifnugroho.com/lg/
    • If networking, I might join. I have a VPS with TheCheapestVPS/YDGH in Dallas. :P

      Shane Elmore | Programmer In Progress

    • mikhomikho Member, Provider

      @telephone
      Debian 6
      Securecrt (windows version)
      Could be the terminal emulation but never seen it before.
      Thought there was some "screening" of keys used/allowed.

      Get a LES NAT VPS! (or 10) in United States (3), Germany, Bulgaria, France, Norway, Australia (2), Singapore. | -> 500gb NAT Storage
    • WilliamWilliam Member, Provider
      edited September 2012

      http://at.edis.at/ :: Graz, Austria
      http://de.edis.at/ :: Frankfurt, Germany
      http://is.edis.at/ :: Hafnarfjordur, Iceland
      http://fr.edis.at/ :: Paris, France
      http://us.edis.at/ :: Chicago, USA
      http://pl.edis.at/ :: Warsaw, Poland
      http://it.edis.at/ :: Milano, Italy
      http://uk.edis.at/ :: London, UK
      http://ch.edis.at/ :: Zurich, Switzerland
      http://se.edis.at/ :: Stockholm, Sweden
      http://hk.edis.at/ :: Kowloon, Hong Kong
      http://es.edis.at/ :: Madrid, Spanien
      http://cl.edis.at/ :: Viña del Mar, Chile

      :)

      Thanked by 1TheHackBox
    • Someone didn't read the license...

    • WilliamWilliam Member, Provider

      I have permission for my modifications from the coder :)

    • @FTN_Nick said: Someone didn't read the license...

      The code is under MIT License. You can do whatever you want with it, just include the copyright in the source code (Don't distribute and claim as your own)... I'll clarify that better in the next release.

      From the README: "Please keep the "Powered by LookingGlass" link intact to promote this script."

      It pretty much boils down to: If you want to support my efforts, then keep the link, but no one is holding a gun to your head.

    • mikhomikho Member, Provider

      @telephone
      I was right about the terminal emulation then :)
      Never seen it before ... theres a first for everything

      Get a LES NAT VPS! (or 10) in United States (3), Germany, Bulgaria, France, Norway, Australia (2), Singapore. | -> 500gb NAT Storage
    • @William, What happened to Transit LG?

      FiberVolt | Quality Los Angeles & Chicago Virtual Servers - http://fibervolt.com

    • Debian 6
      Securecrt (windows version)
      Could be the terminal emulation but never seen it before.
      Thought there was some "screening" of keys used/allowed.

      For secureCRT, in session options under mapped keys, check backspace sends [...] to fix the ^H issues.

      Quis custodiet ipsos custodes?
      https://raymii.org - https://cipherli.st
    • And I always like this:

      raymii.org has address 69.197.183.203
      raymii.org has address 84.200.77.169
      raymii.org has address 84.200.77.168
      raymii.org has address 192.71.245.64
      raymii.org has address 209.141.58.74
      raymii.org has address 205.185.124.11
      raymii.org has address 209.141.58.75
      raymii.org has address 205.185.117.74
      raymii.org has IPv6 address 2001:1608:10:38::f57a:8696
      raymii.org has IPv6 address 2a00:dcc0:eda:88:245:71:6b8:eae1
      raymii.org has IPv6 address 2607:f358:1:fed5:22:0:beb8:953a
      raymii.org has IPv6 address 2607:f358:1:fed5:22:0:8dc7:4fb5
      raymii.org has IPv6 address 2607:f358:1:fed5:22:0:4fd9:ca83
      raymii.org has IPv6 address 2a00:dcc0:eda:88:245:71:5a7a:4ec6
      raymii.org has IPv6 address 2607:f358:1:fed5:22:0:d274:c869
      raymii.org has IPv6 address 2607:f358:1:fed5:22:0:6b58:59f3
      raymii.org has IPv6 address 2607:f358:1:fed5:22:0:3432:4274
      raymii.org has IPv6 address 2607:f358:1:fed5:11:0:1071:3
      raymii.org has IPv6 address 2607:f358:1:fed5:22:0:d562:72e8
      raymii.org has IPv6 address 2607:f358:1:fed5:22:0:7454:5742
      
      Quis custodiet ipsos custodes?
      https://raymii.org - https://cipherli.st
    • @telephone, I love it when programmers use ASCII Art in their code. It should be a standard! :) Have you got your own script or a frequent visitor of a good online one?

      -

    • This is great!

      I threw up a few of my own:

      http://actually.streamlively.com/lg/ - BuyVM SJ
      http://fundamental.streamlively.com/lg/ - DataShack
      http://results.streamlively.com/lg/ - NodeDeploy Phoenix

      "We are in a prison drama. This is like The Shawshank Redemption, only with more tunneling through shit and no fucking redemption."
    • Mark here thanks

    • New Release
      Version: 1.2.0

      New features:

      • Rate limiting
      • Multiple themes

      Download: LookingGlass v1.2.0

      How do I upgrade?

      • Replace the old install with the files in 1.2.0 (unzip -o LookingGlass-1.2.0.zip), then run configure.sh again.

      Themes can be viewed: LookingGlass themes


      @bnmkl I just use Google to find some good ol' ASCII art :)

      Thanked by 1George_Fusioned
    • SimpleNodeSimpleNode Member, Provider

      updated ;)

      SimpleNode | VPS Hosting | KVM and OpenVZ | Dallas, TX | PayPal and Bitcoin accepted

    • SimpleNodeSimpleNode Member, Provider

      Skinned ;)

      Thanked by 1telephone

      SimpleNode | VPS Hosting | KVM and OpenVZ | Dallas, TX | PayPal and Bitcoin accepted

    • Looking amazing, not that theres a lot of difference between 'Cerulean' and 'Spacelab'.

      Will be implementing this soon :D - Though I feel it'll need a touch of theme-magic to make it look flush with the new site.

      imagineLayer - IT solutions backed by outstanding support structure.
      Web: www.imaginelayer.com • Email: [email protected] • Phone: 03719 10 10 11
    • netomxnetomx Member, Moderator

      Can someone explain me the funcionality of this project?

    • edited October 2012

      Love it! :)

      Just updated to v1.2.0, have it running on a 64MB RAM KVM VPS (NL) and a 128MB RAM Xen VPS (DE)

      Following fellow Austrian's (@William) pattern:

      nl.fusioned.net :: Alblasserdam, Netherlands
      de.fusioned.net :: Falkenstein, Germany

      Fusioned | KVM SSD VPS | LSI RAID10 | Netherlands 1Gbps | R1Soft | IPv4 & IPv6 | SolusVM
    • Just remember to install php-pdo for this to work and then restart apache/httpd. By default we don't have pdo installed on our servers and this was causing an issue.

      Thanked by 1ErawanArifNugroho

      ChicagoVPS.net - OpenVZ/Xen Based - SolusVM Control Panel - TUN/PPP/FUSE/SIT/GRE - cPanel/DirectAdmin/Parallels - Chicago/Buffalo/LA Coming Soon! - Great Support!

    • joepie91joepie91 Member, Provider

      @netomx said: Can someone explain me the funcionality of this project?

      It allows you to run a traceroute or ping to basically any IP, from a remote server. It's useful for testing network connectivity to various other locations in the world, for a specific geographic location, datacenter or host.

    • @telephone Everything works but Ping, What do I miss?

    • The ping binary itself, I suspect, @LAKid.

      -- BOFH

    • @Wintereise I thnik my php is wroing, on other vps, it works fine, but this crap one, Ping doesn't work.

    Sign In or Register to comment.