Better HN
topnewbestaskshowjobs
Log inSign up

DavidBuchanan

249 karma · joined Oct 3, 2016 (10y ago) · 28 submissions

Submissions

comment 5y ago · link · parent

It's with HostUS. I got a coupon a few years ago (via LowEndBox), and it's been renewing at the same rate ever since. I have no complaints about them, but I'm not sure you can get the same pricing today.

comment 5y ago · link · parent

Server seems fine, I think it just doesn't work on Safari

comment 5y ago · link · parent

Author here - this was just a quick PoC, I'm pleasently surprised that it seems to be handling all the HN traffic.

It's served from a python script using aiohttp, behind nginx, on a $16/year VPS.

I might make a github repo with more details, but in the meantime, here's the server script: https://pastebin.com/ykUeppqc (apologies for pastebin, I don't have access to my github account at present)

Just in case the server dies, there's a video of it here: https://twitter.com/David3141593/status/1388602027484356614

4.

Show HN: Tweetable Polyglot PNGs: Pack a ~3MB Zip File into a Tweet(github.com ↗)

1 points · by DavidBuchanan · 5y ago · discuss

5.

Crafting a PNG that's only visible via Twitter's downscaler(twitter.com ↗)

4 points · by DavidBuchanan · 5y ago · discuss

6.

Retrofitting USB-C to an iPod Nano(hackaday.com ↗)

6 points · by DavidBuchanan · 5y ago · 1 comment

comment 5y ago · link · parent

This is my "textbook" implementation of AES128, which follows the FIPS specification as closely as possible (in python): https://github.com/DavidBuchanan314/aes-playground

It also includes from-scratch Galois field arithmetic functions.

comment 6y ago · link · parent

Here's my writeup/solution for the same challenge, represented as a diagram:

https://twitter.com/David3141593/status/1253122980525334529

comment 6y ago · link · parent

This was recently suggested to me on Twitter, I'll have a look at implementing it tomorrow.

https://twitter.com/arnaud_lb/status/1212512382859251712

10.

Show HN: dlinject.py – Inject a .so into a running Linux process, without ptrace(github.com ↗)

82 points · by DavidBuchanan · 6y ago · 19 comments

11.

Abusing C macros to render the Mandelbrot Set at compile-time(gist.github.com ↗)

131 points · by DavidBuchanan · 8y ago · 21 comments

comment 8y ago · link · parent

It isn't massively complex, but it did require some custom encoding/decoding logic. I plan to write a blog post on this some time soon...

comment 8y ago · link · parent

Not quite, ICC profile chunk size limits.

comment 8y ago · link · parent

And yet, nobody has done the same for Twitter until now.

The difference is that twitter applies a series of operations to all uploaded image, stripping EXIF data, recompressing, etc., which would normally be difficult to work around.

comment 8y ago · link · parent

> The main issue with RDTSC is that task-switches may cause your thread of execution to change cores or mess up your timing

I got around this by running my benchmarks in a kernel module, with interrupts disabled. Obviously this is only possible under certain circumstances.

I also disabled caching via the CR0 register for maximum repeatability, although of course that isn't at all reflective of "real world" performance, so it depends on what you're actually trying to measure.

comment 8y ago · link · parent

I performed an experiment based on this idea - I wired up a clicky relay to the numlock LED (via a transistor), and glued it to a decent Dell keyboard. Then, I rigged up a python script to toggle the numlock led on each key press/release event.

Honestly, typing experience wasn't too different to a real mechanical keyboard.

comment 8y ago · link · parent

Amusingly, loading that page takes up 897kB.

comment 8y ago · link · parent

How do busses work without tri-state logic?

comment 8y ago · link · parent

I wouldn't categorise security as an "arbitrary concern".

comment 8y ago · link · parent

Here's my take on libfaketime, which hooks also hooks syscalls:

https://github.com/DavidBuchanan314/TARDIS

It isn't intended for any kind of serious usage, I mainly just wanted to understand ptrace and LD_PRELOAD.

21.

EternalPetya – yet another stolen piece in the package?(blog.malwarebytes.com ↗)

20 points · by DavidBuchanan · 9y ago · discuss

comment 9y ago · link · parent

I wrote a simple extension to disable the new direct image link behaviour: https://github.com/DavidBuchanan314/imgur-anti-anti-hotlink

23.

Show HN: TARDIS – Warp a process's perspective of time by hooking syscalls(github.com ↗)

77 points · by DavidBuchanan · 9y ago · 28 comments

comment 9y ago · link · parent

One thing I'd recommend is to try to find some 5V erasable EEPROMs, so you can reprogram it in-system wthout having to transfer it over to a dedicated (and expensive) programmer.

I went with a 12V-EEPROM at the time, so I had to write my own emulator to speed up my development cycles :)

comment 9y ago · link · parent

I built my SBC without any prior experience. You pretty much just have to connect all the adress and data lines, and then figure out the chip selection logic. I used an MC68B50 for the UART, which can still be found very cheaply on eBay.

comment 9y ago · link · parent

Not really. You can get up to about 1Mhz on a breadboard, and my wire-wrap SBC works at 4Mhz without any issues. If you did run into timing issues, you could just underclock the whole thing.

comment 9y ago · link · parent

Writing a 6502 emulator is also a lot of fun!

Shameless plug: https://github.com/DavidBuchanan314/6502-emu

28.

A very simple BIOS/MBR bootkit demo(github.com ↗)

3 points · by DavidBuchanan · 10y ago · discuss