- Also, what set off my rebuild of /login and /register was a bookmarklet I made to do the /login user pw
on the chat server automatically. I can make 3-4 and have 3-4 users in 3-4 different tabs log in, one at
a time, naturally, for debugging purposes. Once I fix the dang /register command.
- Go through with mod 3 in my Automate Security Tasks today.
- Also finished off exercises for first 4 sections of part1 on Intro to Programming on mooc.fi, a free
course at the University of Helsinki.
I am at 67% exercises done with 67% points on https://programming-26.mooc.fi/part-1/4-arithmetic-operations
- Banged hard on the /login /register parts of my chat server. Meta AI impressed upon me that having it
showing the pw in plaintext in the ws logs (okay, only shows in your browser for your login but hey) was
a bad idea. /register was doing the same thing, so now i have to fork those commands off, at least the
/register one and instead of storing it in the cms3 tables, i need to store the data in chat server's
tables, and bcrypt the hashed value it sends.
- i messed up the async/await sections and was only getting an empty password from the form. Having jquery
compose and send the data part didn't help but getting async and await keywords works wonders lol!!!!
- i did remove the wss port from public firewall zone before tearing this apart. maybe by tomorrow...
- Got some new css for posts on main page, including note about chat being down/firewalled...
- Need to take the allpages snippet off that page and leave it for sitemap since I have to scroll down
otherwise. No extra work, amiright?
I can see the draw of just 3-4 buttons at the top of a mobile page, now.
- I don't often remember to make a note of it, but got updates run on gohacker, victory, and laptop
just now this morning (4:06am CDT) Weather says 67F out but AC is running inside...
- Will finish mod 3 tomorrow, barring any internet/power outage
-
- Starting mod 3 in Automate Security Tasks. Wow we can .upper() or .lower() strings, How F'ing fancy
is that?! LOL, yup another SCARcastic day.
- Strings are an ordered and iterable data type. You can use the + symbol on them but not the - symbol
- What would a function like minus(string1,string2) do after all? Convert to int/float and subtract?
Or convert to list then to set and difference out the second string's characters?
- I've been brainstorming some lan or heavily firewalled version of video chat based on /sendcam and /recvcam
It does require an https url, so maybe I'll start with my desktop, victory.gohacker.info and see...
Think: video walkie talkies.
- Watched coding streamers on twitch.tv
- Recharged phone
- added a stop cam button to my /rec page
I really should add a way to track the videos uploaded there, maybe in localstorage...
- Added simple demo of starting/stopping webcam at Show-Cam
- Pondering something like a dating site but using short video clips instead of pics...
- Almost boring after recording video on /rec but /sendcam -> /recvcam works too
- Finished mod 2 in Automate Cybersecurity.
- Studied Automate Cybersecurity Tasks with Python - almost done with mod 2 now.
- Back to working on my webcam remote control button for new-dash-viewer-page
Video window there is draggable. The load and log windows aren't, debating making the log windows
draggable too.
- Getting 40 updated packages on Victory, reboot incoming in about 5 min.
- Need to update my i3 config to feh --bg-center black.jpg when it starts up, maybe a cronjob
to set a new pic occasionally... Need a good source of background pics
- Slight diversion with Gemini into getting Video recording from user camera working - plugged into my jq_this
jquery upload handler in the cms and voila (after a minor caching glitch) it works lol, webm format but hey.
I really don't want to lag my server with converting a bunch of test videos...
- Studied Cybersecurity with Python - ten ways to print... *slow*
- Had nice visit with Arielle and her new bf when they came over today.
- Hit a 14-week streak on Coursera this morning. Think my longest was a 21-week streak ruined by a multi day power outage.
- Studied on coursera
- Added a cam window to my new-dash-viewer-page
I did have a slight bug, re-using id="b1" for the 'bigger' button and the button that started the video. Fixed it.
Also made position: absolute; for the video window which is draggable using jqueryui's draggable module.
Video and monitoring is still on firewalled websocket ports 8765 and 8888
Chat is up in its own page on port 8766, open to the world, heavily logged.
- I grepped thru journalctl output looking for any sign of bots hitting my ssh port but since I put ssh on
the zone called internal, no bots can get thru. =) bliss
- Back to studying on coursea after 5am this morning.
- Finished off mod 1 and 100% on graded assignment in one try. Trivial easy.
- The rain my knees/hips have been forewarning me of arrived this morning, lots of rain.
- Dug into my backup drive looking for That email from 25yrs ago today. Found and posted that email on FB.
- Posted on IG a reformat (gif->png) of a render I made of a 3D maze cube from Nov 2000
- Rest day #2 from coursera
- Got two loads of laundry done lol
- Fetched the trash can after it was emptied by the trash guys
- Relaxed, watched TV, nothing else really useful.
[DONE Sep 11th]- Make the logs button and log divs disappear when clicked off. Right now it stops sending logs but the
viewer doesn't remove the elements from the page like it does for load graphs.
- Got a tail on two logs producing from same script. Got the protocol implemented for logs producer in
hub.py and in my current viewer page, new-dash-viewer-page
- Rest day #1 from coursera.
[DONE] - going to try and combine multiple log tails into one logs-producer, two error logs and two access logs
just for Apache alone on gohacker.info...
- 3rd day of Cybersecurity class (python bits are going glacially, like during a new freeze)
- Today was 5th day of my study week, so I have tomorrow and thursday to fiddle with my monitoring stuff
- Got a good version of the send mpeg-ts bash script converted to python
- Fixed an issue with the microphone reading as mono so I had wrong hw: numbers. Went thru a ton
of diagnostic commands with Gemini to find the solution: -ac 1 and -ac 2 at the end before url
to make it take mono audio input and duplicate it to stereo in the output stream. audio working!
Link to convo on Gemini
- Gemini gave me this code to use with websockets and asyncio (I want to receive start/stop commands from hub
and to send on the output of the ffmpeg streaming as a message to parse into some graphs)
import asyncio
async def run_continuous_command():
process = await asyncio.create_subprocess_exec(
"ping", "gohacker.info",
stdout=asyncio.subprocess.PIPE,
stderr=asyncio.subprocess.STDOUT
)
# Read output asynchronously as lines arrive
async for line in process.stdout:
print(line.decode().strip())
await process.wait()
asyncio.run(run_continuous_command())
- Note that Gemini remembered that I use websockets and my domain name is gohacker.info, which I didn't
remind it of today.
- 2nd day of Cybersecurity class (python course#6 of it)
- Changed course of study to Google Cybersecurity Professional Certificate instead.
I really am not into data analytics or business intelligence I find lol.
- Changed course of study to Google Data Analytics Professional Certificate
[DONE] - Fixed authentication for my file upload form. It was allowing anyone to upload.
-
- Friday, so back to studying Business Intelligence on Coursera.
3rd day of BI (my mondays start on Fridays, also the day I now take my 0.25mg dose of Ozempic.
- Need to add buttons/msgs/etc for logs, chat, and webcam on/off to viewer & hub. [TODO]
- Need a graph for network traffic in/out from a producer too [TODO]
- Publish current system under ~user/improved-hub to Github once logs and chat at least are usable on
new-dash-viewer-page (need to back those up regularly otherwise, ~user/improved-hub + new-dash-viewer-page)
- Successfully modified hub.py to turn load monitor feeds on/off based on signals from viewer.
- Buttons on viewer show what's available. CLicking them turns on the load feed and turns the
button green. Clicking again, turns the load graph back off, pauses load messages from hub.py
and sets the button color to gray again. No AI assistance, but I did fix at least one AI generated
bug in that code section of hub.py, plus of course, my own logic error. consuming is now a dict of lists.
- Internet was offline when I first woke up. It came back up in the last hour. Got code under ~user
- all backed up plus current cms3.pm and cms3 directory. Now I need to pgdump my cms3 table - should be
- able to leave the one for chat server alone, not much goes in that that doesn't get rebuilt easily.
- Lost most of today due to internet outage. Meant to back up my code/pages/etc from server
- but didn't and when I was about to go to bed at 10pm, i noticed it had come back on. I figured
- it would be on when I woke up...
[DONE] - 3rd day of BI
[DONE-Sept3] - Fix disconnect bug in the on/off function for load monitor - consuming set gets overwritten
needs to be specified as a dict of lists of what viewers are consuming which server-svc...
[DONE] - 2nd day of studying Business Intelligence class.
[DONE] - Remove works on new-dash-viewer-page now but has a bug where a 2nd viewer looking at the same load graph
disables traffic of load data to the 1st viewer (upon removing/re-adding it too)
[DONE] - Implemented pause command in hub.py
[DONE] - Got on/off buttons generating correctly. CSS adjusted. [noon to 2pm: Aug 30th]
[DONE] - Make the button go green when clicked to give feedback for on/off status.
[DONE] - id="server-svc" would be good differentiator
[DONE] - maybe set to green background while running
[DONE] - need a message when a producer closes to remove the button and load graph if present - keep load data
as long as viewer tab is constant, it saves the load data it rcvd in load_pts[server]
- need to deque load data lol
- Had an idea for a dash with lots of graphs. Display just load graph icon, log icon, network traffic icon
- When each is pressed, it shows a row of buttons for each server that has those available, green for on
- and displays the graph for them
- When another icon is pressed, the graphs for that type display, allowing for a lot more info.
[DONE 9:30am] - hub is now processing sendme messages from viewer correctly to turn on load messages
- manually setup buttons for 3 load producers on viewer and they each activate a load window when pressed
- reseting viewer tab no longer throws all kinds of errors - fixed cleanup when socket closes
Watched TinyToxicTofu streaming physics and the Nancy Grace Roman telescope launch for about 90 minutes this morning.[5am-6:30am]
Started the Google Business Intelligence Certificate today.
Added a little logging of slash commands in new-server.py for chat. /login, /register, /lookup, /oldmsgs Finished off last of course 6 for Data Analytics with Python on Coursera today.
[TODO] add an edit snippet to cms3 - it should give ?edit if logged in, or /api/login if correct IP but not logged in
- i should separate TODO's by topic/subject. cms3 vs load-page etc
getting a better notes/blog/blurbs system working should be a todo too, once i have on/off buttons working end to end
on my load-page (needs a controller for webcam too, so i can turn it on/off from webpage, versus starting and stopping
the bash script with LONG ffmpeg command) lol
Started editing this page before 7:45am
Finished reading exemplar to today's lab at 10:15am
Rewriting my viewer-page and producers and hub to make it a little less pre-formatted and more dynamic. Producers will send a message like {"type": "load", "server": "gohacker.info", "load1": "0.07"} after the producer first sends a hello message and gets a sendme message back. Also a pause message will keep the hub from sending data and will make it shut off the producers data for any data-stream that has no viewers that want to see it.
{"type": "hello", "server": "gohacker.info", "provides": ['load','http log','https log','etc'] } # from producer
- Producer8888 sending hellos correctly now. [DONE Aug 27]
- Hub needs to pass on to viewers. [DONE Aug 27]
- also hub needs to send available message for all producers when a viewer connects [DONE Aug 27]
Hub now forwards the hellos it got, removing them when viewer/producer disconnects
- Test a 2nd/3rd producer to verify they get hellos correctly too. [DONE Aug 27]
- renaming this producer to producer8888.py since it and the improved hub run on port 8888 [DONE Aug 27 8:34am]
- Fixed minor bug with producer restarting resulting in duplicate hello messages keyed
to the no longer valid websocket
- Another bug, producers shouldn't see hello's from other producers. Fixed. [DONE Aug 27 8:51am]
- Hub needs a rehi message to get the hello messages from producers since they no longer [DONE Fixed this by
crash when the hub is changed/restarted resending hello_list
when viewer resets]
- Unless the producers get into a timeout and then reconnect loop, they won't reconnect.
- started them off in paused=False mode instead and they immediately notice nothing is going
thru =) [DONE Aug 27 10:14am]
[DONE] - have viewer send a sendme message to start getting data
[DONE] - have hub track which viewer is consuming before sending them the data.
[BREAK 10:15am]
[BACK 10:30am] - read about jquery mobile and media queries - added mq480 page
- changed it to 400px as my iphone shows about 360 - thus a white background on it
[DONE] - hub has to parse messages between types: load,hello,sendme
[TODO] - hub needs to deque up to N messages so restarting will display recent load data
- deque docs
Hub starts
Producer starts -> sends hello to hub, hub forwards to any connected Viewers
-> connected viewers add a button to unpause/show this producer's services
Viewer starts -> hub sends initial msg with services of connected producers
Viewer sends sendme msg -> hub, hub unpauses producer if paused, other wise adds viewer to list of actively viewing viewers for that svc.
Viewer only gets msgs from producer it has requested, can pause them at any time.
{"type": "sendme", "server": "gohacker.info", "streams": ['load','http log'] } # from viewer to get load/log
{"type": "pause", "server": "gohacker.info", "streams": ['load'] } # from hub->producer pause load
# also sent from viewer->hub to pause a stream
{"type": "disconnected", "server": "gohacker.info" } # notice from hub->viewer when producer dies
{"type": "shutdown" } # notice from hub->producer to shut it off
# also what viewer sends to shutdown hub&producers
# if authenticated or just pause all for that
# viewer otherwise
Like the constructors that build the load graph I need to make controls for each producer and the streams it provides
Hub has to keep track of who is providing what and which viewer is consuming each stream from each producer.
Added a note when i moved this note to its own page so I didn't have to go thru and see when I added it to that log/load page lol The data is there, i keep the timestamp for each version of a page's creation and an active True/False field in the pages table...