I have started to explore CAPL Programming. I want to read an input from an XML document but not able to find how to do this. Is this supported in CAPL? If Yes, how do we do it? If No, what are the other type of external files supported in CAPL?
There is no build in xml parser in CAPL. You should be able to open a file with the following command:
OpenFileWrite ("Log.txt",2);
Look in CAPL help for more file functions.
Related
I'm new to Rust.
I have written a few Hello World programs and the program I usually try to write next interacts with the web in some way. I usually try downloading a file. I figured I could learn something about the Rust "net" and "io" areas. But I have not been able to find an example of how to do this in Rust.
Are there any capabilities in the Standard Library to download a file from a URL?
Rust's standard library has no HTTP functionality. You will have to use a third-party library like curl or hyper or implement something yourself.
what I did -
Got a wireshark capture of web traffic.
Edited the capture file to remove one GET request. (removed that line using editcap)
Saved the edited file (from step 2)
Did a tcpreplay of this file.
When I do this, I get an error: Fatal Error: Error opening pcap file: bad dump file format.
Any inputs on what could be wrong? Am I doing something wrong in the way I have edited my wireshark pcap file?
thanks,
Andy
The default editcap capture file output type is pcapng.
A quick look at the tcpreplay docs shows mentions only of libpcap format (and not pcapng).
So: Maybe the solution is to specify the '-F pcap' option to editcap to specify the capture file output format as libpcap format.
Update:
From the tcpreplay FAQ:
"Does Tcpreplay support Pcap-Ng/NTAR files?
Yes. The Tcpreplay suite uses ​libpcap for reading & writing pcap files. If you have libpcap 1.1.0 or higher, then tcpreplay, tcprewrite, etc can read pcap-ng files. If you have an older version of libpcap, you should upgrade to the latest version as earlier versions of libpcap have bugs with pcap-ng files. "
So: (assuming that you're using a version of libpcap >= 1.1.0) I'm not sure what the problem is. You might still want to try specifying pcap output format to see if that makes a difference.
Also: Are you able to read the original capture file (before editing) with tcpreplay ? (What is the format of the original file ? (Use 'capinfos filename' to determine the file type).
Can anybody tell me how xml file can be represented in binary tree? Actually i am studying clish framework and found that here xml file is represented in binary tree when I searched for the same did not get answer.
Thanks in advance.
Don't know if this is what you are looking for,but take a look at following link it will give you brief idea of how it is done Implementation of the Tree Structure
in the XML
Does anyone know if it is possible to convert a sound file in the Documents directory from within an app? I have a recorded sound file that will be available in iTunes File Sharing that I need to convert. Is afconvert available from within iOS?
Thanks
I'm not sure from what format to what format you want to convert to, but converting audio during runtime is not as simple as the command-line afconvert tool.
Check out Apple's sample projects iPhoneACFileConvertTest or ConvertFile. I think these would be good starting points if you want to convert audio in your app.
For what it's worth, afconvert is just a handy command-line interface to the features of the ExtAudioFile API which you can find in -- Using this API you can convert from any supported file format/audio format combination TO any supported file format/audio format combination.
We are capturing packets to a file using tcpdump(). I need to write a program to parse it, does anyone know where I could find a file layout for a dump file created by this tool?
tcpdump uses libpcap; there are docs describing the libpcap file format which should give you what you need.
The easiest way to parse the file is to read it with libpcap; libpcap can be used directly from C and C++, and there are wrappers for a number of other languages. That way you don't have to know what the file layout is (and you will also be able to read at least some pcap-ng files if your program is using libpcap 1.1 or later).