INetGet - Lightweight CLI front-end to the WinINet API

Share interesting information or links related to portable apps here.
Post Reply
Message
Author
User avatar
deathcubek
Posts: 185
Joined: Thu Jul 14, 2011 9:42 am
Location: Island of Lost Minds

INetGet - Lightweight CLI front-end to the WinINet API

#1 Post by deathcubek » Wed Sep 23, 2015 2:44 pm

INetGet is a simple command-line interface to the WinINet API. In other words, it is a program for downloading files via the HTTP (Hypertext Transfer Protocol) or FTP (File Transfer Protocol) protocols. It provides full support for HTTPS (HTTP over TLS) as well as IPv6.

Image

This program provides a similar functionality as the well-known WGet and cURL tools. However, in contrast to those, INetGet is based directly on the "native" Windows Internet programming interface (WinINet). This comes at the advantage that INetGet is very small and lightweight, as it uses the HTTP(S) and FTP services provided by the operating system, instead of having to implement these protocols on its own. There are no external dependencies (e.g. OpenSSL or GnuTLS), except for standard system libraries that are present on every Windows system anyway. Still, advanced features, such as HTTPS and IPv6, are supported. Furthermore, since INetGet is based on the Windows crypto libraries, it uses the Windows certificate store. This means that, in contrast the aforementioned tools, you do not need to provide and maintain your own certificate bundle for HTTPS. Certificate updates as well as security fixes for the underlying cryptographic routines are automatically provided, via Windows Update. On the downside, you will have to trust Microsoft's protocol implementations.

Download:
https://github.com/lordmulder/INetGet/releases/latest

User Manual:
http://muldersoft.com/docs/inetget_readme.html
Last edited by deathcubek on Mon Sep 28, 2015 1:39 pm, edited 3 times in total.
„One of my most productive days was throwing away 1,000 lines of code“ – Ken Thompson

Dreamatorium | In Search Of The Disembodied Sounds | Best Regards!

User avatar
Midas
Posts: 4509
Joined: Mon Dec 07, 2009 7:09 am
Location: Sol3

Re: INetGet - Lightweight CLI front-end to the WinINet API

#2 Post by Midas » Fri Sep 25, 2015 4:22 am

Excellent work, thanks. 8)

A suggestion: as Wget does, INetGet should be able to read 'inetget.ini' (if present) for persistent directives (i.e., options), e.g., user agent string; this file would be parsed first and over-ridden if different options are explicitly declared via the command line while invoking the program...

User avatar
Userfriendly
Posts: 404
Joined: Tue Nov 27, 2012 11:41 pm

Re: INetGet - Lightweight CLI front-end to the WinINet API

#3 Post by Userfriendly » Fri Sep 25, 2015 5:46 am

This is cool but I'll wait until it has some features that curl/wget have like time-stamping to detect newer data. I use these downloaders to update apps/webpage archives. I don't wanna be wasting bandwidth downloading and overwriting the same old data again.

User avatar
deathcubek
Posts: 185
Joined: Thu Jul 14, 2011 9:42 am
Location: Island of Lost Minds

Re: INetGet - Lightweight CLI front-end to the WinINet API

#4 Post by deathcubek » Sat Sep 26, 2015 3:41 pm

INetGet v1.01:
https://github.com/lordmulder/INetGet/releases/tag/1.01

Code: Select all

* Correctly show file size and remaining time for files larger than 4 GB, provided that the server sent a Content-Length field.
* The path and the query components of the URL as well as the POST data string are now converted to UTF-8 and then percent-encoded.
* Update console window title in order to show the current INetGet progress. Restores original title on exit.
* Added support for setting INetGet options via configuration files. Use --config=<cfg> option to load a configuration file.
„One of my most productive days was throwing away 1,000 lines of code“ – Ken Thompson

Dreamatorium | In Search Of The Disembodied Sounds | Best Regards!

User avatar
webfork
Posts: 8236
Joined: Wed Apr 11, 2007 8:06 pm
Location: US, Texas
Contact:

Re: INetGet - Lightweight CLI front-end to the WinINet API

#5 Post by webfork » Sat Sep 26, 2015 4:09 pm

Moving out of Submission as this can't get added to the database ... http://www.portablefreeware.com/faq.php#six

billon
Posts: 663
Joined: Sat Jun 23, 2012 4:28 pm

Re: INetGet - Lightweight CLI front-end to the WinINet API

#6 Post by billon » Sat Sep 26, 2015 5:14 pm

Why read-only attributes? :?

Image

User avatar
deathcubek
Posts: 185
Joined: Thu Jul 14, 2011 9:42 am
Location: Island of Lost Minds

Re: INetGet - Lightweight CLI front-end to the WinINet API

#7 Post by deathcubek » Sun Sep 27, 2015 5:01 am

Userfriendly wrote:This is cool but I'll wait until it has some features that curl/wget have like time-stamping to detect newer data. I use these downloaders to update apps/webpage archives. I don't wanna be wasting bandwidth downloading and overwriting the same old data again.
This is more a "high level" function that probably won't be implemented in INetGet directly. It requires multiple HTTP requests (one HEAD request to fetch header and check the last modification date, plus one GET request to actually fetch the data). And it can only work if the server actually sent a "Last-Modified" header field - which isn't always the case. So this is more something that could be scripted, using INetGet to perform the required HTTP requests. What could be added easily (more or less) is an INetGet option that will set the "LastWriteTime" of the output file to the date that the server sent in its "Last-Modified" header field - if such a field is present in the server's reply.

