A Session File is a repository containing various data items which describe the functionality of a System Proxy. A Session File may be automatically generated by QTAssistant when persisting the data captured by a tunneling proxy; or it may be created on demand using a built in wizard.
Technically, a Session File is a ZIP file, with the extension ".zmf". QTAssistant uses a special file "meta.xml" to store additional metadata about the files in the archive. For scenarios requiring customizations of the metadata, QTAssistant provides an editor with Intellisense and syntax coloring for easy of use.
UI Elements
A Session File is represented as a node in the Server Explorer tool window under a System Proxy/Sessions node.
|
Session File
|
|
Socket Exchange
|
|
Data Folder: Corresponds to a file folder in the repository; a mechanism to organize data.
|
|
Data Block (File): Corresponds to a file in the repository.
|
SocketExchange
A SocketExchange describes the communication flow between the client and the server over a socket. It can be defined statically, using a sequence of Event elements; or dynamically, using a script, written in JScript.NET, IronPython or IronRuby.
Static Socket Exchange
<SocketExchange caddress="10.92.30.187" cport="3051" taddress="10.239.255.157" tport="3051" hprotocol="ic4j90">
<Event code="SocketConnectedTargetHost" whenFired="633510286614255683"/>
<Event code="ClientDataBlock" whenFired="633510286615257103" dataPath="data2/0" encoding="application/binary"/>
<Event code="TargetHostDataBlock" whenFired="633510286615457387" dataPath="data2/1" encoding="application/binary"/>
<Event code="SocketClosedByRemoteSide" whenFired="633510286615457387"/>
</SocketExchange>
Dynamic Socket Exchange
<SocketExchange label="Scripted Emulator v1.0" hprotocol="http">
<MockScript dataPath="scripts/Appliance.js" language="jscript"/>
</SocketExchange>
Below is a simple script, which simply echoes back what was provided by the client in an HTTP POST.
import System;
import Paschi.NetworkingLib;
import Paschi.NetworkingLib.HttpHelpers;
class Script
{
function ProcessInput(session : TcpProxyServerConnection)
{
var http: HttpClientChatter = HttpClientChatter(session.ClientChatter);
var body : byte[] = http.RetrieveEntity();
var echo : byte[] = HttpUtils.QuickHttpResponse(HttpUtils._200,
http["Content-Type"], null, body);
Session.ResultBag.Add("DataBlock", echo);
return true;
}
}
FileDescriptor
A FileDescriptor provides additional information about the content of a file. It is typically used to load and control the appropriate editor in QTAssistant. Other uses include the ability to identify are retrieve data from a specific section of the file, called a File Region.
Below is an example of a file descriptor for an IMSConnect response data buffer, IBM EBCDIC (US-Canada) encoded.
<FileDescriptor dataPath="datafolder/myresponse" encoding="ibm037">
<Region name="Response" start="478">
<RegionViewer mimetype="application/x-cobol">
<Parameter key="copybook" value="copybooksfolder/mycopybook.cpy"/>
</RegionViewer>
</Region>
</FileDescriptor>
Socket Exchange Explorer
For large captures, the timing and temporal relationship between socket exchanges can be visualized and navigate by invoking the Analyse Socket Exchanges command.