Making automatic phone call - phone-call

I need to write a program to make automatic phone calls to given numbers. How to do that. What libraries do I need.
Would prefer Unix-like, c++/java/python way.

You might try looking at the open source Asterix solution http://www.asterisk.org/

Related

Any way or ideas to protect or sign source code?

This is probably a strange question. My project involves a few other people that need to work on the code too. I'm not sure how careful they would be with it and I don't want it to leak. For this reason I split it into 2 parts, one is in the form of a library, the rest just plain source code. There is one other guy that needs everything so he also has the source to the library. I don't want this guy to make any changes to the library. I put in a version number that gets printed when everything is running but I have no way of knowing (from looking at logs) if the library was authentic (from me only).
I was hoping there is some way I can use a public-private-key signature or something like this but against what? I probably can't just calculate an MD5 hash either because the linker probably puts the library function in different places all the time.
I realize it's probably not feasible to sign and verify source code but I would be curious to hear if anybody has any ideas.
You can use one of the VCS (version control systems) listed here.
By my experience you can use Github, it is easy to work with.

Is it possible to embed another exe in my program using C++?

I am mostly a .Net guy and the transition from VB.Net to C++ has been quite painful.
Anyway, just like in Visual Studio, we can add resources to our program, is it possible to add an exe as a resource to my C++ program which will extract itself from my exe and run only if needed?
Thank you.
Sure, just embed its binary data as an array of whatever fundamental type you want, perhaps in a header -- unsigned char, int, whatever -- write it to disk on execution of your parent application, then call it as a child process.
I'm not sure why you would want to do this, it seems a bit silly and like there are other approaches you can take. It might also trigger some antivirus heuristics, as this is a common way viruses propagate.
If you do do this, you'll also probably want to store it as a compressed byte/int array to save space, and then decompress it on the fly. Or at least Base-85 to keep your header file smaller.

Find code that could be reached by a specific function

I have a hard time formulating this question. The reason I'm asking is that I want to convert some C++ code with emscripten to java script code, but I don't think I need to convert the whole code base.
Is it possible in C++ to find all the code that a particular function could reach into when executed? Then I would know which part of the code I need to convert and which one I can just ignore.
It is called "call hierarchy" as Eugene said. You can use automatic documentation tools to get this information.
I strongly recommend you to try doxygen because it is really easy to use:
http://www.doxygen.nl/

How can I get a list of all APIs used by particular process (Windows 7)

I use C++ to address the following task:
I'd like to get the list of all API functions, which are used by the particular process. It can be any Windows 7 process - 32 or 64 including system processes.
So far, the only solution I see - is to create a kernel driver to intercept all possible APIs, listen them for some time and check if particular process called them. It won't guarantee me full list of APIs of that process, but at least will give me some of them.
This method looks dangerous and not effective.
If there is any simpler way to deal with that task? If there is a way to get a full list of APIs of the process, not just the ones called during some time?
Thank you.
No, it's not possible, at least in any meaningful or general sense.
I can write a program that (for example) takes interactive input from the user in the form of a string, then uses GetProcAddress to find the address of a function by that name, and invokes that function.
Note that although using interactive input to read function names is fairly unusual, reading them from some external file is quite a bit more common.
Also note that a kernel driver isn't really the correct place to look either. If you want to do this, you want to intercept at the level of the DLLs used by the program.
One possibility is to create a "shadow" DLL for every DLL to which the program links statically. Then if it calls LoadLibrary/GetProcAddress, you can dynamically intercept those calls to determine what functions it's calling in them, and so on.
This still won't get an absolute result, since it could (as outlined above) get data at runtime to find functions in one execution that it doesn't use in another.
If you want an existing tool to do (approximately) that, consider depends.exe. It's been around for quite a while, and works quite well.

Is it possible to change the code in the program itself in c++?

About the last year I did Java(Android)-programming, and did C# the Year before that. About a month now I'm learning C++, and since I got over friends, inheritance and stuff, I got a few questions, since I haven't been working with it up until now:
Is there a way for a class to define friends later on, because they need to exchange information or something. e.g. is there a way to define a 'random' friend later on? what do you need for that? The function's name or the address of the class?
Or is there generally a way to change the code from the program itself, so that it won't be necessary to recompile? e.g. creating new functions, classes or so?
I'd be very happy about any answer about that.
What you want to do is not possible with C++. If you need that sort of dynamically changing the program, you are better advised using a more dynamic higher-level language like Lisp.
friends can only be added to a class by modifying its source code. This is a feature, not a bug.
There are two ways to extend functionality like that.
Use dynamically loaded modules with the extended functionality. These modules supply a specific interface, and can be compiled separately from the main program.
Add support for scripting - allow users to add write scripts, and run them from inside your program.
The first solution is easier, depending on how much control you want to give those scripts.