mike2750 | 2020-06-20 19:31:59 UTC | #1
So I'm pretty geeked been working on this for over a year and it was originally a flat php site which i rewrote from scratch in Python and used PyQt5 fbs and sqlite3 db.
special shoutout @martin tutorials were and still are very helpful. He has also been super helpful when spoken with him.
Got stuck a few times till i learned how to use tuples, threading, and some of the fancier things.
Hoping to launch this out of Beta soon and get funding/licensing in place to continue adding new stuff to it.
This is the tech support equivalent of a mechanics "Obd2 Scanner" and its not even close to where I plan for it to be.
Hopefully this inspires and shows what you can do with pyqt5 in a pretty short time even by yourself.
Luca | 2020-06-22 00:09:18 UTC | #2
Well done @mike2750, great work! :clap:
martin | 2020-06-23 19:58:13 UTC | #3
Hey @mike2750 nice work, really great to see how far it's progressed!
Can you give a bit of background on how you use it? Did you make this to solve an problem for yourself, or are building it as a product?
mike2750 | 2020-06-24 03:18:24 UTC | #4
The original concept was built to help me be able to troubleshoot stuff faster and more efficiently. I then was showing some coworkers after it evolved and I realized the potential it had.
The original way this came about was I had a text file with a hundred or so commands i used frequently which I would do a find/replace on due there being variables in the commands which were based on email address, IP, domain, and usernames and other stuff.
Here is a very basic example.
Search by email address
sudo grep firstname.lastname@example.org /var/log/maillog
Search by IPADDRESS to find which accounts are failing from this IPADDRESS
grep IPADDRESS /var/log/maillog | grep "auth failed"
Email failed login logs
sudo grep email@example.com /var/log/maillog | grep "auth failed"
As a long time Technical support agent and sys admin this was working for me but got really annoying if i botched the text file or forgot to revert back all the placeholders it also was prone to errors due to formatting.
I then ended up making a Flat PHP site https://wizardassistant.app/ which is pretty sweet and functional, but tedious to update and add new commands to as I had to escape all the special chars and stuff on the super advanced commands.
I also was looking to make it easier to use as all these commands get copied and pasted from the site into a terminal anyways so I figured why not have this UI wrapped around a terminal for ease of use.
So I started looking into my options and originally had tried to teamup with some people but they kinda botched it and were using Unity a game engine thing to design it and couldn't get what I wanted done done right due to the limitations of available SSH libraries. It was also pretty fugly.
After about half a year of constantly being roadblocked I was like alright I'm just going to start this over from scratch and originally was torn between nodejs and python. As i wanted to learn Python ended up deciding on that and I ended up settling on PyQT5 framework. Which is how I ended up finding this site and whatnot.
Since then I brought it from that phase of from plaintext find/replace > PHP Static > Python .
Now I am able to rapidly add commands and so will sys admins and corporations based on the OS profiles and limit commands based on user levels/priveleges.
The vast majority of my coworkers all use the app now cause it makes doing stuff so easy.
Typical workflow when troubleshooting a ticket is getting the domain/email address and then checking first it points to our servers and not their previous host(like if they recently signed up but never migrated or pointed DNS to us). That's a common pitfall where if your not paying attention can be trying to diagnose a problem not occurring on our actual platform and be a huge time waste.
The app does a DNS lookup and can parse the domain from URL/email address and does a ton of sanity checks shows all the Nameservers in use and checks for CLoudflare/Sucuri WAF's and tons of other stuff DNS wise like RDNs etc. Typically you'd have to go to like 3-4 different sites to check all those things individually which is a time waste.
I also have ways to customize this on a per company level so it alerts the tech if its not pointing to the companies IP's via ASN lookup of the IP or NS/SOA. There is so many logic checks in the background that make this amazing for technical support agents troubleshooting email/firewall or pretty much any server issues. While the main focus originally was on cPanel I also made it from the start dynamic so I can rapidly customize it by adding OS profiles which setup the log paths variables and command types.
This allows me to be able to use the same grep for HTTP errors on cPanel Apache as I would use on barebones LAMP stack on Ubuntu with the toggle of the OS profile. I built preset profiles based on a bunch of stock Control Panels so its preloaded and those can be cloned and customized for companies which has customized paths or want to add additional commands.
To give you an idea of the power of this. Say you got a reseller triggering modsec rules and being blocked. Typically you'd go looking through the logs for their domain/IP and then try to hunt down the applicable modsec rules.
I literally have based of years of experience troubleshooting these super tedious tickets created epic onliners where I can literally find all the unique modsec rules triggered or counts triggered or even the unique IP's that triggered modsec and firewall blocks for their domain. In the case of the firewall I also have a command that literally checks and unblocks all those IP's.
We have people that use AWS or a service which uses AWS or Google cloud and the IP's varies and you'd be playing whackamole as on each page load it could be using a different IP which might be blocked. I can solve tickets like these which used to take an hour or more sometimes in like 30 secs. Find the rules triggered whitelist them for the user or all the resellers accounts. Then loop through and unblock all the ip's which are blocked for their domains.
This is stuff that even an advanced sys admin would take a long ass time even with the oneliners in evernote to modify each time. With my APP all these amazing oneliners well multiliners lol are able to be modified on the fly safely without and executed rapidly to find/fix most any problem. As I find new ways to identify issues I add more commands.
An excerpt of commands table.
The app also handles all the logic in ensuring when say grepping by a date or datetime the date format is in the right format for the log file. This also makes it easy to deep dive into really complex issues without wading through as much junk.
I probably already said too much about how it works(secret sauce and all), but it is amazing that no ones really done this that I've seen at this level before which is why I plan to sell this to hosting companies and companies that do outsourced tech support for other companies as this will make them be able to do more faster and easier even with less skilled people who may entry level.
I had to build a customized version of an ssh terminal widget as i cannot get it to just embed an external one which I'm still hoping to solve as I want it to be flexible so people can embed their preferred terminal instead of having to use the built in one which while nice is probably not as nice as some peoples customized local terminals.
I built my PyQT5 multi tabbed terminal based off two concepts: https://pypi.org/project/wizardwebssh/
SSH based on this which i had to customize to add ssh-agent support and some other tweaks. https://github.com/huashengdun/webssh
Was the multitabbed PyQt way to embed that was based on @martin Mozarella Ashbrowser
There is still so much more I plan to do with this but that hopefully explains the backstory purpose and the problems it solves. The end goal is for tech support, sys admins, and companies to be able to solve any problem without needing to go to all sorts of different sites which may or may not be working at the time to do a once off test or check. Over time there will be more widgets and tools added and the paid versions will include advanced customization editing for commands and other features.
For more information and the current demo this can be found on the website. https://wizardassistant.com/
I'm not very good with marketing and sales so I'm still getting help with all that while doing minor bug fixes or suggestions people have provided based on the beta testing these last few months. I also use it daily and it almost feels like "cheating" as it makes things so efficient :)
Eolinwen | 2020-06-26 16:30:17 UTC | #5
Great idea to share with us what we can do with Python and PyQt5.
:wink: :smiling_imp: :+1: