Good free FTP Client Library (for Windows C++ commercial apps)? [closed] - c++

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
I'm looking for a good open source Windows FTP client library with a public domain or BSD-type license. Something that I have access to the source code and I can use it from C++ for Windows applications in a commercial app.
We have used Wininet for years and it's buggy and horrible. The last straw is the IE8 beta 2 contains a new bug in InternetGetLastResponseInfo(). I can no longer justify using Wininet when our users can install the latest version of IE and break our app.
I have looked at libcurl but it is way too heavy for our needs. The only thing I need is FTP support. I could spend a day stripping out all the code in libcurl I don't need, but I'd rather just start with a nice simple FTP client library, if possible.
I looked at ftplib (http://nbpfaus.net/~pfau/ftplib/) but it's GPL and I need this for a closed-source commercial app.
I've written FTP client code before, it's not that hard (unfortunately it was 15 years ago and I don't have the source code anymore). There must be a nice simple free client library that does nothing but FTP and has a license that can be used in closed-source commercial apps.
(If you are curious, the bug is that if you attempt to FtpFindFirstFile() with an FTP site where you can't make a passive-mode connection, InternetGetLastResponseInfo() doesn't return the full response. This is just one of many bugs I've found over the years. Another is that Wininet's FTP support ignores all timeout values. That particular bug has existed for years.)

You need Ultimate TCP/IP which is now free!
http://www.codeproject.com/KB/MFC/UltimateTCPIP.aspx
You get FTP. HTTP, SMTP, POP and more.
You won't regret it.

I have used libCurl to very good effect. The only disadvantage is that, to my knowledge, there is no support for parsing directory information that comes back from FTP servers (apparently, there is no standard directory format).

Checkout filezilla server for windows.

Are you looking for a command-line interface or an API? You may be able to adapt the feature-rich wget to your needs. Otherwise, take a look at http://www.sourceforge.net for lots of options.

This is the best FTP library I know: Kira's FTP Library, you can download it at: http://kirarelease.altervista.org/Home/index.html
Pass with the mouse above the box, you will understand why I like it so much: The code is the simplest I've found til now :)

Related

C/C++ HTTP Client Library for Embedded Projects [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
The community reviewed whether to reopen this question 9 months ago and left it closed:
Original close reason(s) were not resolved
Improve this question
So I have trawled through pages and pages of search results on StackOverflow and Google and I have come across very few C/C++ HTTP client libraries suitable for a resource-constrained, embedded environment (e.g. an ARM). I have however come across quite a few that are suitable for desktop-class applications.
Essentially, I am after a simple, easy-to-use and convenient API to make HTTP GET, POST and HEAD calls (with support for authentication, download resume and payload compression). It would be ideal if it had a small footprint (i.e. no or minimal external dependencies) and is open-source (with a permissive license).
Here's a list of what I've come across so far and why they are not suitable -
curl - too heavyweight
poco - too heavyweight
neon - GPL
qlibc - relies on POSIX libraries
cpp-netlib - relies on Boost libraries
serf - relies on the Apache Portable Runtime library
urdl - relies on Boost libraries
HTTP Client C API - promising but requires a C++ wrapper
Are there any libraries out there that I am unaware of or am I better off rolling my own?
Have you taken a look at the HTTPClient on mbed? Looks like there are lots of forks of an original from a few years ago that wasn't maintained. I haven't used this...
http://mbed.org/users/WiredHome/code/HTTPClient/
I can just describe what I used for those tasks.
curl - if you are lazy, you can just download in built binary and have nothing to do more, it has very simple headers and a lot of examples. You will need 3-4 already built libraries and header. With no external dependencies. So, I would count it as too low-level, but not heavyweight at all.
boost.asio - very interesting paradigm of realization, quite easy and clean. But I would say it is low-level too. Harder then curl. And needs to use boost, that is external dependency you want to avoid, I guess.
poco - best solution for http server. It's high level, after you joined it to your application, you just need to implement few virtual functions, having all other work (and thread management) done. Poco gives a lot of stuff for application management, thread/process management and it is very simple and easy, I would even say it has java-like interface. Yes, there is external dependency to poco, but I would look at this as a chance to learn perfect library. Still, for http clients it is really heavy.
That is all my C++ experience with HTTP. Counting you need just client and don't need dependencies, I would offer you to look at libcurl library. It's cross-platform, easy, no dependencies and low-level enough to get all you need with network. And if you will have time - look at Poco, really, I believe you will fell in love with this library as I did.
Hope that will be helpful.
I found another one, which just needs to be packed into a lib.
didn't test it, but may be worth a look:
https://github.com/reagent/http.git

IDE for realtime collaboration that works with C/C++, C#, .Net [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I'm looking for an IDE that I can collaborate with other people. I'd like to have real-time editing and color coordination (meaning if Bob is online and changes some code it will high lite his changes, similar to sharing a Document on Google).
I've tried searching via Google but I can't find anything that actually suits my needs. I'm currently a college student and have projects to do with other class mates, but using Pastebin is a bit cumbersome as I have to have an IDE open + a web browser, then copy paste, share etc.
Is there any IDE out there that will compile for C/C++, C#, .Net etc with real-time collaboration? If I have to set up a server on my desktop to make it work I have no problems doing so
I believe that in practical terms, using a distributed versioning system (like git, perhaps thru gitorious or github) is a wiser idea, at least for usual programming languages like C (and you need a social convention, at least like Bob is working on file foo.c or on function foofoo while Alice focuses on bar.c or on function barbar). You may want to communicate in real time using IRC, chat, pastebin, etc .... in addition of git. You probably won't edit the same line (or perhaps even the same function) two distant people at a time.
The semantics of programming language like C is not fit to the idea of a simultanous edition of a single source at the very same time. (Defining languages friendly to this co-development idea is still a research topic).
BTW, you don't need an IDE to code in C or C++ (especially on Linux, which gives you a lot of other tools emacs or perhaps vim or gedit or geany, grep, make, ctags, git, awk, ... to use together). A big lot of very large C or C++ free software programs (GCC, the Linux kernel, Gnome/GTK, Qt/KDE, LibreOffice ....) are coded by many qualified people without IDEs. This is IMHO quite significant.
I suggest to try:
http://moonedit.com/ - simple real-time editor
http://www.saros-project.org/DemoVideo - real-time editor for Eclipse (so you could use C++ there)
at http://en.wikipedia.org/wiki/Collaborative_real-time_editor there are plenty suggestions.
This is an old thread but in case others are still interested in this topic/capability there are a bunch of web based IDEs nowadays. If you Google "web ide", you'll get a decent list of collaborative web IDEs. For completeness, I'll list one that I've used and liked:
Cloud9 IDE
Aside from small homework assignments, you are better off using a version control system like GIT or Hg. Though they are overkill for most small homework assignments; especially if it's an intro class and most students are already having a hard enough time learning the programming material by itself.
One other note is that a web based IDE is not necessarily mutually exclusive to using VCS. You can use GIT inside of Cloud9 IDE.
Save yourself the trouble and use version control of some sort. Be it git, hg, svn, or what have you. Pick your poison, but this is a large part of what version control exists for. For communication? AIM, IRC, Skype, it doesn't really matter.
In this case, you can either have good version control, a good IDE, and a good Chat program or you can have one program that syncs your code, allows you to chat, and allows you to edit code, but does all of the above poorly.
Check out Squad:
http://squadedit.com/
Hosted service so setup is easy, and it supports C++ syntax highlighting.
Have a look at EFC, http://www.eclipse.org/ecf/.
More specifically Cola, http://vimeo.com/1195398.

How can I validate digital signatures for Microsoft's Portable Executable format in portable code? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
I am looking for sample code (or libraries) that can help me validate digital signatures for Windows PE files (.exe, .dll, .cab, .etc) on non-Windows platforms using C++. I am looking for a platform-independent approach.
Thanks!
You could check at WINE's WinVerifyTrust implementation for a full programmatic way.
And, actually, here is a good link How to verify executable digital signatures under Linux? that complains about WINE implementation (that was back in 2008), and thus, explains the process in a quite "portable" way, provided you have something similar to OpenSSL available in your platform.
There is no general answer to this, especially as you have not specified on how far do you want to port it. Linux on x86 with open source libraries will be easier, uCos running on MIPS32 or Arduino will be next to impossible ..
First, you obviously have to be able to read and parse the PE format itself, in particular you have to be able to get contents of individual sections and hash them, like .text, .data etc. For in depth look at how its put together, look here:
http://msdn.microsoft.com/en-us/magazine/cc301805.aspx
http://msdn.microsoft.com/en-us/magazine/ms809762.aspx
Now you want this to be portable, so you can either roll your own PE reader/limited writer, or look around in some of the open source projects that already do this. Try ReactOS or Mono.
Or if you are happy running python, try this http://code.google.com/p/pefile/
Second, as you are dealing with cryptography, digital signatures, and X.509 certificates, you pretty much need a full blown portable crypto library to perform signing, certificate chain validation and so on. If you are happy with GPL, try OpenSSL or CyaSSL, or Botan if you want BSD license.
The precise format of Authenticode signatures, the signing process and the validations process is desribed here:
http://www.microsoft.com/whdc/winlogo/drvsign/Authenticode_PE.mspx ( Authenticode_PE.docx )
It will require quite a bit of code to pull everything together.
The question is rather old, but I put my answer for those who's still facing the same problem.
You can use osslsigncode tool to verify MS Authenticode signatures on Linux or other *nix systems. However the tool just verifies the signature itself and doesn't checks certificate revocation, timestamp validity etc. though you can extract the data from the signature and do it manually.
Microsoft Authenticode is certainly not a big hush-hush secret and you can download technical specs and more about how Authenticode works. You can also download technical information about Windows PE file format. Since you did not clearly state weather you wanted something for Linux, Mac, or a smartphone, I can not provide you with an adequate solution. However, with the information I provided you above, along with OpenSSL, you should be able to create your own program to do this in the language and OS of your choice.

Looking for a High Level C++ SSL Library [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a book, tool, software library, tutorial or other off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
I checked out quite a few SSL librarys tonight. OpenSSL looks good but lacks documentation, as most of them do. I thought I hit the jackpot when I found NetSieben's SSL C++ Library (http://www.netsieben.com/products/ssh/index.phtml) but after hours, I am unable to get it to compile. It says it needs Botan's lib, but absolutely no information how to link it to Botan or anything.
So I am looking for a fairly easy to use SSL library. I am just using it for a client application to connect to an already existing server.
To give a more thorough answer: There are a number of SSL libraries that are better documented than OpenSSL, which is notoriously bad.
If you look at the grand picture, the real alternatives as an SSL library are Botan, PolarSSL, Mozilla NSS, Wolf and GnuTLS.
All except Botan are not C++ specific so they do not have nice C++ objects and resource management.
My personal preference for SSL library is PolarSSL, because of the readability of the code, in-header API documentation and just general good experiences with it. It is used in some large FOSS projects and they have some kind of government accreditation.
I'm not a real fan of the wrappers like Boost.Asio as they still lack the proper documentation for the more in depth things. Boost.Asio itself is quiet ok and the examples are pretty decent though. If you only need a simple client, this might be the way to go.
Mozilla NSS is one of the older ones, but it does not support the newer TLS 1.1 and TLS 1.2 standards, which they actually should.
Both Botan and CyaSSL are good alternatives too. Botan documentation is thorough on some parts and perhaps a bit lacking on other parts, but some large open source projects include Botan and have good experiences with it.
In general, you can do a lot better than OpenSSL with any of these.
Hope this helps!
Boost.Asio provides SSL capabilities by wrappering OpenSSL. The examples are fairly straightforward, for client-code it looks something like this
ssl::context ctx(my_io_service, ssl::context::sslv23);
ctx.set_verify_mode(ssl::context::verify_peer);
ctx.load_verify_file("ca.pem");
ssl::stream<ip::tcp::socket> ssl_sock(my_io_service, ctx);
ip::tcp::socket::lowest_layer_type& sock = ssl_sock.lowest_layer();
sock.connect(my_endpoint);
sock.handshake();
sock.write(...);
note there are asynchronous methods async_connect and async_handshake and async_write too.
For a simple well-documented SSL library, you could look at https://polarssl.org.
PolarSSL has full API documentation and example clients on its source page.
Disclaimer: I'm the lead-maintainer for PolarSSL
Mozilla NSS is a relatively better documented set of libraries.
You might like CyaSSL, which is another SSL implementation. You can download it at http://www.yassl.com.

portable zip library for C/C++ (not an application) [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
I want to be able to zip files from my non-gui C/C++ application, on several versions of Windows, Linux/Unix, and MacOS.
The user will compile and run using this app using Eclipse + makefile or VisualStudio. I don't want the user to have to install something separately, or have my makefile install executables.
Prefer open-source. I'm already looking at "Zip 3.0"...
Take a look at Libarchive. I spent a lot of time seeking for a cross-platform and LGPL licensed library with convenient interface. This the best of all I've seen. Very easy and powerful tool. Originally designed for Unix-like systems but there's also the Windows version.
I've had great results with miniz: https://code.google.com/p/miniz/
For a simple compression of strings in c++, I also really like Timo Bingmann's solution.
I'd recommend ZipLib https://bitbucket.org/wbenny/ziplib/wiki/Home
Personal reasons why I love this project:
built around c++11 stl streams (ex. decompresses into stl streams!)
lightweight (no dependencies other than zlib)
can be used on both windows & liunx
It took me a long time to find this project - hope this helps someone.
We've used zlib a couple times here. It's a fairly standard library that has implementations in most main languages.
How about this:
http://zziplib.sourceforge.net/
http://www.info-zip.org/UnZip.html
HTH
Others have mentioned zlib, which is nice and fairly easy.
The 7-Zip (LZMA) SDK is more complex but also has very nice compression rates.
Edit: Although still in development, with the release process and history over time, I would be hesitant to recommend this now.
ZLIB - the most portable library in the world. open source, very proven and reliable. The gold standard.
why use anything else?