Analyze netmon .cap file with logparser

Hi all,
I'm trying to analyze a cap file with logparser. I'm exporting all the content of the file to a CSVfile. But when I open the CSV file, it doesn't shows source IP and destination IP for any of the packets. Whereas if I open the file with network monitor,
it does shows all the information. I'm using below mentioned query to export the data to CSV.
logparser -i:netmon "SELECT * INTO test.csv FROM test.cap"
Regards, Darshan G. Parab

Per
http://blogs.msdn.com/b/ambhrin/archive/2012/05/08/working-with-netmon-amp-wireshark-traces.aspx,
"Known issues on Windows 7
If you are trying to parse the Netmon trace File through Logparser, the SrcIP and the DstIP fields might appear to be blank. This is a known issue with Win 7. However parsing should work just fine on a XP or a Win 8 machine."
-Steve

Similar Messages

  • Cap file analyzer program?

    Hello all,
    Is there any program to analyze the cap file?
    the program read the cap file and print out or make a file with cap file information by components user kindly format. like Header Component.tag = 0x01 size=0x0A .....
    Thanks,
    Julie.

    hi:
    i write a program that can parse CAP file, hope that is helpful to you.
    http://www.akaembed.org/Inetpub/uploads/AKA_Mail/JavaCard/CAPParser/CAPParser.exe
    Good Lucky!

  • Error converting to cap file

    Hello everyone,
    I tried to follow sample of java card kit, but I've got this error when I 'd like to convert class file to cap file with converter.
    Assertion (precondition) [member != null] failed at:
    What's wrong ????
    It's out only jca and exp file but not cap file.
    Could you please tell me how to generate cap file?
    Thank you very much,

    I' m sorry.
    I found this in another topic that I have to compile with jdk1.3.x.
    Thanx,

  • Sent step by step apdu command to load cap file into javacard

    Dear All,
    I have log file about process loading cap file into card:
    Loading "E:\Sample.cap" ...
    T - 80F28000024F00
    C - 08A000000003000000019E9000
    ISD AID : A000000003000000
    T - 80E602001407A000000132000108A00000000300000000000000
    C - 009000
    T - 80E80000C8C48209B6010011DECAFFED010202010107A000000132000102001F0011001F00000015009A005D0772000A00C8001B03E400020000000002000004001502000107A0000000620001000107A000000062010106005D80810000C20000810200800000FF000100000000810500FF0003000000028000130008010D000002CA02DE02E202E702EE02F602FB0308032B036204AA04C804E8000009040308020705060C0D00010D040308020705060C0D090A0B010707720003201D046D06048D00141C7500120001000300
    C - 009000
    T - 80E80001C800098F00163D1D8C001A77068D001401770110188C001B7A0220181D8C001C7A03101C026B07017F001D7A7B001D670D8F001F3D1C8C00207F001D7B001D1C8B00127B001D93038903290803290903290A03290B03290D03290E707F1506160E251100FF53290C160C606D1B1604160E41251100FF53290D160D605C191E160E41251100FF531505160E251100FF53435B290F160F6308160F0245290F160F10096D075909017005590801160F10146D27160D160C432910161063081610024529101610100C6D0700
    C - 009000
    T - 80E80002C8590B01700B161010106F05590A01590E01160E1607A4FF7F1100961609411608430547290F160F630703290F700E160F1100FF6F071100FF290FAD0005160F5B38104B160B41160A43290F160F630703290F700E160F1100FF6F071100FF290FAD0007160F5B387A045603290503290603290704290803290916066008160610096F0F1B1607590701251100FF53290616056008160510096F0E191E590201251100FF532905160610096F2E160510096F281605160643290A160A6308160A0245290A160A10086D00
    C - 009000
    T - 80E80003C80C16091008160A434129095908017042160610096F0E590801160565355905FF7030160510096F0E590801160665235906FF701E160616056F0E16061605432906032905700C1605160643290503290616071604A4FF5D1609106445290916096307117FFF29091609160847290916091100FF6F071100FF2909AD000316095B387A0430191E0441251100FF5375002D00020081000D0082001B18068901191E0541251100FF537818078901191E054125191E0641258D001778191E0441251100FF53107F6E101800
    C - 009000
    T - 80E80004C8058901191E0441251100FF537803780320188C001B18110100900B870218110118900B870318110118900B870418110080900B87051808900C8706181D880718AE0788081804048D00138709181006048D00158700181006048D0015870A7A02201D046D06048D0014181D880718AE0788087A011006780110AE0B780210AD090325780310AD090303387A0110AE08780330191E1103008D00183B057805501D1604411100806F040378AE0B6106078D0014AD051D1A1F16048D00193B1604780540AD090303381800
    C - 009000
    T - 80E80005C803880B1803890C1803890D1803890E1803880F1F60081FAD05926F06058D0014191EAD05031F8D00193B1804880F7A0543032905AE0B046B06088D001419031E41257501300002FFC600110000000D058D00141819031E418C001E290618AF011E41890119AF0125066A06058D00141806881008AF01412904A800E2181916048C001E2905191604257300C800010004000F0031008600A71605AD02926F06058D0014191604AF0141AD020316058D00193B181605890CA8009AAD0603191604AF0141251100FF5300
    C - 009000
    T - 80E80006C839AD0604191604AF01410441251100FF5339AD0605191604AF01410541251100FF5339AD0606191604AF01410641251100FF5339AD0607191604AF01410741251100FF533970441605AD03926F06058D0014191604AF0141AD030316058D00193B181605890D70231605AD04926F06058D0014191604AF0141AD040316058D00193B181605890E700216041605AF014141290416041606A7FF1DAF0CAF0D41AF0E41610C058D00147006058D00147A0210AE0B046A0BAE0F6007AE10066A06088D00141804880B1800
    C - 009000
    T - 80E80007C8AE0788087A0440AD09030338AE0B6106078D0014180488111F650A18191E1F8B00217802780846032905032906032907032908AE116106088D0014AE0861040378AE107501DF00010003000918191E8C001E29091FAF011609416C6B04AF01412904705D181916041E418C001E29051916041E41257300400000000400110013004000220031702F1605652B1E160441AF0141290870201605651C1E160441AF0141290670111605650D1E160441AF01412907700216041605AF0141412904160416096FA1AD060700
    C - 009000
    T - 80E80008C8261100FF53290916091609452909AD0A0316098D00183B16069800B916079800B418191606191607AD03AD04AF0E8C0022AD0007251100FF53AD0606264510084F29091609AD0607266C14AD0903043818AE078808180388111140007816091609452909AD000716098D00183BAD0005251100FF53AD0605264510084F29091609AD0607266C14AD0903043818AE078808180388111140007816091609452909AD000516098D00183BAD0005AD0007AD0A058D0023AD0A05AD0A038D00246214AD0903043818AE0700
    C - 009000
    T - 80E80009C8880818038811114000781608604918191608AD02AF0C8C0025AD0003251100FF53AD0604264510084F29091609AD0607266C14AD0903043818AE078808180388111140007816091609452909AD000316098D00183BAD0003AD0A05AD0A078D0023AD0A07AD0A038D00246214AD0903043818AE0788081803881111400078AD09030338AE086511183D840804435B88087006058D0014037803430329047031181D160441251100FF5329051A1F160441251100FF532906160516066F040478160516066D0402781600
    C - 009000
    T - 80E8000AC80404415B29041604056CCE03780462032906042907703D181D160741251100FF531A1F160741251100FF534116064129061504160516074116065B3816061100FF6F070429067005032906160704435B2907160763C37A08000A000200010000000000000A001B0500000000000100000004000000130002002B003300090001000105009A002602001D0602001D0B02001D0002001D0102001D0202001D0302001D0402001D0D02001D0E02001D0502001D0702001D0F02001D0802001D0902001D0A02001D110200
    C - 009000
    T - 80E8000BC8001D0C02001D10038105020681080C060000330681080D01001D000681100506811006068110020600027A06800000068105000500000006000225010013000600002B03001D0D0600005906000728060006EB060001430900C8008BFF1726E2220E1F1A080808060403020809090F0302090507081D08100704040404060B0A082A04030C03260C030C050609060B060B060B060F0C030C060C030C080D02031205040B030205050A1D08061408330F0F0B0C111A020205080C060602040D09080C060602040D0900
    C - 009000
    T - 80E8800C5A03030603080602040E0205080C060602040D090303060308060204060506050039090D050508080B04050503030403FFFF06243509090D31180A2C091416081414200E690E130E270615190E19171B711B3B3C0D09233B0D092C00
    C - 009000
    Completed !
    However, I want to run step by step a command to load this cap file into card.
    When I sent "80F28000024F00", it is ok. It response: 08A000000003000000019E9000
    After that, I sent next command: 80E602001407A000000132000108A00000000300000000000000, it response as 6985.
    I don't understand why. Please help me this problem. I must do how to load this cap
    Thanks & Best Regards
    Kelvin Nguyen

    Hi,
    You need to delete the old CAP file before loading it again. The problem is that when you call INSTALL FOR LOAD it sees there is already a CAP file with that AID present.
    You can try sending a GET STATUS command listing load files to see what is on the card already. You need to delete what is present to be able to load/install again.
    Shane

  • Install CAP file ERROR "6A 80"

    Hi everyone !
    I created CAP file with java card dev kit 2.1.2 and success to upload on card . But when i tried to install it returned the error 6A 80 (Wrong data) . Here is the error :
    <= 90 00 ..
    Status: No Error
    Load report:
    18048 bytes loaded in 10.3 seconds
    effective code size on card:
    + package AID 7
    + applet AIDs 13
    + classes 67
    + methods 15203
    + statics 254
    + exports 0
    overall 15544 bytes
    => 84 E6 0C 00 24 07 48 55 4E 45 49 44 01 06 48 55 ....$.HUNEID..HU
    4E 45 49 44 06 48 55 4E 45 49 44 01 00 02 C9 00 NEID.HUNEID.....
    00 6A 1D BD 2B 5F BE 82 2A 00 .j..+_..*.
    (1746340 usec)
    <= 6A 80 j.
    Status: Wrong data
    i tried to do the same step with the sample applet in JCK 2.1.2 and they run smoothly .
    Thanks in advance for any help !

    hi
    use install command like this example:
    applet id : a00000006203010c0101 length : 10 decimal 0a hex
    package id : a00000006203010c01 length :9
    80 e6 0c 00 26
    09a00000006203010c01 0aa00000006203010c0101 0aa00000006203010c0101 0100 02c90000

  • "Cap file can not load on java card"

    Hi every one,
    My problem is :
    I created a cap file from my package .when I want to load cap file in the card, I got an error and loading was stoped.I opened the cap file with "HexEditor" program and I saw the version in the "Import.cap" file is "02 01", when I changed it to "00 01" my problem was solved and I could load the cap file in the card successfully.
    I would like to know what is the reason of this problem ,how the capfile gets "02 01" version ?
    And I would like to know, how can I find the version of sun library packages that are in the java card that I am working with(it is GemXpresso card).My mean is , the version of these packages on the card :
    A0000000620001 (java.lang)
    A0000000620101 (javacard.framework)
    A0000000620102 (javacard.security)
    A0000000620201 (javacardx.crypto)
    I 'll appreciated for any help.
    yours sincerely,
    Orchid

    Dear NewOrchid
    j2sdk-1_4_2_15-windows-i586-p.exe is 48.9 MB.
    i downloaded it from sun with using a proxy server software.
    if you like, i can send my software to your email.
    to Woj:
    if you use jdk1.5 for compiling and your card doesn't conform to
    java card 2.2.2 , you can not load your cap file on the card.

  • Unable to load the cap file to the JCOP card

    I develop my applet by JCOP IDE and it works well in the VM. But when I want to load it on my JCOP card, I face a problem. it can successful send the 1st 254 bytes, but always return 6A86 when send the second 254 bytes to the card.
    Status: Incorrect parameters (P1,P2)
    Error code: 6a86 (Incorrect parameters (P1,P2))
    Offending APDU: 6A86
    Wrong response APDU.
    I don't know why this happen. Can anyone show some light on that. Thank you in advance.

    Have you written your own loader for this ?
    What is the prompt "cm>" from, is that a standard Java Card tool ?
    Looking at the data I can see, its looks well formed. However when I wrote my own loader I found I could only send 239 bytes of data (255 - 16) otherwise I'd get an error. Maybe part of this is todo with the option of using M-DAP to MAC each APDU. FYI its a JCOP10 I'm using.
    Also my data was never concatentated, that is to say, check your 'FileSystem.cap' file with "unzip -tv FileSystem.cap" for the real CAP files. Each of these files never crossed an APDU boundary, the first one Header.cap (IIRC) is a small file, so my first APDU was less than 40 bytes of actual data (with C4 TLV data before it), certainly not 254 bytes.
    I'm not sure if this is allowed or not, I've plans to try it out soon and see myself since i've not read anything that says you can not do this.
    This is the only obvious difference I can see to other loader scripts and programs I have seen.

  • Analyzing and recognizing a sound file with a squeak

    I am running a brake test on a piece of equipment. I would like to be able to use Labview and a microphone, record every stop cycle and analyze the wav file for a squeak. I would just like to be able to keep track of how many squeaks occured during testing. I am using the professional development system of Labview 7.0. Any suggestions would be greatly appreciated. I have included two wav files with this posting, one squeak, one no squeak. Thanks!
    Attachments:
    no_squeak.wav ‏97 KB
    squeak4.wav ‏62 KB

    Hi,
    A response to your posting can be found at:
    Analyzing a wav file recorded with a microphone for a high pitch squeak
    I hope this helps
    Sincerely,
    Feroz

  • Verify user pin on a smart card & load a cap file on a card (with eclipse)

    I have been able install JCWDE (Java card development Kit) successfully on eclipse.Basically all I need to do is verify user pin on a smart card.As in first set a pin and then verify it.
    To begin with I have referred many tutorials (here: http://www.javaworld.com/jw-07-1999/jw-07-javacard.html?page=1) and implemented the wallet code in eclipse.I have the cap file generated and the scripts generated.I am not sure how to load it on the smart card with eclipse.
    I tried to deploy the cap file but it keeps saying connected.Also when we initiate the applet I get the same result.
    output:
    Java Card 2.2.2 APDU Tool, Version 1.3
    Copyright 2005 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.
    Opening connection to localhost on port 9032.
    Connected.
    I have also tried : http://www.cs.ru.nl/E.Poll/hw/practical.html ........ but no luck.
    I have the wallet.cap ,wallet.exp ,wallet.jca ,wallet.opt create.script, select,cap-download.scripts files already generated in eclipse.
    How does a successfully implemented applet code on a smart card work?How does this wallet code work if it is successfully implemented ? Does it have like some GUI which prompts the user to enter the pin?
    Wallet code for reference :
    package com.sun.javacard.samples.wallet;
    import javacard.framework.*;
    public class Wallet extends Applet {
    /* constants declaration */
    // code of CLA byte in the command APDU header
    final static byte Wallet_CLA =(byte)0x80;
    // codes of INS byte in the command APDU header
    final static byte VERIFY = (byte) 0x20;
    final static byte CREDIT = (byte) 0x30;
    final static byte DEBIT = (byte) 0x40;
    final static byte GET_BALANCE = (byte) 0x50;
    // maximum balance
    final static short MAX_BALANCE = 0x7FFF;
    // maximum transaction amount
    final static byte MAX_TRANSACTION_AMOUNT = 127;
    // maximum number of incorrect tries before the
    // PIN is blockedd
    final static byte PIN_TRY_LIMIT =(byte)0x03;
    // maximum size PIN
    final static byte MAX_PIN_SIZE =(byte)0x08;
    // signal that the PIN verification failed
    final static short SW_VERIFICATION_FAILED =
    0x6300;
    // signal the the PIN validation is required
    // for a credit or a debit transaction
    final static short SW_PIN_VERIFICATION_REQUIRED =
    0x6301;
    // signal invalid transaction amount
    // amount > MAX_TRANSACTION_AMOUNT or amount < 0
    final static short SW_INVALID_TRANSACTION_AMOUNT = 0x6A83;
    // signal that the balance exceed the maximum
    final static short SW_EXCEED_MAXIMUM_BALANCE = 0x6A84;
    // signal the the balance becomes negative
    final static short SW_NEGATIVE_BALANCE = 0x6A85;
    /* instance variables declaration */
    OwnerPIN pin;
    short balance;
    private Wallet (byte[] bArray,short bOffset,byte bLength) {
    // It is good programming practice to allocate
    // all the memory that an applet needs during
    // its lifetime inside the constructor
    pin = new OwnerPIN(PIN_TRY_LIMIT, MAX_PIN_SIZE);
    byte iLen = bArray[bOffset]; // aid length
    bOffset = (short) (bOffset+iLen+1);
    byte cLen = bArray[bOffset]; // info length
    bOffset = (short) (bOffset+cLen+1);
    byte aLen = bArray[bOffset]; // applet data length
    // The installation parameters contain the PIN
    // initialization value
    pin.update(bArray, (short)(bOffset+1), aLen);
    register();
    } // end of the constructor
    public static void install(byte[] bArray, short bOffset, byte bLength) {
    // create a Wallet applet instance
    new Wallet(bArray, bOffset, bLength);
    } // end of install method
    public boolean select() {
    // The applet declines to be selected
    // if the pin is blocked.
    if ( pin.getTriesRemaining() == 0 )
    return false;
    return true;
    }// end of select method
    public void deselect() {
    // reset the pin value
    pin.reset();
    public void process(APDU apdu) {
    // APDU object carries a byte array (buffer) to
    // transfer incoming and outgoing APDU header
    // and data bytes between card and CAD
    // At this point, only the first header bytes
    // [CLA, INS, P1, P2, P3] are available in
    // the APDU buffer.
    // The interface javacard.framework.ISO7816
    // declares constants to denote the offset of
    // these bytes in the APDU buffer
    byte[] buffer = apdu.getBuffer();
    // check SELECT APDU command
    if (apdu.isISOInterindustryCLA()) {
    if (buffer[ISO7816.OFFSET_INS] == (byte)(0xA4)) {
    return;
    } else {
    ISOException.throwIt (ISO7816.SW_CLA_NOT_SUPPORTED);
    // verify the reset of commands have the
    // correct CLA byte, which specifies the
    // command structure
    if (buffer[ISO7816.OFFSET_CLA] != Wallet_CLA)
    ISOException.throwIt(ISO7816.SW_CLA_NOT_SUPPORTED);
    switch (buffer[ISO7816.OFFSET_INS]) {
    case GET_BALANCE:
    getBalance(apdu);
    return;
    case DEBIT:
    debit(apdu);
    return;
    case CREDIT:
    credit(apdu);
    return;
    case VERIFY:
    verify(apdu);
    return;
    default:
    ISOException.throwIt(ISO7816.SW_INS_NOT_SUPPORTED);
    } // end of process method
    private void credit(APDU apdu) {
    // access authentication
    if ( ! pin.isValidated() )
    ISOException.throwIt(SW_PIN_VERIFICATION_REQUIRED);
    byte[] buffer = apdu.getBuffer();
    // Lc byte denotes the number of bytes in the
    // data field of the command APDU
    byte numBytes = buffer[ISO7816.OFFSET_LC];
    // indicate that this APDU has incoming data
    // and receive data starting from the offset
    // ISO7816.OFFSET_CDATA following the 5 header
    // bytes.
    byte byteRead =
    (byte)(apdu.setIncomingAndReceive());
    // it is an error if the number of data bytes
    // read does not match the number in Lc byte
    if ( ( numBytes != 1 ) || (byteRead != 1) )
    ISOException.throwIt(ISO7816.SW_WRONG_LENGTH);
    // get the credit amount
    byte creditAmount = buffer[ISO7816.OFFSET_CDATA];
    // check the credit amount
    if ( ( creditAmount > MAX_TRANSACTION_AMOUNT)
    || ( creditAmount < 0 ) )
    ISOException.throwIt(SW_INVALID_TRANSACTION_AMOUNT);
    // check the new balance
    if ( (short)( balance + creditAmount) > MAX_BALANCE )
    ISOException.throwIt(SW_EXCEED_MAXIMUM_BALANCE);
    // credit the amount
    balance = (short)(balance + creditAmount);
    } // end of deposit method
    private void debit(APDU apdu) {
    // access authentication
    if ( ! pin.isValidated() )
    ISOException.throwIt(SW_PIN_VERIFICATION_REQUIRED);
    byte[] buffer = apdu.getBuffer();
    byte numBytes =
    (byte)(buffer[ISO7816.OFFSET_LC]);
    byte byteRead =
    (byte)(apdu.setIncomingAndReceive());
    if ( ( numBytes != 1 ) || (byteRead != 1) )
    ISOException.throwIt(ISO7816.SW_WRONG_LENGTH);
    // get debit amount
    byte debitAmount = buffer[ISO7816.OFFSET_CDATA];
    // check debit amount
    if ( ( debitAmount > MAX_TRANSACTION_AMOUNT)
    || ( debitAmount < 0 ) )
    ISOException.throwIt(SW_INVALID_TRANSACTION_AMOUNT);
    // check the new balance
    if ( (short)( balance - debitAmount ) < (short)0 )
    ISOException.throwIt(SW_NEGATIVE_BALANCE);
    balance = (short) (balance - debitAmount);
    } // end of debit method
    private void getBalance(APDU apdu) {
    byte[] buffer = apdu.getBuffer();
    // inform system that the applet has finished
    // processing the command and the system should
    // now prepare to construct a response APDU
    // which contains data field
    short le = apdu.setOutgoing();
    if ( le < 2 )
    ISOException.throwIt(ISO7816.SW_WRONG_LENGTH);
    //informs the CAD the actual number of bytes
    //returned
    apdu.setOutgoingLength((byte)2);
    // move the balance data into the APDU buffer
    // starting at the offset 0
    buffer[0] = (byte)(balance >> 8);
    buffer[1] = (byte)(balance & 0xFF);
    // send the 2-byte balance at the offset
    // 0 in the apdu buffer
    apdu.sendBytes((short)0, (short)2);
    } // end of getBalance method
    private void verify(APDU apdu) {
    byte[] buffer = apdu.getBuffer();
    // retrieve the PIN data for validation.
    byte byteRead = (byte)(apdu.setIncomingAndReceive());
    // check pin
    // the PIN data is read into the APDU buffer
    // at the offset ISO7816.OFFSET_CDATA
    // the PIN data length = byteRead
    if ( pin.check(buffer, ISO7816.OFFSET_CDATA,
    byteRead) == false )
    ISOException.throwIt(SW_VERIFICATION_FAILED);
    } // end of validate method
    } // end of class Wallet
    Any help on this would highly appreciated !! :)

    Hi,
    Thanks a lot for reply.But I am not sure as to how can I delete the simulator.
    All I want to do is write a pin on the smart card and verify it.But I am not being able to deploy the cap file or initiate the applet.
    Also for passing the pin correct me if I am wrong........ according to what you said and what I have understood
    If the code is like this :
    public static void install(byte[] bArray, short bOffset, byte bLength) {
    // create a Wallet applet instance
    new Wallet(bArray, bOffset, bLength);
    } // end of install method
    byte aLen = bArray[bOffset]; // applet data length
    // The installation parameters contain the PIN
    // initialization value
    pin.update(bArray, (short)(bOffset+1), aLen);
    Lets say my pin is : 1234
    then I would pass it here.....
    new Wallet(bArray, 1234, bLength);

  • How to Load the cap file to the SSD with DAP

    Dear everybody,
    How to use upload, load and install command to load cap file to the SSD with DAP?
    My step:
    1 I have already input the DAP Key into the SSD.
    2 Select ISD
    3 Do auth
    4 Upload -s ssdaid -d "XXX.cap", but JCOP return 6985.
    I don't kown why.
    Thank you very much.
    Edited by: Ivy_D on May 20, 2009 12:16 AM

    (The JCOP3.1,1 Eclipse Plugin's emulator) install for load still complains 6985 after i did these belows step by step. I will appreciate yours helps very much!
    1: install a new security domain.
    cm> install -s -b -i A000000003535042 A0000000035350 A000000003535041
    => 80 E6 0C 00 20 07 A0 00 00 00 03 53 50 08 A0 00 .... ......SP...
    00 00 03 53 50 41 08 A0 00 00 00 03 53 50 41 01 ...SPA......SPA.
    C0 02 C9 00 00 00 ......
    (5227 usec)
    <= 90 00
    cm> /select A000000003535041
    => 00 A4 04 00 08 A0 00 00 00 03 53 50 41 00 ..........SPA.
    (2303 usec)
    <= 6F 10 84 08 A0 00 00 00 03 53 50 41 A5 04 9F 65 o........SPA...e
    01 FF 90 00 ....
    Status: No Error
    2.1 use the ISD key to build a security channle by ISD to personalize the new secuirty domain
    cm> set-key 255/1/DES-ECB/404142434445464748494a4b4c4d4e4f 255/2/DES-ECB/404142434445464748494a4b4c4d4e4f 255/3/DES-ECB/404142434445464748494a4b4c4d4e4f
    cm> auth
    => 80 50 00 00 08 40 74 01 18 F9 FA 68 07 00 [email protected]..
    (2274 usec)
    <= 00 00 57 F3 97 D9 7F 72 88 55 FF 02 00 02 81 8D ..W....r.U......
    91 65 B4 F2 A9 29 B2 C0 A4 AD FD C5 90 00 .e...)........
    Status: No Error
    => 84 82 00 00 10 DE 01 A2 F1 79 12 8F 2E 87 6F FE .........y....o.
    63 0E E4 5D 40 c..]@
    (1969 usec)
    cm> put-pub-key --tokenpin 123456 115 c:/gptest.p12
    => 80 D8 00 01 88 73 A1 80 EA 15 24 8C 5C 26 E1 31 .....s....$.\&.1
    02 FE B1 44 0E 37 4F D5 49 29 25 14 5C 7B E0 63 ...D.7O.I)%.\{.c
    87 0C E8 B8 03 FF AF 0B F2 2B 54 6A 16 4A D6 8F .........+Tj.J..+
    EE B6 E0 1A 29 F2 13 E8 2B 04 FC 5F 2F D2 51 ED    ....)....._/.Q._
    _18 40 D3 E1 AF 36 CA A2 58 45 AC 38 3D 5F D4 56 [email protected]=_.V
    56 D8 87 5D 45 86 B9 36 F0 07 88 AD 59 78 A1 03 V..]E..6....Yx..
    2D F4 DE E9 51 E3 75 65 E3 2B B7 49 11 A5 E3 75 -...Q.ue.+.I...u
    39 25 1C 44 FB D5 3C 57 40 DD 64 22 D0 0A 8E 88 9%.D..<[email protected]"....
    2C 52 7B E2 67 A4 0B 65 A0 03 01 00 01 00 ,R{.g..e......
    (2614 usec)
    <= 73 90 00
    cm> card-info
    => 80 F2 80 00 02 4F 00 00 .....O..
    (1488 usec)
    <= 08 A0 00 00 00 03 00 00 00 01 9E 90 00 .............
    Status: No Error
    => 80 F2 40 00 02 4F 00 00 [email protected]..
    (2125 usec)
    <= 08 A0 00 00 00 03 53 50 42 0F C0 90 00 ......SPB....
    Status: No Error
    => 80 F2 10 00 02 4F 00 00 .....O..
    (1794 usec)
    <= 07 A0 00 00 00 03 53 50 01 00 01 08 A0 00 00 00 ......SP........
    03 53 50 41 90 00 .SPA..
    Status: No Error
    Card Manager AID : A000000003000000
    Card Manager state : OP_READY
    Sec. Domain:{color:#ff0000}PERSONALIZED (SV------) A000000003535042{color}
    Load File : LOADED (--------) A0000000035350 (Security Domain)
    Module : A000000003535041
    cm> /cap-sign --tokenpin 123456 a.cap A000000003535042 c:/gptest.p12
    cm> /cap-info a.cap
    SHA (Load File data): {color:#ff0000}1BD8F3CCC0042A5EEF9845FA3C667834051F4FAD{color} -- Load File Data Block Hash
    SHA (Load File dbg) : A36B4AED89FF8C4B8D8BBDDEB40757E36477143F
    SHA (Load File) : 0D4AD84E20D00C26ABA1BF5677636414234F5743
    DAP block(s) :
    DAP block : 1
    AID : A000000003535042
    Signature : 19F414292C00F9B7C89E7341A13AF15B
    CCF90D17A112418EAF556B5172EBE39C
    E05DF0CDDD68EFD2559CC7EC591878DF
    14B5C0FBC5C6CF6A0DC6E50B4AC99216
    7D6C46DC4098E0A1AC11DB69596E4A71
    F34CBFBD7DFABA88C6E8C2348FF8A9FC
    A8E22074B4D1B9D2AB5993A539BE8E1F
    6187252B9912909AE1DA4E5FAE866960
    Algorithm : VOP 2.0.1'
    Signed by : c=CN, st=beijing, l=beijing, o=logis, ou=logiscn, cn=gptest
    Load Token(s) : none
    Install Token(s) : none
    then send install for load
    cm> send 80E602002908{color:#ff0000}72666370626F6332{color}08{color:#ff0000}A000000003535042{color}14{color:#ff0000}1BD8F3CCC0042A5EEF9845FA3C667834051F4FAD{color}000000
    => 80 E6 02 00 29 08 72 66 63 70 62 6F 63 32 08 A0
    00 00 00 03 53 50 42 14 1B D8 F3 CC C0 04 2A 5E
    EF 98 45 FA 3C 66 78 34 05 1F 4F AD 00 00 00
    (3108 usec)
    <= 69 85 i.
    Status: Conditions of use not satisfied

  • CAP file analyzer - easy method size acquisition

    Hi all,
    I want to calculate how many bytes each method I have in my JavaCard applet takes. Right now, I am deleting the body of my methods (effectively turning that into a stub) and compile, and subtract the new size from the size of my CAP before removing the method. Can there be an easier way to do this? (A tool to analyze CAP itself, maybe?)
    Any directions greatly appreciated..
    Regards,
    Burak

    hi:
    i write a program that can parse CAP file, hope that is helpful to you.
    http://www.akaembed.org/Inetpub/uploads/AKA_Mail/JavaCard/CAPParser/CAPParser.exe
    Good Lucky!

  • Pls help with .CAP file.

    Hi.
    I read a lot about how to write java applet for smart card and after read a lot about how to convert .class file into a .CAP file. But I don't know where to find informatin about what to do further. Pls can you tell or give link to a text which explains how to install .CAP file on a smart card and which tool to use in order to save .CAP file on a smart card.
    Thx

    It depends what installer/deletion manager your card supports. Most likely it is GlobalPlatform. Check out GlobalPlatform 2.1.1 card specification.

  • How to generate APDU to load a cap file?

    Below is a code to load a cap that I got here.
    public byte[] readJar(File file) throws IOException {
              int BLOCK_SIZE1;
              String[] xCaps;
              if(installDescriptor){
                   xCaps = iCapsWD;
              }else{
                   xCaps = iCapsWoD;
              JarFile jf = new JarFile(file);
              Enumeration e = jf.entries();
              byte[] result = new byte[(int)file.length()];
              int size = 0;
              int dsize = 0;
              JarEntry je;
              boolean found;
              InputStream is;
              //byte[] temp;
              for (int i = 0; i<xCaps.length; i++){
                   found = false;
                   e = jf.entries();
                   System.out.println("searching: "+xCaps);
                   while (e.hasMoreElements()){
                        je = (JarEntry)e.nextElement();
                        //System.out.println("component:"+je.getName());
                        if(je.getName().endsWith(xCaps[i])){
                             found = true;
                             is = jf.getInputStream(je);
                             int dim = (int)je.getSize();
                             //temp=new byte[dim];
                             System.out.println("found cap to install: "+xCaps[i]+" of length:"+dim);
                             try{
                                  //int dim = is.available();
                                  //is.read(temp);
                                  //printApdu(temp);
                                  is.read(result, size, dim);
                             }catch (Exception ex){
                                  ex.printStackTrace();
                                  System.exit( -1);
                             if(i==0){
                                  BLOCK_SIZE1 = dim+4;
                             }else if(i==1){//analyze directory.cap
                                  int component;
                                  int ddim;
                                  for (int h = 3; h<25; h += 2){
                                       component = (int)Math.floor((h-3)/2)+1;
                                       if(component==11&& !installDescriptor){//elimino descriptor da directory
                                            result[size+h] = 0;
                                            result[size+h+1] = 0;
                                       ddim = ((result[size+h]<<8)+result[size+h+1]);
                                       System.out.println("component size with tag: ["+component+"] "+ddim);
                                       dsize += ddim;
                             size += dim;
                             break;
                   if( !found){
                        if(i==3||i==7||i==10){
                             System.out.println("Not found cap component for optional installing: "+xCaps[i]);
                        }else{
                             System.out.println("Critical error: Not found cap component necessary for install:"+xCaps[i]);
                             System.exit( -1);
              byte[] fresult = new byte[size];
              System.arraycopy(result, 0, fresult, 0, size);
              FileOutputStream fo = new FileOutputStream("pcapdump.cap");
              fo.write(result);
              System.out.println("size="+size+", according to directory:"+dsize);
              return fresult;
    I open the result file of this program called "pcapdump.cap".
    However, when I compare APDU generated by Tool and APDU
    generated by this program , they are slightly different.
    I wonder why these 2 APDU results are different.
    Can anyone help me to corrent above code?
    Please~

    Please read the "Java Card Development Kit User&#8217;s Guide" Chapter 11. Using the Installer. There you find a detailed description how to install a java card applet.
    The JC-dev User's Guid comes as HTML & PDF document with the Java Card development Kit - subdirectory "doc".
    Jan

  • How can I repair Vista system files with only a Toshiba recovery disc??

    I have pretty much come to the conclusion that the reason I can't install Vista service pack 2 is due to some corrupt vista files. I ran the program that checks that system files and it said some are corrupt. There are some things I can't do, like turn on the Windows firewall even from that special adminostrar screen, or if I schedule a check disc scan, when I reschedule it for start up, it doesn't do it at startup. I had a Red Screen about a year ago, and it did a bunch of stuff and at the end, it said you had a major event and contact your administartor. Well, I am the administartor, lol. Anyway, it worked fine and I attribute these problems to that event.
    Vista discs come with a repair option. All I have is the Toshiba disc that lets you reinstall the Toshiba and Vendor applications OR reformat the hard drive. I am not going to spend days trying to get my system back to where it is by tracking down everything I have installed especially when its working. Is there a work around? I will buy a Vista Home Premium disc if I have to before refortmatting. I have an x205-S9349 with Vista Home Premium. THANKS!

    Satellite X205-S9349 
    I ran the program that checks that system files and it said some are corrupt.
    Sounds like System File Checker.
       How to use the System File Checker tool to troubleshoot missing or corrupted system files on Windows...
    To follow up...
       How to analyze the log file entries that the Microsoft Windows Resource Checker (SFC.exe) program ge... 
    can't install Vista service pack 2
    Maybe this helps.
       How to troubleshoot Windows Vista and Windows Server 2008 service pack installation issues
    Notice that you can get free support from Microsoft.
       Free Unlimited Support Vista Service Pack 2 sp2
    -Jerry

  • ERROR while generating CAP file

    Hello,
    Iam trying to generate a cap file of JCRMI applet. Iam getting the following errors while generating a CAP file. Can anybody help me.
    Thanks in advance,
    With Regards,
    Abhishek Goud
    {color:#ff0000}{color:#008080}*C:\Documents and Settings\Administrator\Desktop\Demo>converter -classdir C:\jav*
    a_card_kit-2_2_2\lib -exportpath C:\java_card_kit-2_2_2\api_export_files;C:\java
    cardkit-2_2_2\lib -applet 0xa0:0x00:0x00:0x00:0x62:0x03:0x01:0x08:0x01 PurseAp*
    plet com.sun.javacard.samples.RMIDemo 0xa0:0x00:0x00:0x00:0x62:0x12:0x34 1.3
    {color}
    Java Card 2.2.2 Class File Converter, Version 1.3
    Copyright 2005 Sun Microsystems, Inc. All rights reserved. Use is subject to lic
    ense terms.
    warning: You did not supply export file for the previous minor version of the pa
    ckage
    error: com.sun.javacard.samples.RMIDemo.PurseImpl_Stub: unsupported type long of
    field serialVersionUID.
    error: com.sun.javacard.samples.RMIDemo.PurseImpl_Stub: unhandled bytecode ifnull in clinit method, try a different compiler.
    error: com.sun.javacard.samples.RMIDemo.PurseImpl_Stub: unhandled bytecode goto
    in clinit method, try a different compiler.
    error: com.sun.javacard.samples.RMIDemo.PurseImpl_Stub: unsupported bytecode inv
    okestatic in clinit method.
    error: com.sun.javacard.samples.RMIDemo.PurseImpl_Stub: unsupported parameter ty
    pe String of invoked method class$(java.lang.String) of class com.sun.javacard.s
    amples.RMIDemo.PurseImpl_Stub.
    error: com.sun.javacard.samples.RMIDemo.PurseImpl_Stub: unsupported bytecode ane
    warray in clinit method.
    error: com.sun.javacard.samples.RMIDemo.PurseImpl_Stub: unsupported bytecode aas
    tore in clinit method.
    error: com.sun.javacard.samples.RMIDemo.PurseImpl_Stub: unsupported bytecode inv
    okevirtual in clinit method.
    error: com.sun.javacard.samples.RMIDemo.PurseImpl_Stub: unsupported parameter ty
    pe String of invoked method getMethod(java.lang.String, java.lang.Class) of clas
    s java.lang.Class.
    error: com.sun.javacard.samples.RMIDemo.PurseImpl_Stub: unhandled bytecode ifnul
    l in clinit method, try a different compiler.
    error: com.sun.javacard.samples.RMIDemo.PurseImpl_Stub: unhandled bytecode goto
    in clinit method, try a different compiler.
    error: com.sun.javacard.samples.RMIDemo.PurseImpl_Stub: unsupported bytecode inv
    okestatic in clinit method.
    error: com.sun.javacard.samples.RMIDemo.PurseImpl_Stub: unsupported parameter ty
    pe String of invoked method class$(java.lang.String) of class com.sun.javacard.s
    amples.RMIDemo.PurseImpl_Stub.
    error: com.sun.javacard.samples.RMIDemo.PurseImpl_Stub: unsupported bytecode ane
    warray in clinit method.
    error: com.sun.javacard.samples.RMIDemo.PurseImpl_Stub: unsupported bytecode aas
    tore in clinit method.
    error: com.sun.javacard.samples.RMIDemo.PurseImpl_Stub: unsupported bytecode inv
    okevirtual in clinit method.
    error: com.sun.javacard.samples.RMIDemo.PurseImpl_Stub: unsupported parameter ty
    pe String of invoked method getMethod(java.lang.String, java.lang.Class) of clas
    s java.lang.Class.
    error: com.sun.javacard.samples.RMIDemo.PurseImpl_Stub: unhandled bytecode ifnul
    l in clinit method, try a different compiler.
    error: com.sun.javacard.samples.RMIDemo.PurseImpl_Stub: unhandled bytecode goto
    in clinit method, try a different compiler.
    error: com.sun.javacard.samples.RMIDemo.PurseImpl_Stub: unsupported bytecode inv
    okestatic in clinit method.
    error: com.sun.javacard.samples.RMIDemo.PurseImpl_Stub: unsupported parameter ty
    pe String of invoked method class$(java.lang.String) of class com.sun.javacard.s
    amples.RMIDemo.PurseImpl_Stub.
    error: com.sun.javacard.samples.RMIDemo.PurseImpl_Stub: unsupported bytecode ane
    warray in clinit method.
    error: com.sun.javacard.samples.RMIDemo.PurseImpl_Stub: unsupported bytecode inv
    okevirtual in clinit method.
    error: com.sun.javacard.samples.RMIDemo.PurseImpl_Stub: unsupported parameter ty
    pe String of invoked method getMethod(java.lang.String, java.lang.Class) of clas
    s java.lang.Class.
    error: com.sun.javacard.samples.RMIDemo.PurseImpl_Stub: unhandled bytecode ifnul
    l in clinit method, try a different compiler.
    error: com.sun.javacard.samples.RMIDemo.PurseImpl_Stub: unhandled bytecode goto
    in clinit method, try a different compiler.
    error: com.sun.javacard.samples.RMIDemo.PurseImpl_Stub: unsupported bytecode inv
    okestatic in clinit method.
    error: com.sun.javacard.samples.RMIDemo.PurseImpl_Stub: unsupported parameter ty
    pe String of invoked method class$(java.lang.String) of class com.sun.javacard.s
    amples.RMIDemo.PurseImpl_Stub.
    error: com.sun.javacard.samples.RMIDemo.PurseImpl_Stub: unsupported bytecode ane
    warray in clinit method.
    error: com.sun.javacard.samples.RMIDemo.PurseImpl_Stub: unsupported bytecode inv
    okevirtual in clinit method.
    error: com.sun.javacard.samples.RMIDemo.PurseImpl_Stub: unsupported parameter ty
    pe String of invoked method getMethod(java.lang.String, java.lang.Class) of clas
    s java.lang.Class.
    error: com.sun.javacard.samples.RMIDemo.PurseImpl_Stub: unhandled bytecode ifnul
    l in clinit method, try a different compiler.
    error: com.sun.javacard.samples.RMIDemo.PurseImpl_Stub: unhandled bytecode goto
    in clinit method, try a different compiler.
    error: com.sun.javacard.samples.RMIDemo.PurseImpl_Stub: unsupported bytecode inv
    okestatic in clinit method.
    error: com.sun.javacard.samples.RMIDemo.PurseImpl_Stub: unsupported parameter ty
    pe String of invoked method class$(java.lang.String) of class com.sun.javacard.s
    amples.RMIDemo.PurseImpl_Stub.
    error: com.sun.javacard.samples.RMIDemo.PurseImpl_Stub: unsupported bytecode ane
    warray in clinit method.
    error: com.sun.javacard.samples.RMIDemo.PurseImpl_Stub: unhandled bytecode ifnul
    l in clinit method, try a different compiler.
    error: com.sun.javacard.samples.RMIDemo.PurseImpl_Stub: unhandled bytecode goto
    in clinit method, try a different compiler.
    error: com.sun.javacard.samples.RMIDemo.PurseImpl_Stub: unsupported bytecode inv
    okestatic in clinit method.
    error: com.sun.javacard.samples.RMIDemo.PurseImpl_Stub: unsupported parameter ty
    pe String of invoked method class$(java.lang.String) of class com.sun.javacard.s
    amples.RMIDemo.PurseImpl_Stub.
    error: com.sun.javacard.samples.RMIDemo.PurseImpl_Stub: unsupported bytecode aas
    tore in clinit method.
    error: com.sun.javacard.samples.RMIDemo.PurseImpl_Stub: unsupported bytecode inv
    okevirtual in clinit method.
    error: com.sun.javacard.samples.RMIDemo.PurseImpl_Stub: unsupported parameter ty
    pe String of invoked method getMethod(java.lang.String, java.lang.Class) of clas
    s java.lang.Class.
    error: com.sun.javacard.samples.RMIDemo.PurseImpl_Stub: unhandled bytecode goto
    in clinit method, try a different compiler.
    error: com.sun.javacard.samples.RMIDemo.PurseImpl_Stub: unhandled bytecode pop i
    n clinit method, try a different compiler.
    error: com.sun.javacard.samples.RMIDemo.PurseImpl_Stub: unsupported bytecode new
    in clinit method.
    error: com.sun.javacard.samples.RMIDemo.PurseImpl_Stub: unsupported bytecode inv
    okespecial in clinit method.
    error: com.sun.javacard.samples.RMIDemo.PurseImpl_Stub: unsupported parameter ty
    pe String of invoked method <init>(java.lang.String) of class java.lang.NoSuchMe
    thodError.
    error: com.sun.javacard.samples.RMIDemo.PurseImpl_Stub: unsupported bytecode ath
    row in clinit method.
    error: com.sun.javacard.samples.RMIDemo.PurseImpl_Stub: unsupported parameter ty
    pe String of method class$.
    error: com.sun.javacard.samples.RMIDemo.PurseImpl_Stub: unsupported parameter ty
    pe String of invoked method forName(java.lang.String) of class java.lang.Class.
    error: com.sun.javacard.samples.RMIDemo.PurseImpl_Stub: unsupported return type
    String of invoked method getMessage() of class java.lang.Throwable.
    error: com.sun.javacard.samples.RMIDemo.PurseImpl_Stub: unsupported parameter ty
    pe String of invoked method <init>(java.lang.String) of class java.lang.NoClassD
    efFoundError.
    error: com.sun.javacard.samples.RMIDemo.PurseImpl_Stub: unsupported long type co
    nstant.
    error: com.sun.javacard.samples.RMIDemo.PurseImpl_Stub: unsupported parameter ty
    pe long of invoked method invoke(java.rmi.Remote, java.lang.reflect.Method, java
    *.lang.Object, long) of class java.rmi.server.RemoteRef.*
    error: com.sun.javacard.samples.RMIDemo.PurseImpl_Stub: unsupported String type
    constant.
    error: com.sun.javacard.samples.RMIDemo.PurseImpl_Stub: unsupported parameter ty
    pe String of invoked method <init>(java.lang.String, java.lang.Exception) of cla
    ss java.rmi.UnexpectedException.
    error: com.sun.javacard.samples.RMIDemo.PurseImpl_Stub: unsupported long type co
    nstant.
    error: com.sun.javacard.samples.RMIDemo.PurseImpl_Stub: unsupported parameter ty
    pe long of invoked method invoke(java.rmi.Remote, java.lang.reflect.Method, java
    *.lang.Object, long) of class java.rmi.server.RemoteRef.*
    error: com.sun.javacard.samples.RMIDemo.PurseImpl_Stub: unsupported String type
    constant.
    error: com.sun.javacard.samples.RMIDemo.PurseImpl_Stub: unsupported parameter ty
    pe String of invoked method <init>(java.lang.String, java.lang.Exception) of cla
    ss java.rmi.UnexpectedException.
    error: com.sun.javacard.samples.RMIDemo.PurseImpl_Stub: unsupported long type co
    nstant.
    error: com.sun.javacard.samples.RMIDemo.PurseImpl_Stub: unsupported parameter ty
    pe long of invoked method invoke(java.rmi.Remote, java.lang.reflect.Method, java
    *.lang.Object, long) of class java.rmi.server.RemoteRef.*
    error: com.sun.javacard.samples.RMIDemo.PurseImpl_Stub: unsupported String type
    constant.
    error: com.sun.javacard.samples.RMIDemo.PurseImpl_Stub: unsupported parameter ty
    pe String of invoked method <init>(java.lang.String, java.lang.Exception) of cla
    ss java.rmi.UnexpectedException.
    error: com.sun.javacard.samples.RMIDemo.PurseImpl_Stub: unsupported long type co
    nstant.
    error: com.sun.javacard.samples.RMIDemo.PurseImpl_Stub: unsupported parameter ty
    pe long of invoked method invoke(java.rmi.Remote, java.lang.reflect.Method, java
    *.lang.Object, long) of class java.rmi.server.RemoteRef.*
    error: com.sun.javacard.samples.RMIDemo.PurseImpl_Stub: unsupported String type
    constant.
    error: com.sun.javacard.samples.RMIDemo.PurseImpl_Stub: unsupported parameter ty
    pe String of invoked method <init>(java.lang.String, java.lang.Exception) of cla
    ss java.rmi.UnexpectedException.
    error: com.sun.javacard.samples.RMIDemo.PurseImpl_Stub: unsupported long type co
    nstant.
    error: com.sun.javacard.samples.RMIDemo.PurseImpl_Stub: unsupported parameter ty
    pe long of invoked method invoke(java.rmi.Remote, java.lang.reflect.Method, java
    *.lang.Object, long) of class java.rmi.server.RemoteRef.*
    error: com.sun.javacard.samples.RMIDemo.PurseImpl_Stub: unsupported String type
    constant.
    error: com.sun.javacard.samples.RMIDemo.PurseImpl_Stub: unsupported parameter ty
    pe String of invoked method <init>(java.lang.String, java.lang.Exception) of cla
    ss java.rmi.UnexpectedException.
    {color}
    conversion completed with 73 errors and 1 warnings.

    It seems there is a variable of type "long" in your applet. The "long" type is not supported by Java Card, so you should remove all variables with type "long".
    Otherwise, without the source code, it is difficult to help you find out what's wrong.

Maybe you are looking for