News for hackers. Stuff that matters.
Re:Ask HN: Weirdest hack that you ever saw in production? by mattzito on Saturday March 24, 2018 @09:56PM (#16670214)
In my startup days, we were working on a proof of concept with a really big bank. Because of their security rules, we couldn't have direct access to their systems - so if we wanted to do something remotely, we would have to start a webex, they would join and share their screen, and give us remote control.

This worked great, except if we wanted to work over the weekend, since if we left the screen alone for more than a few minutes, the screen lock would kick in and we'd lose the session.

Our solution? We purchased a small fan with an oscillation mode, and tied a mouse to it. We then had the fan drag the mouse ever so slightly back and forth whenever we wanted to step away from the remote session. Kept it going for weeks.

Re:Ask HN: Weirdest hack that you ever saw in production? by macromaniac on Saturday March 24, 2018 @10:17PM (#16670285)
I use a posh script like this when i dont want the computer to lock.

$ws = New-Object -COM wscript.shell;

while($true){ $ws.SendKeys("j"); Sleep 60;}

Ive used it for demos that way the computer doesnt lock before the demo starts, its pretty short and easy to remember. Also on windows if you spam SendKeys("{Left}") everything you type is backwards and when you hit the windows key it freezes the computer in an interesting way, pretty fun.

Re:Ask HN: Weirdest hack that you ever saw in production? by ghkbrew on Saturday March 24, 2018 @10:31PM (#16670329)
I used to use autohotkey to send an F13 key press every couple minutes to avoid lockout on a work computer where I wasn't allowed to increase the timeout
Re:Ask HN: Weirdest hack that you ever saw in production? by unixhero on Sunday March 25, 2018 @08:59AM (#16671989)
Wait is Function keys above F12 still addressable?
Re:Ask HN: Weirdest hack that you ever saw in production? by colejohnson66 on Sunday March 25, 2018 @09:22AM (#16672053)
It’s Windows, so backwards compatibility mandates F13-F24 exist.
Re:Ask HN: Weirdest hack that you ever saw in production? by striking on Sunday March 25, 2018 @10:25AM (#16672296)
Certainly, my keyboard still has those buttons and I still use them
Re:Ask HN: Weirdest hack that you ever saw in production? by jscholes on Sunday March 25, 2018 @09:40PM (#16675933)
Which keyboard is this? I'm a keyboard-only user and would love to have an extra row of keys for shortcuts.
Re:Ask HN: Weirdest hack that you ever saw in production? by duskwuff on Monday March 26, 2018 @02:54AM (#16677132)
Can't speak for the parent, but Apple USB keyboards have F13-F19.
Re:Ask HN: Weirdest hack that you ever saw in production? by CamTin on Sunday March 25, 2018 @10:30AM (#16672318)
bash/X11 equivalent:

  function mouse_around {
    while true; do
      sleep "$1"
      xdotool mousemove_relative 1 1
      xdotool mousemove_relative -- -1 -1
    done
  }
  
  mouse_around 60
Re:Ask HN: Weirdest hack that you ever saw in production? by krylon on Sunday March 25, 2018 @01:45PM (#16673334)
Mandatory XKCD: https://xkcd.com/196/
Re:Ask HN: Weirdest hack that you ever saw in production? by mars4rp on Sunday March 25, 2018 @03:59AM (#16671244)
The script is overkill, just put some plastic under your mouse.
Re:Ask HN: Weirdest hack that you ever saw in production? by r3vrse on Saturday March 24, 2018 @10:46PM (#16670386)
Try this: http://www.zhornsoftware.co.uk/caffeine/

Use it all the time when working from home/moving around and I don’t want my laptop to lock every 15.

Re:Ask HN: Weirdest hack that you ever saw in production? by sbierwagen on Sunday March 25, 2018 @12:31AM (#16670769)
There's also a hardware solution: https://www.amazon.com/CRU-Inc-30200-0100-0013-CRU-DataPort-...

Or a powered turntable for your mouse, if you can't plug HID devices into your machine! https://www.amazon.com/Liberty-Mouse-Mover/dp/B079P592K8/

Re:Ask HN: Weirdest hack that you ever saw in production? by technofiend on Sunday March 25, 2018 @08:20AM (#16671855)
This seems to be a very common problem as evinced by the many solutions below. A friend of mine asked me solve the problem for him because he was remotely accessing a database and the company-issued laptop, VPN client, remote server and database server all had aggressive timeouts. Getting a cup of coffee meant logging in to everything again using long and complex company-issued passwords.

We used one of the common Raspberry PI Human Interface Device (HID) Python packages to send a harmless keyboard or mouse event once every 5 minutes.

Re:Ask HN: Weirdest hack that you ever saw in production? by monk_e_boy on Saturday March 24, 2018 @10:30PM (#16670323)
On a windows machine you can start a powerpoint presentation, then minimise it. This stops the screen lock from starting.
Re:Ask HN: Weirdest hack that you ever saw in production? by uptown on Sunday March 25, 2018 @12:13AM (#16670714)
I’ve used a blank no-audio video in Windows Media Player to achieve the same.
Re:Ask HN: Weirdest hack that you ever saw in production? by realusername on Saturday March 24, 2018 @10:21PM (#16670297)
I've seen people strapping a watch on the back of the mouse to achieve the same effect, the constant ticking makes it like the mouse is slightly moved, preventing a screen lock.
Re:Ask HN: Weirdest hack that you ever saw in production? by eckza on Saturday March 24, 2018 @10:17PM (#16670284)
Similar situation, except with a personal massager, a wireless mouse, and a large bowl.
Re:Ask HN: Weirdest hack that you ever saw in production? by r00fus on Sunday March 25, 2018 @01:17AM (#16670885)
There's also this [1] I found when I had to opt out of a crazy work-enforced screen lock timer. (like 3m)

[1] https://archive.codeplex.com/?p=mousejiggler

Re:Ask HN: Weirdest hack that you ever saw in production? by ocdtrekkie on Sunday March 25, 2018 @11:02AM (#16672465)
As someone who enforces screen lock timers for compliance, if I ever found someone was using any of these hacks, my solution would probably involve writing a script to automatically lock their screen every five minutes regardless of activity until they agreed to knock it off. :P
Re:Ask HN: Weirdest hack that you ever saw in production? by chris_wot on Sunday March 25, 2018 @01:14PM (#16673167)
Re:Ask HN: Weirdest hack that you ever saw in production? by ocdtrekkie on Sunday March 25, 2018 @02:29PM (#16673613)
I actually find people's risk intuition spectacularly bad. People seem to suspect their IT department will catch them and report them for things that their IT department doesn't care about, for example. Or expect that the IT department and/or supervisors may be watching their webcam, which is creepy, and really not something ordinary workplaces do.
Re:Ask HN: Weirdest hack that you ever saw in production? by oger on Sunday March 25, 2018 @09:07AM (#16672015)
Ha - amused to read this! Just built that a week ago for my partner. I used an Arduino connected to the USB as HID. The approx. 10 line script is moving the mouse back and forth every couple of seconds. Works like a charm: keeps the screen unlocked and her activity indicator busy...
Re:Ask HN: Weirdest hack that you ever saw in production? by 13of40 on Saturday March 24, 2018 @10:19PM (#16670287)
I did something similar in my last job: We used a custom terminal services client to log in to our data center, and the servers would kick you off after something like five minutes of inactivity. I ended up modifying the ts client to send a shift keypress every four minutes.
Re:Ask HN: Weirdest hack that you ever saw in production? by gondolgames on Sunday March 25, 2018 @03:59PM (#16674217)
I think an optical mouse placed on the reflective side of a CD achieves the same "jumping around" - effect.