-
5 votes
-
r/Apple is legit?
I am a constant lurker in the Apple subreddit but I always wondered if people defend the company so much because they really are rabid fans or are they shills? Don't get me wrong, I know that some...
I am a constant lurker in the Apple subreddit but I always wondered if people defend the company so much because they really are rabid fans or are they shills?
Don't get me wrong, I know that some people there can be really critical of Apple but it is still surprising to me the attitude of some of its users.
15 votes -
Kanye West says Pardison Fontaine wrote the verses on “Violent Crimes”
7 votes -
What's your favorite online music streaming platform?
There are loads of music streaming platforms to choose from and I'm curious why you decide to use your current one. I see most people use Apple Music and Spotify but other platforms seem...
There are loads of music streaming platforms to choose from and I'm curious why you decide to use your current one.
I see most people use Apple Music and Spotify but other platforms seem convincing like Google Play Music, Deezer, or Pandora.
24 votes -
To Create An Evolvable API, Stop Thinking About URLs
5 votes -
In France, the Force is strong with lightsaber dueling
6 votes -
Former President Abdulla Yameen Abdul Gayyoom has been taken to Maafushi Prison, in accordance to Criminal Court's orders
6 votes -
Five Melbourne councils forced to dump recycling in landfill as Victoria crisis deepens
5 votes -
Nauru bans 'telemedicine' for medical transfers in threat to new Australian laws
5 votes -
Huawei cloning Apple parts, rewarding employees for tech theft
9 votes -
gen:LOCK - New show by Rooster Teeth
9 votes -
Confusion over medicine names threatens lives
5 votes -
What happens when techno-utopians actually run a country
11 votes -
Joshua Lee Turner - Rockaway (2019)
5 votes -
I just discovered Steam
I know I'm late to the party, but do you have any recommendations, hidden gems? What's your favorite lately? I've played most of the big games on console, so I would be looking for something that...
I know I'm late to the party, but do you have any recommendations, hidden gems? What's your favorite lately?
I've played most of the big games on console, so I would be looking for something that isn't on PS/Xbox.
Thanks!
Edit: I usually like puzzly games such as Limbo, Inside, Little Nightmares or story-driven epics like RDR2, God of War.
36 votes -
A $300 billion business tax break meant to raise wages is instead helping companies replace workers with machines, study says
18 votes -
The 'nightmare' California flood more dangerous than a huge earthquake
11 votes -
In North Carolina, investigators find ballot ‘scheme’ in House race
11 votes -
STW x citizenM: Homegrown London- Zakia B2b Bryce's Brother (2019)
3 votes -
Roger Stone posted a picture of the US federal judge on his case with crosshairs
10 votes -
Facebook charged with misleading users on health data visibility
8 votes -
Emoji are showing up in court cases exponentially, and courts aren’t prepared
24 votes -
"Insectageddon" is a great story. But what are the facts?
13 votes -
When adventurers crave “untouched” places and “authentic” peoples, it’s the locals who ultimately pay
11 votes -
The state of BioWare - With a project over six years in the making, the storied game studio enters a new era
8 votes -
Feelings, Rendered Material
6 votes -
A deep dive on the recent widespread DNS hijacking attacks
8 votes -
Loneliness as an evolutionary adaptation
4 votes -
After years of inaction, Delta teacher shortage reaches ‘crisis’ levels
11 votes -
Philip Nelson sets new bar for Patrick Mahomes with AAF no-look pass
4 votes -
Is the phrase “patent troll” defamatory? New Hampshire Supreme Court may decide.
8 votes -
"The Punisher" & "Jessica Jones" Canceled by Netflix; 3rd season of Jessica Jones will still air
13 votes -
syntax highlight test
<?php // Variables $username = 'your_username'; $password = 'your_password_super_long_and_unique'; $filename = 'path_to_private_folder/vnc/pin.txt'; // Process the login form if($action ==...
<?php // Variables $username = 'your_username'; $password = 'your_password_super_long_and_unique'; $filename = 'path_to_private_folder/vnc/pin.txt'; // Process the login form if($action == 'Login'){ $file = fopen($filename,'w'); $passwd = rand(100000,999999); fwrite($file,$passwd); fclose($file); exit('Success'); } // Process the bash script if($action == 'bash'){ if(file_exists($filename)){ $file = fopen($filename,'r'); $passwd = fread($file,filesize($filename)); fclose($filename); unlink($filename); exit($passwd); } else { exit('No_PIN'); } } ?>1 vote -
Two-factor authentication for home VNC via Signal
For my particular use case I share my home PC with my spouse and since I'm the more tech-savvy of the two I'll need to occasionally remote in and help out with some random task. They know enough...
For my particular use case I share my home PC with my spouse and since I'm the more tech-savvy of the two I'll need to occasionally remote in and help out with some random task. They know enough that the issue will usually be too complex to simply guide over the phone, so remote control it is.
I'm also trying to improve my personal efforts toward privacy and security. To that end I want to avoid closed-source services such as TeamViewer where a breach on their end could compromise my system.
The following is the current state of what I'm now using as I think others may benefit from this as well:
Setup
Web
I use a simple web form as my first authentication. It's just a username and password, but it does require a web host that supports server side code such as PHP. In my case I just created a blank page with nothing other than the form and when successful the page generates a 6 digit PIN and saves it to a text file in a private folder (so no one can simply navigate to it and get the PIN).
I went the text file route because my current hosting plan only allows 1 database and I didn't want to add yet another random table just for this 1 value.
Router
To connect to my home PC I needed to forward a port from my router. I'm going to use VNC as it lets me see what is currently shown on the monitor and work with someone already there so I forward port 5900 as VNC's default port. You can customize this if you want. Some routers allow you to SSH into their system and make changes that way so a step more secure would be to leave the port forward disabled and only enable it once a successful login from the web form is disabled. In my case I'll just leave the port forwarded all the time.
IP Address
To connect to my computer I need to know it's external IP address and for this I use FreeDNS from Afraid.org. My router has dynamic DNS support for them already included so it was easy to plug in my details to generate a URL which will always point to my home PC (well, as long as my router properly sends them my latest IP address). If your router doesn't support the dynamic DNS you choose many also allow either a download or the settings you would need to script your own to keep your IP address up to date with their service.
Signal
Signal is an end-to-end encrypted messenger which supports text, media, phone and video calls. There's also a nifty command line option on Github called Signal-cli which I'm using to provide my second form of authentication. I just downloaded the package, moved to my $PATH (in my case /usr/local/bin) and set it up as described on their README. In my case I have both a normal cell phone number and another number provided by Google Voice. I already use my normal cell phone number with Signal so for this project I used Signal-cli to register a new account using my Google Voice number.
VNC
My home PC runs Ubuntu 18.04 so I'm using x11vnc as my VNC server. Since I'm leaving my port forwarded all the time I most certainly do NOT want to leave VNC also running. That's too large a security risk for me. Instead I've written a short bash script that first checks the web form using curl and https (so it's encrypted) with its own login information to check if any PIN numbers have been saved. If a PIN is found the web server sends that back and then deletes the PIN text file. Meanwhile the bash script uses the PIN to start a VNC session with that PIN as the password and also sends my normal cell the PIN via Signal-cli so that I can login.
I have this script set to run every minute so I'm not waiting long after web login and I also have the x11vnc session set to timeout after a minute so I can quickly connect again should I mess something up. It's also important that x11vnc is set to auto exit after closing the session so that it's not left up for an attacker to attempt to abuse.
System Flow
Once everything is setup and working this is what it's like for me to connect to my home PC:
- Browse to my web form and login
- Close web form and wait for Signal message
- Launch VNC client
- Connect via dynamic DNS address (saved to VNC client)
- Enter PIN code
- Close VNC when done
Code
Here's some snippets to help get you started
PHP for Web Form Processing
<?php // Variables $username = 'your_username'; $password = 'your_password_super_long_and_unique'; $filename = 'path_to_private_folder/vnc/pin.txt'; // Process the login form if($action == 'Login'){ $file = fopen($filename,'w'); $passwd = rand(100000,999999); fwrite($file,$passwd); fclose($file); exit('Success'); } // Process the bash script if($action == 'bash'){ if(file_exists($filename)){ $file = fopen($filename,'r'); $passwd = fread($file,filesize($filename)); fclose($filename); unlink($filename); exit($passwd); } else { exit('No_PIN'); } } ?>Bash for x11vnc and Signal-cli
# See if x11vnc access has been requested status=$(curl -s -d "u=your_username&p=your_password_super_long_and_unique&a=bash" https://vnc_web_form.com) # Exit if nothing has been requested if [ "$status" = "No_PIN" ]; then # No PIN so exit; log the event if you want exit 0 fi # Strip non-numeric characters num="${status//[!0-9]/}" # See if they still match (prevent error messages from triggering stuff) if [ $status != $num ]; then # They don't match so probably not a PIN - exit; log it if you want exit 1 fi # Validate pin number num=$((num + 0)) if [ $num -lt 100000 ]; then # PIN wasn't 6 digits so something weird is going on - exit; log it if you want exit 1 fi if [ $num -gt 999999 ]; then # Same as before exit 1 fi # Everything is good; start up x11vnc # Log event if you want # Get the current IP address - while dynamic DNS is in place this serves as a backup ip=$(dig +short +timeout=5 myip.opendns.com @resolver1.opendns.com) # Send IP and password via Signal # Note that phone number includes country code # My bash is running as root so I run the command as my local user where I had registered Signal-cli su -c "signal-cli -u +google_voice_number send -m '$num for $ip' +normal_cell_number" s3rvant # Status was requested and variable is now the password # this provides a 1 minute window to connect with 1-time password to control main display # again run as local user su -c "x11vnc -timeout 60 -display :0 -passwd $num" s3rvantFinal Thoughts
There are more secure ways to handle this. Some routers support VPN for the connect along with device certificates which are much stronger than a 6 digit PIN code. Dynamically opening and closing the router port as part of the bash script would also be a nice touch. For me this is enough security and is plenty convenient enough to quickly offer tech support (or nab some bash code for articles like this) on the fly.
I'm pretty happy with how Signal-cli has worked out and plan to use it again with my next project (home automation). I'll be sure to post again once I get that ball rolling.
13 votes -
Phish - First Tube (2000)
4 votes -
What is your first-hand experience with the "Dunning–Kruger effect"?
In the field of psychology, the Dunning–Kruger effect is a cognitive bias in which people of low ability have illusory superiority and mistakenly assess their cognitive ability as greater than it...
In the field of psychology, the Dunning–Kruger effect is a cognitive bias in which people of low ability have illusory superiority and mistakenly assess their cognitive ability as greater than it is. The cognitive bias of illusory superiority comes from the inability of low-ability people to recognize their lack of ability. Without the self-awareness of metacognition, low-ability people cannot objectively evaluate their competence or incompetence. (Wikipedia)
Some of my fellow programmers seem to think the world turns around their knowledge as if there was no valid reasoning whatsoever beyond math and computer science. They seem to think logic (a tool with multiple uses which exists since at least 380 BC) is merely an attribute of computer science. It's not uncommon for them to think they can understand the intricacies of every phenomenon under the sun.
I have to control myself to avoid countering each of their flawed arguments. To my own detriment, I'm not always able to do so. I feel surrounded by arrogance and cognitive bias, and have to silence my better judgment in order to avoid constant conflict.
To be clear, I'm not looking for advice, as I already know the "solution", which is no solution. You can't use reason to fight something that is not motivated by reason. I'm posting to know your stories and maybe find some solace in the knowledge that I'm not alone.
Have you ever had to deal directly with people who grossly inflate their own competence, possibly stretching it to an unrelated field? if so, what's your story?
20 votes -
Counting.
Feel free to hop in. Simple counting, multiples of 3.
5 votes -
Florida is drowning. Condos are still being built. Can't humans see the writing on the wall?
18 votes -
The History of Blindfolded Punch-Out | Summoning Salt
11 votes -
Inside the resistance movement opposing Daniel Ortega's Trans-Nicaragua Canal
6 votes -
POLYBIUS - The video game that doesn't exist
11 votes -
LGBTQ Armenians face reign of terror
9 votes -
Australia accuses foreign government of cyber attack on lawmakers
3 votes -
US data privacy bill unites Charles Koch and Big Tech
6 votes -
Farmworker vs Robot: Agricultural workers of the future may soon be made of tech and steel. Can a robot pick a strawberry better, faster, and cheaper than a seasonal farmworker?
5 votes -
Muscle memory discovery ends 'use it or lose it' dogma
11 votes -
Scientists lay out new plan to save the Darling River
6 votes -
Teutoburg Forest 9 AD - Roman-Germanic wars
5 votes -
Indonesian Ulema Council (MUI) urges Muslims to cast votes and avoid "golput"
6 votes -
A TV actor who played Ukraine's president could now become the actual president
8 votes