6 ms·
Show HN: Skod – FTP client for humans in C
- sthatipamala 11y agoIn what sense is this 'for humans'?
- Rangi42 11y agoThe source code is very well-written from a readability perspective, and the commmand-line API looks well-designed too.
- afshin 11y agoI was wondering that, too. Maybe it means that it's meant for end users and not for scripting and programmatic use.
- suprjami 11y agoSubmit a pull request saying that membership of Homo Sapiens is a requirement of use.
- Hypsurus 11y agoeasy to use? clean code? it's not complex.
- mrmondo 11y agoI can't see any correlation between an FTP program that makes a point of stating its written in C and saying that's for 'humans'. Also, why on earth are people still using FTP in 2015?!
- krapp 11y ago>Also, why on earth are people still using FTP in 2015?! Why are people still using the command line in 2015? Why do we still use HTTP? Because as with FTP, there are use cases for which it still works perfectly well.
- dubcanada 11y agoWait... What is wrong with FTP?
- conception 11y agoPassword sent in the clear.
- ars 11y agoFTP is quite often anonymous with no password. And you can use SFTP (secure FTP, not to be confused with SSH file transfer). It's much better than HTTP if you need entire directories. There isn't really any better protocol for giving public access to entire directories.
- jedisct1 11y agoFTP-over-TLS has been around for a long time, and is widely supported by clients and servers. But it's a really nasty hack, that introduces a lot of other issues.
- kjs3 11y agoYou mean FTP/S aka RFC4217? You ain't kidding about being a nasty hack. When it recently came up in my world, the only place it seemed to be really well supported was in the AS/400 world, where IBM seems to have standardized on it. Everywhere else there seemed to be any number of weirdnesses, incompatibilities and decrepit features. YMMV.
- Hypsurus 11y agoWhy not? I know FTP is not secure, and when I wrote skod I discovered lots of weaknesses in FTP. but still people using it.
- technion 11y agoWell I don't know what I'm doing wrong. $ ./skod -s "mirrors.digipower.vn" --download "/centos/RPM-GPG-KEY-CentOS-7" :: Error Failed to get '/centos/RPM-GPG-KEY-CentOS-7' size. This works: $ curl ftp://mirrors.digipower.vn/centos/RPM-GPG-KEY-CentOS-7
- lugus35 11y agoThis is not "Written in pure C, without any external library" : just see skod.h it depends on socket.h https://github.com/Hypsurus/skod/blob/master/src/skod.h https://github.com/Hypsurus/skod/blob/master/src/skod.h
- gravypod 11y agoVery well written source code! Great job. I didn't think an FTP client could be so cleanly written.
- suprjami 11y agoI don't understand the reason for two `tcp_connect` functions. One just adds the option to pass "w" to the fd mode. Both functions are otherwise identical. Despite the "IPv4 only" comment, both structure pack with `getnameinfo()` so both appear IPv6-capable. Looks like this could be optimised to remove the first connect function.
- suprjami 11y agoftp_getdataport() should return a char with sprintf, not an int. The port member of ftp_t could then be the same as the port member of skod_t, negating the need for two different tcp_connect functions.