billon wrote:Why read-only attributes? :?

Image
To protect the release binaries from (inadvertent) modifications. Why would you ever want to (intentionally) modify the release binaries? If you wanted to modify the program in whatever way, you'd just grab the original source codes, from the official GIT repo, apply your desired modifications and compile a new binary. You certainly would not want to "hack" on the existing release binary. Anyway, removing the "ready only" attribute requires only one or two clicks - should it ever be required.
„One of my most productive days was throwing away 1,000 lines of code“ – Ken Thompson

Dreamatorium | In Search Of The Disembodied Sounds | Best Regards!

User avatar
deathcubek
Posts: 185
Joined: Thu Jul 14, 2011 9:42 am
Location: Island of Lost Minds

Re: INetGet - Lightweight CLI front-end to the WinINet API

#8 Post by deathcubek » Sun Sep 27, 2015 12:30 pm

Userfriendly wrote:This is cool but I'll wait until it has some features that curl/wget have like time-stamping to detect newer data. I use these downloaders to update apps/webpage archives. I don't wanna be wasting bandwidth downloading and overwriting the same old data again.
Okay, you can try with this Test version:
http://sourceforge.net/projects/mulders ... p/download

Please see the included REAMDE file for the "--set-ftime" and "--update" options, which should be doing what you want...
„One of my most productive days was throwing away 1,000 lines of code“ – Ken Thompson

Dreamatorium | In Search Of The Disembodied Sounds | Best Regards!

User avatar
Userfriendly
Posts: 404
Joined: Tue Nov 27, 2012 11:41 pm

Re: INetGet - Lightweight CLI front-end to the WinINet API

#9 Post by Userfriendly » Sun Sep 27, 2015 2:35 pm

Just tested it and it works fine so far. I think I got a new favorite downloader :D Already replaced wget and curl with this since those require much more complicated command options.

You'll probably make a GUI frontend for this at some point like most of your other projects?

User avatar
deathcubek
Posts: 185
Joined: Thu Jul 14, 2011 9:42 am
Location: Island of Lost Minds

Re: INetGet - Lightweight CLI front-end to the WinINet API

#10 Post by deathcubek » Sun Oct 04, 2015 9:15 am

Here is a new TEST version:
http://sourceforge.net/projects/mulders ... p/download

Biggest difference is that I moved all the I/O stuff into separate worker threads now, in order to make the application more responsive. You will notice this, e.g., if you unplug the network cable in the middle of a transfer. Before, the application would just "freeze" completely in this case - until the network timeout triggers. Now, you will see that the application remains "responsive" and the transfer rate continuously goes down (because no more data is received). Also, Ctrl+C events will now be handled much faster.
„One of my most productive days was throwing away 1,000 lines of code“ – Ken Thompson

Dreamatorium | In Search Of The Disembodied Sounds | Best Regards!

User avatar
deathcubek
Posts: 185
Joined: Thu Jul 14, 2011 9:42 am
Location: Island of Lost Minds

Re: INetGet - Lightweight CLI front-end to the WinINet API

#11 Post by deathcubek » Sat Mar 31, 2018 11:35 am

INetGet v1.02 (2018-03-31):
https://github.com/lordmulder/INetGet/releases/tag/1.02

Code: Select all

Version 1.02 (2018-03-31)
- All blocking I/O operations have been moved to separate "worker" threads in order to make the application more responsive.
- Added "update" mode, i.e. re-download the existing file only if the server provides a newer version. Enable with --update option.
- Added --set-ftime option to set the local file's "LastWrite" time-stamp to the "Last-Modified" time provided by the server.
- Incomplete or failed downloads are now removed by default. You can use the --keep-failed option to retain incomplete files.
- Added options --range-off and --range-end to specify the byte range (offset and end address) to be downloaded.
„One of my most productive days was throwing away 1,000 lines of code“ – Ken Thompson

Dreamatorium | In Search Of The Disembodied Sounds | Best Regards!

User avatar
Midas
Posts: 4509
Joined: Mon Dec 07, 2009 7:09 am
Location: Sol3

Re: INetGet - Lightweight CLI front-end to the WinINet API

#12 Post by Midas » Sun Apr 01, 2018 2:24 am

Who is "kendo master"? :?

User avatar
deathcubek
Posts: 185
Joined: Thu Jul 14, 2011 9:42 am
Location: Island of Lost Minds

Re: INetGet - Lightweight CLI front-end to the WinINet API

#13 Post by deathcubek » Sun Apr 01, 2018 2:03 pm

Midas wrote:
Sun Apr 01, 2018 2:24 am
Who is "kendo master"? :?
There can be only one... https://youtu.be/g6nLRHUg_r8 :idea:
„One of my most productive days was throwing away 1,000 lines of code“ – Ken Thompson

Dreamatorium | In Search Of The Disembodied Sounds | Best Regards!

User avatar
Midas
Posts: 4509
Joined: Mon Dec 07, 2009 7:09 am
Location: Sol3

Re: INetGet - Lightweight CLI front-end to the WinINet API

#14 Post by Midas » Mon Apr 02, 2018 7:54 am

:lol:

Post Reply