Making existing EEM applets simple scripts Tcl or python.

Hi all

I would like to make the existing simple EEM of scripts Tcl or python applets.

For monitoring the nodes in ITD service, I set up an EEM applet with a knot.

But the nodes keep adding EEM applets are also added as many nodes.

That's why EEM configuration get more complex so I should find a solution.

I think it might be Tcl or Python scripts.

Could check you if it of possible or not?

-Monitor the model track or syslog on the nodes of the ITD downwards or upwards.

-When the ITD nodes get downwards or upwards, the associated script the event trigger to add or delete a device group.

Order to reduce EEM applets I want variable allows you to exactly identify node under status change of situation.

Here are the current configurations of EEM.

Event Manager applet remove_inside_node1
event track State 101
order cli action 1 'enable '.
Action 2 cli command "conf t".
Action 3, command cli "itd session device-group ips_inside.
Action4 'no node ip 1.1.121.1' cli command
Action 5 cli command "commit".
action 6 cli command 'end '.
Action 7 "INFO: removed the 1.1.121.1 node.

Event Manager applet add_inside_node1
101 State event track upward
order cli action 1 'enable '.
Action 2 cli command "conf t".
Action 3, command cli "itd session device-group ips_inside.
Action 4 cli command "node ip 1.1.121.1.
Action 5 cli command "commit".
action 6 cli command 'end '.
Action 7 "INFO: inserted node 1.1.121.1.

OMIS...

Event Manager applet remove_inside_node199
event track State 199
order cli action 1 'enable '.
Action 2 cli command "conf t".
Action 3, command cli "itd session device-group ips_inside.
Action4 'no node ip 1.1.121.199' cli command
Action 5 cli command "commit".
action 6 cli command 'end '.
Action 7 "INFO: removed the 1.1.121.199 node.

Event Manager applet add_inside_node199

199 State event track upward
order cli action 1 'enable '.
Action 2 cli command "conf t".
Action 3, command cli "itd session device-group ips_inside.
Action 4 cli command "node ip 1.1.121.199.
Action 5 cli command "commit".
action 6 cli command 'end '.
Action 7 "INFO: inserted node 1.1.121.199.

Using track, can you cannot match on a circuit racetrack pattern.  But, using track syslogs, it would be possible to consolidate these cmdlets to one.  For example:

Event Manager applet add_inside_node

event model syslog "TRACK-6-STATE :.*-> to top"

Action 1.0 regexp ' STATE: ([0-9] +) "" $_syslog_msg "corresponds to the track

command cli 2.0 action 'enable '.

Action 3.0, «config t» cli command

Action 4.0, command cli "itd session device-group ips_inside.

Action 5.0, command cli "node ip 1.1.121.$track.

action 6.0 cli command "commit".

Action 7.0 cli command "end".

message from syslog to action 8.0 "INFO: inserted node 1.1.121.$track.

Tags: Cisco Network

Similar Questions

  • EEM Applet does not fire TCL script after expiration of the countdown

    We use currently EEM Applet below than securities has BGP route and if this path fails, it starts a countdown of 45 min, once the countdown expires, the router reloads. If the BGP route restores it will remove the countdown applet.

    I'm trying to change this applet to reproduce the same type of behavior, but instead to recharge after 45 minutes, I am changing the cell parameters via Script TCL or other means besides.

    Is this possible? Can someone direct me how to proceed?

    Cisco 1941 Version 15.4 (3) M2

    event handler applet track down
    Description "this applet will add the countdown applet when BGP 10.66.66.66 road goes down."
    Event track 10 down state
    command action 1.0 cli 'enable '.
    Action 2.0 cli command "config t.
    Action 3.0 cli command "event manager applet countdown."
    action 3.1 cli command "description This cmdlet is the countdown and will cause the router reload after 2700 seconds if BGP route is always down.
    Action 3.2 cli command "event timer countdown 2700".
    action 3.3 cli command "reload action 1.0.
    Action 4.0 cli command "end".
    command action 4.1 cli 'enable '.
    Action 4.2 cli command "wr mem".
    Event Manager applet track-up
    Description "this cmdlet will delete the countdown applet when restores BGP route to 10.66.66.66.
    Event State track 10 upwards
    command action 1.0 cli 'enable '.
    Action 2.0 cli command "config t.
    action 3.0 cli command "no event manager applet countdown."
    Action 4.0 cli command "end".
    !

    This is the applet changed, with that I have had the most success. The issue I'm running into is, sound without waiting 60 seconds (for testing I reduced to 1 minute) to run the tcl script. From my limited understanding, I discovered that, after the countdown event - the applet requires an action immediately after but does not accept a command like 'tclsh Cell.tcl' cli as 'action '. »

    event handler applet track down
    Event track 10 down state
    command action 1.0 cli 'enable '.
    Action 1.1, «config t» cli command
    Action 1.3 cli command "event manager applet countdown."
    action 1.4 cli command 'event timer countdown 30 '.
    action 1.5 cli command "action 1.0 wait 30.
    Action 1.6 cli command "end".
    Action 1.7 cli command "tclsh Cell.tcl.
    Event Manager applet track-up
    Event State track 10 upwards
    command action 1.0 cli 'enable '.
    Action 2.0 cli command "config t.
    action 3.0 cli command "no event manager applet countdown."
    Action 4.0 cli command "end".

    It is the TCL script that I use to run cellular changes.

    tclsh
    puts [open "flash: Cell.tcl' w +] {}
    ios_config "interface 1/0/0" "shut".
    ios_config "0/1/0 lte tech gsm cell".
    ios_config "interface 1/0/0" 'no shut '.
    After 10000
    ios_config "interface 1/0/0" "shut".
    ios_config exec 'cell auto 0/1/0 lte tech '.
    ios_config "interface 1/0/0" 'no shut '.
    }
    tclquit

    Thank you
    Robert

    These cmdlets will not accomplish what you want.  I also recommend never call EEM tclsh.  You don't need to do.  Use EEM MCI in native mode, or in your case, just use pure applets.  Take a look at https://supportforums.cisco.com/document/12723951/how-introduce-large-de... .  If you follow this example and put your config CLI commands in the countdown applet, you will be able to achieve what you want.

  • Script to run Python with EEM on Nexus 9K

    Hello!

    I am trying to run the example provided in the following link for "Running Scripts with Embedded Event Manager":

    http://www.Cisco.com/c/en/us/TD/docs/switches/Datacenter/nexus9000/SW/6-...

    Here is my configuration of the Nexus 9 K switch EEM:

    NX9K-autonomous-Pod-1 # sh run EEM

    ! Command: show running-config EEM
    ! Time: Sat Nov 15 09:54:52 2014

    version 6.1 (2) I3 (1)
    Event Manager applet a1
    cli event corresponds to "display the clock.
    Action 1 cli python bootflash:pydate.py
    2 default event action
    Action 3 syslog msg I like EEM

    And here is an example of work of pydate.py that I grabbed from GitHub:

    GitHub Repo: https://github.com/haya14busa/pydate/blob/master/pydate.py

    NX9K-autonomous-Pod-1 # python bootflash:pydate.py
    DATETIME = 2014-11-15 09:47:03
    TIMESTAMP = 1416044823
    DateTime: 2014-11-15 09:47:03-> TimeStamp: 1416044823
    TimeStamp: 1416044823-> DateTime: 2014-11-15 09:47:03
    NX9K-autonomous-Pod-1 #.

    Finally, here is what happens when I run the command 'See the clock' in an attempt to trigger the EEM applet:

    NX9K-autonomous-Pod-1 # sh clock
    09:54:58.746 UTC Saturday, November 15, 2014
    NX9K-autonomous-Pod-1 # 2014 Nov 15 09:54:58 NX9K-autonomous-Pod-1% VSHD-5-VSHD_SYSLOG_CONFIG_I: configured for the vty by admin on vsh.8883
    2014-15 Nov 09:54:58 NX9K-autonomous-Pod-1% VSHD-5-VSHD_SYSLOG_CONFIG_I: configured for the vty by admin on vsh.8894

    Any help is appreciated!

    The syslog message must come before the 'event' by default.  As for what the Python script prints, it won't happen when she is called to the EEM.  But you may like the Cisco.com article says, look at the log to make sure that the script ran.

  • Help with 2 simple scripts

    I am looking for 2 very simple scripts, we're for a specific cluster 1, I want to list all the VMS that have 4 GB of memory or more.

    Then a 2nd script for a specific cluster1, want to list VM which do not have the VM tools installed or are out of date and select the name, the tool vmware status and memory.

    Can someone help please

    Here is a line that I tried on a single host... and must work if you connect on a VC as well... people it will list all virtual machines with more than 4 GB of memory:

    Get - VM | Where-Object {$_.} MemoryMB - gt 4096}

    If you want just the name and memory, then:

    Get - VM | Where-Object {$_.} MemoryMB - gt 4096} | Select Name, MemoryMB

    For the other for the VMtools...

    Get-VM | Get-View | Select-Object @{N="Name";E={$_.Name}},@{Name="ToolsStatus";E={$_.Guest.ToolsStatus}}
    

    Concerning

  • Simple scripts: on the thumb (45) frame to the first frame... ??

    I'm doing a simple script and I'll have a PET huge brain.

    When I get to coach the 45 I want the playhead back to frame 1.  I have the code below, but I'm getting errors.  Can someone point my head in the right direction?

    <><><>

    {onFrame (45)
    this.gotoAndPlay (1);
    }

    <><><>

    An error that says that "expected semicolon before or after the first brace...

    second possible mistake is ' call to onFrame possible undefined method... ".

    Need help.

    If this is the first scene, in the last picture (45) simply by putting...

    gotoAndPlay (1);

    should work.

    If it is not the first scene, then you the first image of the label and use the label instead of the chassis number...

    gotoAndPlay ("firstFrameLabel");

  • Can someone help me understand this very simple script please?

    I have a simple coding question that frustrates the heck out of me. . Basically, the script below moves button_mc. 100 px when you click top then down to 100px when you click it again. I know that the simple script below works but I do not know why

    It seems that his say if the variable 'jumping' is 'true' move "button_mc" up to 100 px. "The part I do not understand why ' button_mc" move down to 100 px to second click.

    seems to me that it ignores this first function, because 'Skip = false' run the second function and moves to the top of 100px. Then why in the second click it move down? wouldn t it theoretically just skip the first part of the function again?

    I hope this makes sense and someone can help me.

    I'm so frustrated!

    Thank you!!!

    var jump: Boolean = false;

    button_mc.addEventListener (MouseEvent.CLICK, onClick);

    function onClick(event:MouseEvent):void {}
    If (Jumping)
    {
    Event.Target.y += 100;
    jumping = false;
    }
    on the other
    {
    Event.Target.y-= 100;
    jumping = true;
    }
    }

    button_mc.butonMode = true;

    Whenever a movement occurs, the break value is passed to the opposite value.  So if it starts wrong, it moves-100 pixels (which is the direction upwards) and the value is changed to true.  Similarly, when you click again, it moves 100 + in the direction down.

  • simple script, does not. Help, please!

    Hi all

    I wrote a simple script to take the active layer in the current document, copy, paste in all open documents, and set the 'Color Dodge' blend mode:

    var docRef = activeDocument;
    var layerRef = docRef.activeLayer;
    var Sindocs = documents.length;

    layerRef.copy ();


    for (i = 0; i < = Sindocs-1; i ++)
    {

    activeDocument = documents [i];
    activeDocument.paste ();
    activeDocument.activeLayer.blendMode.COLORDODGE;

    }

    the script works, except for the change in merge mode. I tried to split the single command into components (for example, assign activeDocument.activeLayer to a temporary variable, then setting the blendMode on this variable). I guess I'm missing something stupid and simple, since this is my first Java script.  Any help would be appreciated!

    Oh, I use CS2 under WinXP.

    Thanks again,

    EPH

    You can try this...

    var docRef = activeDocument;
    var Sindocs = documents.length;
    docRef.selection.selectAll ();
    docRef.selection.copy ();

    for (var i = 0; i)< ndocs;="">
    activeDocument = documents [i];
    activeDocument.paste ();
    activeDocument.activeLayer.blendMode = BlendMode.COLORDODGE;
    }

  • How to use the Script TCL EEM in router?

    Dear all,

    I have a TCl Script (it's 1 to test and understand).

    ********************************************** TEST.tcl *******************************************

    : model cisco::eem:event_register_syslog "Interface FastEthernet0/0, changed State to.

    import namespace: cisco::eem: *.
    import namespace: cisco::lib: *.

    Table game arr_einfo [event_reqinfo]

    action_script enable status

    If {[catch result {cli_exec $cli_fd (fd) 'enable'}]} {error $result $errorInfo}

    If {[catch result {cli_exec $cli_fd (fd) 'int fa0/1'}]} {error $result $errorInfo}

    If {[catch result {cli_exec $cli_fd (fd) 'shut'}]} {error $result $errorInfo}

    action_syslog msg "New Port is now"

    If {[catch result {cli_close $cli_fd (fd) $cli_fd (tty_id)}]} {error $result $errorInfo}

    ********************************************** TEST.tcl *******************************************

    Can someone tell me how to use this script in router that will be used every time my interface fa0/0 he'll fa0/1 in stop mode?

    Can you give me the steps to follow in the router?

    Wharton are the sine qua non for the use of this?

    Concerning

    Concerning

    Virtually any command, Yes.  You can't do "?" as you can from an interactive session, but you can run all the commands EXEC and config otherwise.

  • x 230 Tap simple script error

    Whenever I click on the tile "Get more Apps" in the right row, I get a Script error with the following message: [IMG][line] http://i.imgur.com/Oc3su57.png error: access denied for: http://shop.lenovo.com/ISS_Static/css/themes/ow/ie-css3.htc the only way I can get rid of the infinitely popping up error window is to kill a Simple tap in the Task Manager. Any suggestions?

    My advice is to uninstall SimpleTap from the control panel "programs and features".  Lenovo has retired it.  The store is dead.  Sorry for the inconvenience.

  • Problems with failure of script TCL AS5350XM

    Hi all

    We are facing problems using AS5350XM as an IVR server to our network, where it is used as a server MGCP with Cisco BTS 10200 to meet the demand of the customer. What we have seen is the gateway that struck after a while, and the error in the debug level is

    Jun 11 10:28:16.260: / / 5550 / / AFW_: / AFW_FSM_Drive: Tcl_Eval driving WSF inside modulespace Tcl code = 1 code = ERROR

    16.260: TCL script failure

    Result:

    Illegal parameters. Ord1 and Ord2 are the same 55495550

    :<191>198118:079727: 10:28:16.260 Jun 11: TCL script failure errorInfo:

    <191>198119: illegal parameters. Ord1 and Ord2 are the same 55495550

    <191>198120: when running

    <191>198121: 'connection create $incLeg $outLeg '.

    <191>198122: (procedure "do_ignore" line 30)

    <191>198123: called from inside

    <191>198124: "do_ignore."

    This shows the failure of TCL script. Your help means a lot to us will wait for your help.

    Concerning

    Yasser yasin

    Start the update of IOS.

    You can also use 'catch' to avoid crashing on "create a link".

  • Using simple script (script noob)

    Hello

    could someone help me to write a script to do a simple task?
    I would like to than the scipt to:

    Closing machine has

    Check if A computer is turned off, and then turn on the Machine B

    Thank you

    don't use stop-vm-kill. because of this HA restarts first VM.

    Use the command shutdown-VMGuest, at the stop, what computer guest OS virtual, this VM tools necessary to run will.

    Also, you will need to wait a few minutes before you for the next order as first stop of the VM will take time.

  • My simple script do not work, I m missing something fundamental

    Hello.

    I seem to not understand something in PowerCLI scripting. I try to make it as simple as possible, still it does not work.

    When I remove "object-forreach", it works.

    Can someone point out to me what I did wrong?

    Not the $results contains the name, cpu etc?

    $results = @)

    Get - vm | {foreach-object

    $name = $_. Name

    $cpu = $_. NumCpu

    $mem = $_. MemoryGB

    $state = $_. PowerState

    $guest = $_. Comments

    $notes = $_. Notes

    }

    $results | Select name, cpu, mem, status, comments, notes | Export-Csv - NoTypeInformation 'G:\Users\Roosen\PSs\AllVms-Monthly-Report-CPUnRAM.csv '.

    BR

    Kristian

    Here you go

    $results = @)

    Get - VM | {foreach-object

    $info = @{'name' = $_.} Name

    "cpu" = $_. NumCpu

    "mem" = $_. MemoryGB

    'State' = $_. PowerState

    'guest' = $_. Comments

    'notes' = $_. Notes

    }

    $system = new-Object - TypeName PSObject-property $info

    $results += $system

    }

    $results | Select name, cpu, mem, status, comments, notes | Export-Csv - NoTypeInformation 'G:\Users\Roosen\PSs\AllVms-Monthly-Report-CPUnRAM.csv '.

  • Simple Script to Calc custom, returning the odd value

    Hi all

    I'm not really familiar with Javascript and I'm checking here something simple.

    ----------

    Event.Value = (this.getField("Applicant_1").value + this.getField("Bonuses").value + this.getField("Commissions").value + this.getField("Dividends_Interest").value + this.getField("Net_Rental_Income").value + this.getField("OtherBefore_1").value + this.getField("OtherBefore_10").value + this.getField("OtherBefore_4").value + this.getField("OtherBefore_7").value + this.getField("Overtime").value)

    ------


    As long as I put a value in all the fields, it works very well. If I leave a field in the empty middle, my return value is really wide. By example, if I provide the value of '1' for overtime, bonuses and commissions, and leave the rest blank, my returned value will be 111.

    Any help on this would be greatly appreciated. Thank you!

    The reason for that is what happens when you get the value of an empty field, it returns an empty string. The operator '+' is used in JavaScript for digital addition and string concatenation, please make sure to ecxplicitly to convert the field value to numbers before adding them together. IF the script could be modified to:

    (function () {}

    Get the field values as numbers

    var v1 = + getField("Applicant_1").value;

    var v2 = + getField("Bonuses").value;

    var v3 = + getField("Commissions").value;

    var v4 = + getField("Dividends_Interest").value;

    V5 var = + getField("Net_Rental_Income").value;

    var V6 = + getField("OtherBefore_1").value;

    v7 var = + getField("OtherBefore_10").value;

    var V8 = + getField("OtherBefore_4").value;

    var = v9 + getField("OtherBefore_7").value;

    V10 var = + getField("Overtime").value;

    Calculate the sum

    Event.Value = v1 + v2 + v3 + v4 + v5 + v6 + v7 + v8 + v9 + v10;

    })();

  • The place of simple script for Windows

    I used a simple Applescript on my Mac of Indesign for years called Square Up CS installation. It's a handy little script that is by default an object selected into a simple retangle. I think this is extremely helpful when I missed a text box properties accidentally moving a corner or who need to return to a normal text box after changing his shape for some reason any. I am moving to a Windows computer full time and would like good port this script on my new computer, but I'm not a guru script and don't have no idea how to write this in Javascript. Anyone able to help?

    Tell application "Adobe InDesign CS6"

    'the class gbnd' selection value {a, b, c and d}

    the value 'category plst' of 'class ppth' 1 selection to {{b, a}, {a}, {d, c}, {b, c}}

    tell the end

    Hi, Diane.

    Step we must translate the Applescript coding in human readable Applescript, what make you it stick in the Applescript editor and pressing on the compilation. You get this:

    tell application "Adobe InDesign CS6"
        set {a, b, c, d} to geometric bounds of selection
        set entire path of path 1 of selection to {{b, a}, {d, a}, {d, c}, {b, c}}
    end tell
    

    Second step:

    Here is the translation in Javascript. Note that in JavaScript, berries (geometric boundaries and paths) start the meter to zero, rather than one, both "path 1" becomes "paths [0]", etc. ; [in addition, we refer to ' app.selection [0 '] instead of 'selection', because there may be multiple selections and AppleScript lets say 'selection' as meaning first, but JavaScript requires you to be explicit:

    var abcd, a, b, c, d;
    abcd = app.selection[0].geometricBounds;
    a=abcd[0]; b=abcd[1]; c=abcd[2]; d=abcd[3];
    
    app.selection[0].paths[0].entirePath = [ [b,a], [d,a], [d,c], [b,c] ];
    

    I'm not 100% sure what is your test case, so if it turns out that the order of the numbers in the entirePath table is different between Javascript and AppleScript, then something can go wrong. I don't think, but please test it od.

  • Help: How to download the applet by script file (generate by SCRIPTGEN)

    Hi all

    My card have Javacard 2.1.1 GP 2.0.1. I built a PAC file and generate SCRIPT file in SCRIPTGEN tool.

    This is my script:

    0 x 80 0xB0 0x00 0x00 0 x 00 0x7F;

    JavaCard/Header.cap
    0 x 80 0xB2 0x01 0x00 0 x 00 0x7F;
    0 x 80 0xB4 0x01 0x00 0x13 0x01 0x00 0 x 10 0xDE 0xCA 0xFF 0xED 0x01 0x02 0x04 0x00 0x01 0x06 0x11 0 x 22 x 0 33 0 x 44 0 x 55 0 x 66 0x7F;
    0 x 80 0xBC 0x01 0x00 0 x 00 0x7F;

    JavaCard/Directory.cap
    0 x 80 0xB2 0x02 0x00 0 x 00 0x7F;
    0 x 80 0xB4 0x02 0x00 0x20 0x02 0 x 00 0x1F 0x00 0x10 0 x 00 0x1F 0 x 00 0x0A 0x0B 00 x 0 0 x 00 0x1E 0 x 00 0x0C 0 x 00 0x3D 0 x 00 0x0A 0 x 00 0x0B 0x00 0x00 0 x 00 0x4D 0x00 0x00 0x00 0x00 0x00 0x00 0 x 01 0x7F;
    0 x 80 0xB4 0x02 0x00 0x02 0x01 0 x 00 0x7F;
    0 x 80 0xBC 0x02 0x00 0 x 00 0x7F;

    JavaCard/Import.cap
    0 x 80 0xB2 0x04 0x00 0 x 00 0x7F;
    0 x 80 0xB4 0x04 0 x 00 0x0E 0x04 0 x 00 0x0B 0x01 0x00 0x01 0 x 07 0xA0 0x00 0x00 0x00 0 x 62 0x01 0 x 01 0x7F;
    0 x 80 0xBC 0x04 0x00 0 x 00 0x7F;

    JavaCard/Applet.cap
    0 x 80 0xB2 0x03 0x00 0 x 00 0x7F;
    0 x 80 0xB4 0x03 0 x 00 0x0D 0x03 0 x 00 0x0A 0x01 0x06 0x11 0 x 22 x 0 33 0 x 44 0 x 55 0 x 67 0x00 0 x 08 0x7F;
    0 x 80 0xBC 0x03 0x00 0 x 00 0x7F;

    JavaCard/Class.cap
    0 x 80 0xB2 0x06 0x00 0 x 00 0x7F;
    0 x 80 0xB4 0x06 0 x 00 0x0F 0x06 0 x 00 0x0C 0x00 0x80 0x03 0 x 00-0xFF 0x00 0x07 0x01 0x00 0x00 0 x 00 0x1C 0x7F;
    0 x 80 0xBC 0x06 0x00 0 x 00 0x7F;

    JavaCard/Method.cap
    0 x 80 0xB2 0x07 0x00 0 x 00 0x7F;
    0 x 80 0xB4 0x07 0x00 0x20 0x07 0 x 00 0x3D 0x00 0x01 0x10 0 x 18 0x8C 0x00 0 x 01 0x7A 0x05 0 x 30 0x8F 0x00 0 x 06 0x3D 0x8C 0x00 0x05 0 x 18 0x1D 0x04 0x41 0 x 18 0x1D 0 x 25 0x8B 0x00 0 x 02 0x7A 0 x 02 0x7F;
    0 x 80 0xB4 0x07 0x00 0x20 0x21 0 x 18 0x8B 0x00 0x03 0 x 60 0 x 03 0x7A 0 x 19 0x8B 0x00 0 x 04 0x2D 0x1A 0x04 0 25 x 0 x 73 0x00 0 x 09 0x00 0x00 0x00 0x00 0 x 00 0x0F 0 x 11 0x6D 0 x 00 0x8D 0x00 0 x 00 0x7A 0x7F;
    0 x 80 0xBC 0x07 0x00 0 x 00 0x7F;

    JavaCard/StaticField.cap
    0 x 80 0xB2 0x08 0x00 0 x 00 0x7F;
    0 x 80 0xB4 0x08 0 x 00 0x0D 0x08 0 x 00 0x0A 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0 x 00 0x7F;
    0 x 80 0xBC 0x08 0x00 0 x 00 0x7F;

    JavaCard/ConstantPool.cap
    0 x 80 0xB2 0x05 0x00 0 x 00 0x7F;
    0 x 80 0xB4 0x05 0x00 0x20 0x05 0 x 00 0x1E 0x00 0x07 0x06 0x80 0x07 0x01 0x06 0x80 0x03 0x00 0x03 0x80 0x03 0x02 0x03 0x80 0x03 0x03 0x03 0 x 80 0x0A 0x01 0x06 0x00 0x00 0x01 0x01 0x00 0 x 00 0x7F;
    0 x 80 0xB4 0x05 0x00 0x01 0 x 00 0x7F;
    0 x 80 0xBC 0x05 0x00 0 x 00 0x7F;

    JavaCard/RefLocation.cap
    0 x 80 0xB2 0 x 09 0x00 0 x 00 0x7F;
    0 x 80 0xB4 09 x 0 0 x 00 0x0E 09 x 0 0 x 00 0x0B 0x00 0x00 0x00 0x07 0x05 0x06 0 x 04 0x0A 0x07 0x07 0 x 13 0x7F;
    0 x 80 0xBC 0 x 09 0x00 0 x 00 0x7F;

    0 x 80 0xBA 0x00 0x00 0 x 00 0x7F;



    Then, when upload in the card, what would we do?

    In my case, something must be below:

    (1) //select of INSTALLATION
    0 x 00 0xa4 0x04 0x00 0 x 08 0xA0 0x00 0x00 0x00 0x03 0x00 0x00 0 x 00 0x7F;

    (2) //set key to open a secure channel
    button Set 255/1 /-BCE / 404142434445464748494a4b4c4d4e4f 255/2/DES-ECB/404142434445464748494a4b4c4d4e4f 255/3/DES-ECB/404142434445464748494a4b4c4d4e4f

    == > Real APDU of this command? Please suggest me!

    (3) / / init-updated 255
    0x80 0 x 50 0x00 0x00 0 x 08 0x9A 0xE5 0x80 0 x 27 0x9D 0 x 71 0xE9 0 x 98 0x00

    Ext-auth plain
    84 X 0 0 X 82 0X00 0X00 0X10 0X81 0 X 49 0X27 0XBE 2 54 17 26 17 14 1 77 15 E6 B0 AF

    (4) / / upload file CAP

    (5) / / install the CAP file

    * In step (2), i.e. the data should be ecrypt before downloading, it's true? *
    So, when I check in the SCRIPT file and file CAP, I saw that the data do not yet have encrypt


    == > what tool can I use to encrypt and these step were full?

    Published by: hoaibaotre on March 2, 2011 09:23

    I don't know if I fully understand your question, but when you open a secure channel in GPShell, the rest of the session (until you doing something that ends the secure session), the APDU is sent by using appropriate encryption and kidnapped, according to the security level.

    -Security parameter give the level of security required for the secure session. This is described in the README file.

    -x 0 security: clear, 1: MAC, 3: MAC + ENC

    See you soon,.
    Shane

Maybe you are looking for