AdHoc network Library Linux [closed] - c++

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 9 years ago.
I need to set up an AdHoc network in linux (Debain specifically) in a C/C++ program. It needs to be able to search for existing networks, or at least confirm that a network exists with a given SSID, connect to it, and be able to determine the number of jumps it takes to get to any given node.
I do have enough programming experience to write my own, but it would be a whole lot of work and this seems like a common enough task that there's bound to be one in existence already. I suppose it doesn't have to be c/c++ (I could run the program externally or create some sort of wrapper), but it would be very nice if it were all "one" language.
Thanks in advance!

You could download an open source program that does the scanning + connection, like
iwScanner
or wicd is probably more appropriate
and modify it to fit your needs,
or connect via existing command line tools, in a script
Sample steps in this page
Regarding counting the number of hops, you can use the traceroute utility, in a script,
traceroute man page

Related

Linux C++ application file protection [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I'm developing a Linux application that needs to save some sensible data in order to reload them when the machine reboot.
So I'm investigating on how to save somewhere my data and protect them.
(Obviously there will be always a possibility to crack it)
My goal is not to reinvent the wheel, so if there is a working solution, that's what I'm looking for.
Add a dedicated user for your application and set proper directory attributes. So other users can't see the directory and files, only root.
Use a simple scramble algorhythm just to make the file hard to read by a simple cat.
Never store passwords, and other sensible information in files.

How to read and write "Excel" with c/c++ (in smartphone app develop) [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I'm a smartphone app developer.
I want to make a app running in iOS,android,winphone.
I use cocos2d-x platform tool to make this app. it base of c/c++ language.
So,
Dose anyone can tell me How to read and write excel with c/c++
For what purpose? Just reading the file can be done by treating it as an opaque stream of bytes, just like any other file.
I doubt that's what you really mean, though.
If you want to interpret the file's contents, and present/update the calculations, then surely you must realize that the answer to "how" that is done must be gigantic? Excel is a huge, huge, and very old application, probably the result of many millions of lines of code.
Nobody can tell you "how" to interpret that in a simple answer here.
The closest thing you can probably get here is a recommendation on a library to use. I had a quick look, and LibXL was the first one I found for C++. It is a commercial library, and I have no experience with it.

How to list/enemurate all sofwares and related .exe installed on a Windows Computer in C++? [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
As a component of an application, I have to develop in c++ a way to list all the software installed on a windows computer. In order to execute them, I need to have their related executables. (Example: Opera => opera.exe).
At this stage I have been able to look in the registry in:
SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall and SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall and found several softwares (not all of them)
So here's my questions:
- How can I have all the software installed on the computer? (Did I miss a registry folder?)
- How can I define the good .exe related to each software?
You could try to adapt the script given here:
http://technet.microsoft.com/en-us/library/ee156540.aspx
In general, use WMI to find installed packages. Or simply traverse the filesystem to look for executables if you really want to find all executable files on the system (why?).
For C++ you might want to have a look at the examples for WMI Win32_Product and SoftwareFeature. See:
http://msdn.microsoft.com/en-us/library/windows/desktop/aa394378(v=vs.85).aspx
But in general, there is no sane way to find all installed applications. Especially not if you count things like webpages with embedded javascript, all kind of scripts and batch files etc. etc.

fast on-demand c++ compilation [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I'm looking at the possibility of building a system where when a query hits the server, we turn the query into c++ code, compile it as shared object and the run the code.
The time for compilation itself needs to be small for it to be worthwhile. My code can generate the corresponding c++ code but if I have to write it out on disk and then invoke gcc to get a .so file and then run it, it does not seem to be worth it.
Are there ways in which I can get a small snippet of code to compile and be ready as a share object fast (can have a significant start up time before the queries arrive). If such a tool has a permissive license thats a further plus.
Edit: I have a very restrictive query language that the users can use so the security threat is not relevant. My own code translates the query into c++ code. The answer mentioning clang is perfect.
Running Clang in JIT mode should provide the speed you need, and example can be found here, safety on the other hand is something else...
Ch also had a JIT added, and seeing as its an interpreter, it might provided an easier sandboxed/controlled environment.
In addition to Necrolis answer, there's also specialized C++ parser Cling. Might come in handy.

How to start writing a firewall for linux? [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I want to develope a firewall for Linux. I prefer C/C++ language.
Is there any simple sample code for writing a firewall?
Which libraries should I use?
Update: There are some firewalls for Linux, but I want develope a simple firewall for learning.
You can start by using the Netfilters API (http://www.netfilter.org/). I think it is a good starting point for packet filtering. I've worked a lot with this API in kernel space. I'm not sure if there is a library for user land, but I must tell you that it's pretty easy to develop something with netfilters in the kernel.
As an example, iptables use the netfilters API.