-- Leo's gemini proxy

-- Connecting to bbs.geminispace.org:1965...

-- Connected

-- Sending request

-- Meta line: 20 text/gemini; charset=utf-8

I had an idea the other day: I sometimes have to transfer files to heavily closed off Windows PCs (Corporate IT and whatnot) and that is a PITA. Why not connect a Arduino Pro micro to it that presents itself as a HID Keyboard, and then feed the arduino from my laptop with the data over serial. The arduino can open a CMD box, do a "copy con" and then type the extents of the file, do a Ctrl-Z, and there you are. Also sending a binary as base64 and then using the Windows built-in base64 decoder to make it a binary should be possible. I think i will make such a thing in the coming days and program a file sending utility to go with it.. Let's see how this works in practice.


Posted in: s/Electronics

🚀 fripster [mod]

Mar 23 · 8 weeks ago


7 Comments ↓


🦉 ResetReboot · Mar 23 at 11:47:

The idea is good, but you have to consider that CMD command line is limited (I think!) to around 255 characters per command. So... the moment you need to send something bigger than a small text file you are probably unable to type the contents of the whole file. Besides, the command line would try to interpret certain bytes in certain ways.


🚀 fripster [OP/mod] · Mar 23 at 20:28:

Thanks for the reaction. I built it on a breadboard today, and it works. I sent a .jpg picture over the line by first encoding the file in base64, then 'typing' it over the line into an editor at the receiving end, and then decoding it back to jpg there. Works like a charm, but is quite slow. Only recommend for giving commands and sending short text files. (Which is my use case, so test was a success!)


🐧 chluehr · Mar 23 at 20:50:

Similar problem, similar solution: I tar & gzip the files and pipe them to base64encode & cat; then copy-paste the output (the buffer is quite large, lucky me) and decode/untar locally. PITA, but at least a viable way.


🌲 Half_Elf_Monk · Mar 23 at 21:28:

Is it the same kind of command every time? (i.e., I have to plug in this usb key and transfer the latest corpo-BS.dat file to a folder). If so, use the windows autoplay function + a batch file that executes those commands locally to the windows machine, and have that sit on the root of a usb key? windows did have autoplay, and as long as it's available on that (I'm guessing ancient) version of windows, you could likely do this.


🌲 Half_Elf_Monk · Mar 23 at 21:28:

reminds me of the old windows95 "briefcase" function, which worked to sync files on floppy disks between machines.


🍩 wholesomedonut · Mar 26 at 05:23:

Depending on where you work, that could be something that gets you fired.


You know your work environment better than I do.


I wouldn't mess with it; this sounds like a management issue where your resources to do this within the normal constraints of security rules doesn't exist, isn't known, or is unusable.


🚀 fripster [OP/mod] · Mar 26 at 21:11:

Thanks all for commenting. No this is not for doing things on my work computers, but to help when being at customers. Of course we would discuss with the IT people before doing this. We're not THAT stupid.. I made the test rig to just pass-through commands, so I will be able to do anything a typist can do. Just have to add a possibility to send Ctrl / Alt / Shift / System and F keys. But that is very doable. We just have some customers where the IT guys are not able to lift restrictions themselves, but are okay with temporarily using workarounds, especially when they are present to witness the thing. All customer want solutions in the end, despite all the rules....

-- Response ended

-- Page fetched on Sun May 19 15:40:25 2024