I was wondering if anyone knows how (or even if it is possible) to monitor and trigger an action when a computer running windows (7-8) starts reciving a file transfer from over the network onto one of its drives.
Bonus points if I can find out how big the file is that the other guy is placing on my machine and how much is done etc...
I want to know if there is any API in windows, or snippit of code, or some other API that provides any of this functionality.
I still want to be able to recive files, I just want to manage them better. I am on a network with over 90 computers and this software that I wish to write would be running on most of them.
Of course you can (after all it's what an Antivirus program does) but it's NOT easy and probably you'll see it's more comfortable to do in C than in C#. I'm sure there's a .NET porting of WinPCap anyway you can always P/Invoke.
Start reading about Network Monitor SDK on MSDN. It's not an easy task, you have to capture a specific set of frames, you may use a Network Packet Monitor to inspect the content and the type of the packets you have to capture and parse.
I'm not sure but you may take a look to QoS API (start reading this article), it should provide something you can use.
Related
I am working on a project which includes a lot of VoIP functions. I don't have access to the source code of the previous system that was being used so I can't dissect it to find out what I need to know. I will describe how the previous system used to work and then ask my question.
First, the old system that we have been using depends on Physical Phones which receive calls over the internet. There is a Desktop App installed on our computer which somehow takes the phone call received by the phone and shows that phone number on the Desktop App. Which uses that number to look up data about the caller. But the problem is that this Desktop App is over a decade old and has not been updated since. So we want to build a new Web Based Application with .NET that will do the same. My question is:
1- How do I fetch the Caller Information From the Physical Phone and use it how I want? The phone being used is SNOM 760 but its possible that other brands or models be used in the future.
2- Let's say that a specific page is always opened on the browser. How do I transfer the caller number to the server and then show a pop up with the information about the caller in that page that's always opened in the browser in a RELIABLE way? What about when that specific page is not opened? Remember that the phone that is receiving this call is not directly in communication with the server. But that is also not a restriction. I read somewhere while researching that I could have my server take the call first and then transfer it to that physical phone. The only restriction is that we use VoIP phones/numbers.
Like I said, I have very vague information on the subject. Any help is appreciated. I've studied that I could use Twillio or other such third party services to achieve this task but I just wanted to know if I can do it myself instead of relying on someone else and hoping they don't shut down their services in the next few years.
Those are a lot of questions jammed into 1 there, I'll try to answer some.
As you already tagged it, TAPI is an option but not very easy to get into. TAPI normally get it's information centrally from the PBX, but in your particular case the SNOM system has the phones themselves connect to a central server to gather the information and distribute it there. You may be able to hook into a proprietary protocol.
Gathering calls on a central server to then distribute them to phones is usually done with an IVR (Interactive voice response). Channeling outside calls through it is easy but the problem with getting your call information from this point is usually you miss the internal calls.
Your website pop-up is not my area of expertise, maybe someone else could comment on the feasibility of that, but personally I would go with a task-tray style app if reliability is your highest priority.
Even though my long title spoils quite a lot of my question, I'll try to be more specific here.
I have 5 VMWare instances that all have their own tasks to do. They are hosted on one same computer. But I need one program (that I'm actually writing, duh) to get informations and to send informations such as keystrokes and mouse clicks. But from what I've red so far, communication between programs is quite hard to achieve and I haven't found any way to send keystrokes to an unfocused or reduced VMWare windows. Plus I would need to send different and specific keystrokes to each of my 5 VMWare instances.
My program will starts itself each 5 tasks in each 5 windows. The order doesn't matter as long as each instances have its own tasklist. I would need a way to keep track on each window's identity so I don't send let's say window 4's keystrokes to window 5. I would also need to be able to check periodically if each VMWare's instances is doing its job. Additionnaly my VMWare's instances are all running in a win7 environnement.
Now that the whole situation is explained, I'll sum up the question I'm currently submitting. Is there any way for my C# program to keep track of 5 VMWare's instances' identities and both send keystrokes (+ mouseclicks) and get at least screenshots of what's displayed on each of them even though they are reduced or unfocused ?
Thanks a lot.
Is there a way to get
You have an incorrect understanding of how VMWare works. VMWare isn't "running in a window". VMWare is running in a virtual machine at a very low level in your computer. What you see as a "window" is merely a "viewer" that allows you to connect to the remote machine (even though it's running on the local computer). This "viewer" is an application similar to the remote desktop client, or a VNC client. As such, there is very limited interaction between the OS and the host OS and the applications running in the guests.
This means that your host OS doesn't know anything about the individual applications running inside the guest OS, and you can't see it's window handles, or control mouse or keyboard events. In fact, the VMWare drivers "capture" the hardware and steal these events directly from the hardware, so there is no real way for your application to simulate a human interacting with the Virtual machine window.
What you COULD do, and this would be a lot of work, is create "agents" on each of the virtual machines that would have access to the applications running on them. These agents could listen for events on the network, and you could send events to them to do what you want. However, as I said.. this is likely a lot of work.
This whole thing sounds kind of cheesy to begin with, like you're trying to do something the hard way, but since you haven't told us what you're ACTUALLY trying to do.. we can't suggest any better alternatives.
A quick and dirty approach is to look into Visual Studio Test Controller and Agents. The idea is to install the agent on each one of the machines. You can then leverage the MSTest framework (wrongly called unit tests) to execute you c# code one each agent.
My understanding of how this stuff works is very limited, as I usually just make library calls which make the audio / video magically show up.
I want to be able to do MITM "attacks" to programs on my own computer. (I'd be the guy intercepting signals between the software and the hardware). This kind of thing could be useful in a number or scenarios.
For instance, for audio:
XP doesn't have a way to change the audio for specific programs while keeping the others unchange. It only has one audio
manager across all its programs. If I could intercept the signal (and
detect which program it was coming from) I could in theory make my own audio manager.
I could record conversations, possibly testing out any audio -> text software I may have/create.
many more.
For video:
(Primary goal here): record conversations. I have used a third party program, but I'm guessing what it is doing is taking snapshots because 1) the video is choppy and 2) when the mouse or other thing gets in the way of the video, it records that too. Wouldn't it be easier just to record the signal going to the video card from the specific program of my interest, then play it back when I want to see it again?
For network traffic:
For recording traffic to and from my computer, possibly discovering
programs that are communicating that shouldn't be.
For keyboard/mouse:
This could be useful for easily creating macros to fill out forms or
whatever, and I could custom encrypt the data to make sure it's
secure rather than relying on some third party software.
I'm sure there are many other applications for which this could be useful.
Thanks.
If I need to post this elsewhere let me know.
We have some old software thats being re-written, that uses a printerdriver to a propriatery printer.
I need to rewrite the software bypassing the print driver and go directly to the printer. I do have the specs for the printer communication, thats fine, but what Id like to do is monitor the communications to the printer to view its contents (from the existing software that Im re-writing) and compare it to the specs, and what I will be sending it for validation.
I have to make sure Im not missing anything.
Any ideas on how I might be able to accomplish this?
Thanks
To capture the traffic you have to basic options.
1. Use software
If you are using ethernet, you can use a program like WireShark or USBTrace to capture the packets that are being sent out. There are similar programs for USB.
2. Use hardware
Another option would be to use an external logic analyzer. It's basically a box that sits in-between the computer and the printer that captures all the data, then uses software to decode it. There are some inexpensive options available (USBEE, Bus Pirate, and Total Phase Beagle.
I own a USBEE and I've used it to debug a simple USB device. It works well enough for that. The software is a little clunky though.
In my scenario to print something, I don't want the printer has to be connected with a computer. Rather I am trying to connect that with a Modem(GSM or any other). when a sms arrives to the modem, the print command will fire and the sms will be printed.My question is, is it possible to implement the diagram with our existing technology? If not, i will be delighted if you provide some alternatives.
Unless you can customize the firmware of the GSM modem or the printer, it is likely you will need a small computer in between. If both can talk over serial ports, this can be really tiny - PIC, AVR (including packaged version such as Arduino), etc. If at least one needs USB you may be better off with a bare-metal Arm board. This is going to range from $2 at the low end to maybe $70 at the high. (There are also a few Arm boards that run an embedded .NET framework if that is your background... how well they run it I'm not sure)
If you need to do formatting, or the printer depends on the computer to do a lot of the work, or your engineers aren't familiar with the mindset of tiny embedded systems, you probably want something capable of running an operating system - ie, a faster Arm chip with hundreds of megabytes of memory - think Beagleboard, plugputer, Chumby Hacker Board, etc or one of those micro-servers that are basically x86 netbooks refactored for better cooling. Depending on how careful you are, this puts you anywhere from $50-$250.
You could also use an android phone (pick one with known USB host capability) and fold in the GSM capability, but may spend a lot of time tripping over the android components when all you really want is an embedded linux with a full libc. A more "linux-y" linux smartphone might be preferable if you can find one you expect will continue to be available.