-
Notifications
You must be signed in to change notification settings - Fork 2
/
index_analyst_response.html
204 lines (183 loc) · 8.99 KB
/
index_analyst_response.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="GPAOA">
<meta name="author" content="LionYJ">
<link rel="icon" href="favicon.ico">
<title>GPAOA-GP APDU Organizer Analyst</title>
<!-- Bootstrap core CSS -->
<link href="dist/css/bootstrap.min.css" rel="stylesheet">
<!-- Custom styles for this template -->
<link href="dashboard.css" rel="stylesheet">
<!-- Just for debugging purposes. Don't actually copy these 2 lines! -->
<!--[if lt IE 9]><script src="../../assets/js/ie8-responsive-file-warning.js"></script><![endif]-->
<script src="assets/js/ie-emulation-modes-warning.js"></script>
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="index.html">GPAOA</a>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav navbar-right">
<li><a href="organizer/index_organizer.html">Organizer</a></li>
<li><a href="index_analyst.html">Analyst Command APDU</a></li>
<li><a href="help.html">Help</a></li>
</ul>
<!--
<form class="navbar-form navbar-right">
<input type="text" class="form-control" placeholder="Search...">
</form>
-->
</div>
</div>
</nav>
<div class="container-fluid">
<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
<h3 class="page-header">Analyst for GP Response APDU</h3>
<div class="col-xs-8">
<label>GP Command Type for Response APDU:</label><br>
<input type="radio" name="ins" id="ins_select" value="A4" checked> Select SD&CRS Command【A4】
<input type="radio" name="ins" id="ins_get_data" value="CA"> GET DATA Command【CA】 <br>
<input type="radio" name="ins" id="ins_get_status" value="F2"> GET STATUS Command【F2】
<input type="radio" name="ins" id="ins_initialize_update" value="50"> INITIALIZE UPDATE Command【50】<br>
<input type="radio" name="ins" id="ins_crs_get_data" value="CB"> CRS GET DATA Command【CA】
<input type="radio" name="ins" id="ins_crs_get_status" value="F3"> CRS GET STATUS Command【F2】 <br>
<input type="radio" name="ins" id="ins_crs_set_status" value="F1"> CRS SET STATUS Command【F0】
<input type="radio" name="ins" id="ins_install" value="E6"> Install/Load/Delete Confirmation【E6/E8/E4】<br>
<br>
</div>
<!--
Select SD APDU Response Data:
6F108408A000000151000000A5049F6501FF
[CRS-Application for AmendC]
6F168409A00000015143525300A5099F0802010080020001
INITIALIZE UPDATE Command Response:
FFFFFFFFFFFFFFFFFFFF200200008BA2FFCEA96C739814C181D26E4A [SCP02]
FFFFFFFFFFFFFFFFFFFF20021000008BA2FFCEA96C739814C181D26E4A000001 [SCP03]
GET DATA Command Response:
42074953445F49494E
45074953445F43494E
D30180
C2020001
C1020005
CF0AFFFFFFFFFFFFFFFFFFFF
E018C00401208010C00402208010C00403208010C00401718010
FF1F06010102020303 [item position + item identifier]
FF20037FFF0F
FF210D81010F82040000E7FB830202AE
610A4F08A00000015100000061124F1057617463684461746141707000000001 [2F00]
5F5006112233445566
GET STATUS Command Response:
LV Format:
0BA0000001514341696430330F800BA0000001514341696430310F80
TLV Format:
E3174F0BA0000001514341696430339F70020700C503808000E3174F0BA0000001514341696430319F70020700C503808000
CRS Get Data Command Response:
A5099F0802010080020001
CRS Get Status Command Response:
61344F0CA000000151434C41420101019F700207018002000081011DA40E4F0CA0000001514352454C0101018701008801008A020000
CRS Set Status Command Response:
61264F05A000000001A0074F05A000000002A20B480200014F05A000000002A1074F05A000000003
Install/Load/Delete Confirmation:
1B08293C5097B047E98C0200050E4953445F49494E4953445F49494E
-->
<div class="col-xs-8">
<input id="apduText" type="text" placeholder="Please Insert GP Response APDU" class="form-control" value="6F108408A000000151000000A5049F6501FF">
</div>
<div class="col-xs-2">
<button id="analyse" type="submit" class="btn btn-primary" class="form-control">Analyse</button>
</div>
</div>
</div>
<div id="show_result" class="container-fluid" style="display: none;">
<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
<div class="col-xs-8">
<div class="table-responsive">
<table class="table table-striped table-hover table-condensed">
<tr>
<td>GP Repsponse APDU Analyst Result:</td>
<td><label id="data"></label></td>
</tr>
<tr>
<td colspan="2">
<div id="data_field" class="col-xs-12"></div>
</td>
</tr>
</table>
</div>
</div>
</div>
</div>
<!-- Bootstrap core JavaScript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="dist/js/jquery-1.11.1.js"></script>
<script src="dist/js/bootstrap.min.js"></script>
<script src="assets/js/docs.min.js"></script>
<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
<script src="assets/js/ie10-viewport-bug-workaround.js"></script>
<script src="dist/js/gp.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$("#analyse").click(function(){
var apduData = $.trim($("#apduText").val()).toUpperCase();
apduData = apduData.replace(/\s/g, "");
var ins = $("input[name='ins']:checked").val();
//alert(ins);
switch (ins) {
case INS_SELECT:
analyzeSelectResponse(apduData);
break;
case INS_GET_DATA:
analyzeGetDataResponse(apduData);
break;
case INS_GET_STATUS:
analyzeGetStatusResponse(apduData);
break;
case INS_INITIALIZE_UPDATE:
analyzeInitializeUpdateResponse(apduData);
break;
/*
INS_CRS_GET_DATA
INS_CRS_GET_STATUS
INS_CRS_SET_STATUS
*/
case "CB":
analyzeCRSGetDataResponse(apduData);
break;
case "F3":
analyzeCRSGetStatusResponse(apduData);
break;
case "F1":
analyzeCRSSetStatusResponse(apduData);
break;
case "E6":
analyzeConfirmation(apduData);
break;
default:
alert("Not Supported!");
return;
};
$("#show_result").show();
});
});
// substring(start, end); substr(start, length);
</script>
</body>
</html>