Hacker Newsnew | past | comments | ask | show | jobs | submit | ephou7's commentslogin

I used this:

#!/usr/bin/python3 import subprocess import time import random with open("/tmp/x") as f: t = f.read() for c in t: subprocess.call([ "xdotool", "type", c ]) time.sleep(abs(random.gauss(0,0.07)))

And pasted a random Hacker News comment:

Authenticity Score 81 Highly Authentic

Words per minute: 162 Keystroke variance: 52ms Paste attempts: 0 Window/tab switches: 4 Pauses (≥10s): 0 DOM manipulations: 0

You failed.


`xdotool` is awesome and this is the first I'm hearing of it. Thanks.

Do you have any other command line tool recommendations?


That's cool, thanks for sharing.

Is there a way to detect this approach?


I think your approach is pretty much fundamentally flawed.

Put it this way, let's say someone recorded typing in the paragraph that you presented but saved the keystrokes, pauses, etc. Now they replay it back, with all the pauses and keystrokes, maybe with the `xdotool` as above, how could you possibly know the difference?

Your method is playing a statistical game of key presses, pauses, etc. Anyone who understands your method will probably not only be able to create a distribution that matches what you expect but could, in theory, create something that looks completely inhuman but will sneak past your statistical tests.


Most text composition involves backspaces and cursor movement. This script simulated neither afaik, though I’m sure it could have without much more difficultly.

Probably you will need to track many signals like those and use a model that takes them all into account.


Every OS has a similar facility for emulating keystrokes, and then there's the hardware solutions, e.g. raspberry pi that masquerades as a keyboard. It's practically impossible to prevent someone from cheating if they are motivated enough.

I'm not sure why single-header is an advantage over powerful libraries such as GEGL.


The benefit of single-header, specifically, is that it's super easy to integrate with any project. You don't need to mess with your build system, or the library's build system, just include the file and you're good to go.

No allocation is useful for embedded / resource constrained targets.


Both the single header and the zero-allocation callouts can be desirable qualities for something used in an embedded (as in classical MCU-shaped) context.

edit: Seeing that it's also C99 makes me think that embedded applications might be what this was geared toward.


It fills the lightweight niche. You can build it on Windows without needing to drag in all of msys. I can see this as really useful for toy projects and demos.


It's sort of like how a clean organized desk is an advantage to some but a hindrance to others....


or ImageMagick, or plenty of others, with SIMD, GPU, etc. support.


easy to test and integrate to your project.


I'm not sure why walking is an advantage over a hot air balloon. /s

Try to understand that "advantage" can mean different things to different people. Your perspective and usecases might be totally opposite from someone else, and that doesn't mean either of you are wrong.


> Other than it being completely wrong and requiring a regex to be compiled for an amount of work that's certainly less than the compilation itself.

It's not. And the sequence you describe is not even parsed because colons are not part of the IPv6 extension of the SAN. PLease educate yourself before spilling such drivel.


6.15.2 has 20 occurrences, of which only 2 are actual swearwords

  ./fs/bcachefs/bkey_cmp.h: /* we shouldn't need asm for this, but gcc is being retarded: */
  ./drivers/net/wireless/broadcom/brcm80211/brcmsmac/d11.h:/* Advance Retard */
  ./drivers/net/wireless/broadcom/b43legacy/phy.h:#define B43legacy_OFDMTAB_ADVRETARD B43legacy_OFDMTAB(0x09, 0)
  ./drivers/net/wireless/broadcom/b43legacy/phy.c:  for (i = 0; i < B43legacy_ILT_RETARD_SIZE; i++)
  ./drivers/net/wireless/broadcom/b43legacy/phy.c:           b43legacy_ilt_retard[i]);
  ./drivers/net/wireless/broadcom/b43legacy/ilt.h:#define B43legacy_ILT_RETARD_SIZE 53
  ./drivers/net/wireless/broadcom/b43legacy/ilt.h:extern const u32 b43legacy_ilt_retard[B43legacy_ILT_RETARD_SIZE];
  ./drivers/net/wireless/broadcom/b43legacy/ilt.c:const u32 b43legacy_ilt_retard[B43legacy_ILT_RETARD_SIZE] = {
  ./drivers/net/wireless/broadcom/b43/wa.c:static void b43_wa_art(struct b43_wldev *dev) /* ADV retard table */
  ./drivers/net/wireless/broadcom/b43/wa.c: for (i = 0; i < B43_TAB_RETARD_SIZE; i++)
  ./drivers/net/wireless/broadcom/b43/wa.c:   b43_ofdmtab_write32(dev, B43_OFDMTAB_ADVRETARD,
  ./drivers/net/wireless/broadcom/b43/wa.c:    i, b43_tab_retard[i]);
  ./drivers/net/wireless/broadcom/b43/tables.h:#define B43_TAB_RETARD_SIZE 53
  ./drivers/net/wireless/broadcom/b43/tables.h:extern const u32 b43_tab_retard[];
  ./drivers/net/wireless/broadcom/b43/tables.c:const u32 b43_tab_retard[] = {
  ./drivers/net/wireless/broadcom/b43/tables.c: BUILD_BUG_ON(B43_TAB_RETARD_SIZE != ARRAY_SIZE(b43_tab_retard));
  ./drivers/net/wireless/broadcom/b43/phy_n.h:#define B43_NPHY_PHYSTAT_ADVRET   B43_PHY_N(0x1F3) /* PHY stats ADV retard */
  ./drivers/net/wireless/broadcom/b43/phy_lp.h:#define B43_LPPHY_ADVANCEDRETARDROTOR_ADDR B43_PHY_OFDM(0x8B) /* AdvancedRetardRotor Address */
  ./drivers/net/wireless/broadcom/b43/phy_a.h:#define B43_OFDMTAB_ADVRETARD  B43_OFDMTAB(0x09, 0)
  ./drivers/net/dsa/sja1105/sja1105_dynamic_config.c:/* The switch is so retarded that it makes our command/entry abstraction


The two pilots in the Tenerife aircrash would beg to differ.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: