How do I ping from Flex - AIR? - apache-flex

I'm bored cause my development server is down and I'm running the command prompt to ping the server indefinitely so that I'll see when they stop timing out and know that I can work again. In the meantime I wanted to make an Air app that will do this for me, so I can have it chirp or alarm or do something when it starts to be able to connect to the server.
So I need to start with having AIR do the ping, does anyone know how to do this? I can't find any help on it. I can't use the HTTPService because whatever it is that is broken (think it's the VPN), our dev web site is still up.
Thanks

Otherwise you can use the NativeProcess class of the AIR 2.0 beta, and use the ping command of your operating system.
You can find informations on how to use it here.

According to the docs, SocketMonitor, descending from ServiceMonitor will check basic availability, but not a true ping. If you want to truly "ping" the server, you would need to use a socket an implement the protocol, This link to the Wikipedia article might help.

The AIR SDK offers some classes (URLMonitor, SocketMonitor) to handle this:
http://livedocs.adobe.com/flex/3/html/help.html?content=network_connectivity_1.html

Related

Can we monitor windows network information in realtime using minifilters?

I am trying to write a minifilter that more or less captures everything that happens in the kernel and was wondering if I could also capture "URLs"/network information; I stumbled upon windivert which seems to be using a .sys driver and also another thread which says we cannot get URLs in driver mode which leaves me a bit confused. If it is true then how does windivert do it?
I understand there is something called network redirect under minifilters on learn.microsoft.com which uses a dll and .sys file (same as windivert), but I could not find any resources that can help make me one.
Is there a better way to capture all visited URLs in real time?
Thanks in advance for any help or directions.
You're looking for Windows Filtering Platform and Filtering Platform Callout Drivers, which WinDivert is utilizing. This gives you the data that goes out over the wire, so for plain old HTTP over port 80 you can parse the requests to obtain the URL. This won't work for HTTPS since you're getting encrypted data over the wire; you'd have to implement some kind of MITM interception technique to handle that.

does anybody know any good opensource syslog reader tool?

I manage to send all my servers logs to a central syslog server. Now What? How do i make sense of this avalanche of data? does anybody know any good opensource syslog reader tool or any paid ones such as sawmill?
You might want to check out Sagan (http://sagan.io). Basically, it takes your logs as they come in and "detect" when bad things are happening. Sagan works a lot like the Snort IDS engine, but with logs instead of packets. Things that are detected can then be forwarded to a GUI like Snorby, Sguil, etc.
It's an open source project (GNU/GPLv2) and runs on *nix platforms. More information can be found at:
http://sagan.io
I know baretail, A free real-time log file monitoring tool
http://www.baremetalsoft.com/baretail/
Never tried it, but heard good things about it:
http://www.ossec.net/
It's perhaps more than what you asked for, but your question doesn't make exactly clear what you are looking for in the logs.
For displaying of the logs on a GUI you could check LogAnalyzer (http://loganalyzer.adiscon.com/)
Logstash, elasticsearch, and kibana is a nice modern stack for analyzing logs.

NBD client and server on same machine

Is there any way to run an NBD (Network Block Device) client and server on the same machine without deadlocking the system?
I am very exhausted looking to find an answer for this. I appreciate if anyone can help.
UPDATE:
I'm writing an NBD server that talks to Google Storage system. I want to mount a file system on the NBD and backup my files. I will be hugely disappointed if I have to end up running the server on another machine. Few ideas I already had seem to lead nowhere:
telling the file system to open the block device using O_DIRECT flag to bypass the linux buffer cache
using a raw device (unfortunately, raw devices are character devices and FSes refuse to use them as underlying device)
Just for the record, having the NBD client and server on the same machine has been possible since 2008.
Use a virtual machine (not a container) - you need two kernels, but you don't need two physical machines.
Since the front page of the Sourceforge project for NBD say that a deadlock will happen "within seconds" in this scenario, I'm guessing the answer is a big "No."
Try to write a more complete question of what actual goal you're trying to accomplish. There's some times that you need to bang away at a little problem, and some times that you need to look at the big picture.

Programmatically disable network auto-tune in Windows Vista

One of our applications is exhibiting poor network behavior on Vista due to the new network stack's auto-tuning functionality. I'm working on tracking down why the problem's happening, but in the meantime, it'd be wonderful if we could simply disable auto-tuning on our application for the time being. Is there any way to do so programmatically, ideally just on a per-application basis? The only solution I've found is to use an elevated command-prompt—not an acceptable solution for our users.
Try setting the SO_RCVBUF socket option on your applications TCP socket. This should override the auto-tuned receive window with the value you supply (see).

Tools for hacking Flex data connections

I'm in the process of building a test plan for validating the security of our Flex/J2EE application. I believe we have some issues with trusting the Flex application too much, but I need to be able to quantify those issues.
The ideal way would be a way to show me making data service calls outside of the application. Are there tools or instructions for how one might go about doing this? I really don't want to find these things out after we release to our beta customers. :)
Charles is an excellent HTTP debugging proxy which can parse AMF data and display it as a tree. You can also set "breakpoints" to intercept a HTTP call and modify the AMF data in either the request or response.
http://www.charlesproxy.com/
Fiddler on Windows is great for monitoring http connections.
First, give the port on which Flex communicates to the J2EE server, then using Ethereal or Wireshark you can watch if it use an encrypted channel :-)

Resources