mobile forensic tool.html
10.7 KB
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
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="UTF-8">
<title>Title</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css">
<script src="echarts.min.js"></script>
<script src="axios.min.js"></script>
<script src="vue.js"></script>
<style>
.ui.segments {
margin-bottom: 50px;
}
p {
color: red;
}
</style>
</head>
<body>
<div id="app">
<div class="ui segments">
<div class="ui red segment">
<p>call records</p>
</div>
<table class="ui attached selectable celled table">
<thead>
<tr>
<th>number</th>
<th>name</th>
<th>incoming</th>
<th>outgoing</th>
<th>duration</th>
</tr>
</thead>
<tbody>
<tr v-for="(item,index) in calls">
<th>{{item.number}}</th>
<th>{{item.name}}</th>
<th>{{item.incoming}}</th>
<th>{{item.outgoing}}</th>
<th>{{item.duration}}</th>
</tr>
</tbody>
</table>
</div>
<div class="ui segments">
<div class="ui red segment">
<p>message</p>
</div>
<table class="ui attached selectable table">
<thead>
<tr>
<th>address</th>
<th>body</th>
<th>date</th>
</tr>
</thead>
<tbody>
<tr v-for="(item,index) in messages">
<th>{{item.address}}</th>
<th>{{item.body}}</th>
<th>{{item.date}}</th>
</tr>
</tbody>
</table>
</div>
<div id="chart1" style="width: 100%;height:800px;margin-top: 40px;"></div>
<div class="ui segments">
<div class="ui red segment">
<p>cmd</p>
</div>
<table class="ui attached selectable celled table">
<thead>
<tr>
<th>uid</th>
<th>pid</th>
<th>ppid</th>
<th>stime</th>
<th>time</th>
<th>cmd</th>
</tr>
</thead>
<tbody>
<tr v-for="(item,index) in processes">
<th>{{item.uid}}</th>
<th>{{item.pid}}</th>
<th>{{item.ppid}}</th>
<th>{{item.stime}}</th>
<th>{{item.time}}</th>
<th>{{item.cmd}}</th>
</tr>
</tbody>
</table>
</div>
<div class="ui segments">
<div class="ui red segment">
<p>alarms</p>
</div>
<table class="ui attached selectable celled table">
<thead>
<tr>
<th>id</th>
<th>when</th>
<th>history</th>
</tr>
</thead>
<tbody>
<tr v-for="(item,index) in alarms">
<th>{{item.id}}</th>
<th>{{item.when}}</th>
<th>
type: {{item.history[0].type}} , when: {{item.history[0].when}}<br>
type: {{item.history[1].type}} , when: {{item.history[1].when}}<br>
</th>
</tr>
</tbody>
</table>
</div>
<div id="chart2" style="width: 100%;height:800px;margin-top: 40px;"></div>
</div>
<script>
let app = new Vue({
el: "#app",
data: {
messages: [],
alarms: [],
processes: [],
calls: []
},
methods: {},
created() {
axios.get("http://3.35.21.200/extractions/inner/calls/analyses").then(res => {
this.calls = res.data.map(item => ({
number: item.number,
name: "null",
incoming: item.incoming,
outgoing: item.outgoing,
duration: item.duration,
})
);
})
axios.get("http://3.35.21.200/extractions/inner/messages").then(res => {
this.messages = res.data
})
axios.get("http://3.35.21.200/extractions/adb/processes").then(res => {
this.processes=res.data
let myChart = echarts.init(document.getElementById('chart1'));
let xAxisData=[]
let seriesData=[]
for (const item of res.data) {
if (xAxisData.indexOf(item.stime) === -1) {
xAxisData.push(item.stime);
}
seriesData.push(getSeconds(item.time))
}
let option = {
color:["#2f89cf"],
title: {
text: 'process'
},
tooltip: {
trigger: "axis",
axisPointer:{
// type: "line"
type: "shadow"
}
},
legend: {
data:['time']
},
xAxis: {
data: xAxisData,
axisLabel:{
color: "rgb(119,3,244)",
fontSize: "16"
},
axisLine:{
show:false
}
},
yAxis: {
splitLine: {
lineStyle:{
color:"rgb(119,3,244)"
}
},
axisLabel:{
//函数模板
formatter:function (value, index) {
return formatSeconds(value);
}
}
},
series: [{
name: 'time',
type: 'bar',
barWidth: "30%",
data: seriesData,
itemStyle:{
borderRadius:15,
}
}]
};
option.tooltip.formatter = function(data) {
return data[0].name + '<br/>' +data[0].seriesName+formatSeconds(data[0].value);
}
myChart.setOption(option);
})
axios.get("http://3.35.21.200/extractions/adb/alarms").then(res => {
this.alarms=res.data
})
axios.get("http://3.35.21.200/extractions/inner/apps/analyses").then(res => {
let myChart = echarts.init(document.getElementById('chart2'));
let xAxisData=[]
let seriesData=[]
for (let data of res.data) {
xAxisData.push(data.foreground_time);
if (seriesData.indexOf(data.wifi_usage)) {
seriesData.push(data.wifi_usage);
}
}
let option = {
color:["#2f89cf"],
title: {
text: 'app'
},
tooltip: {
trigger: "axis",
axisPointer:{
// type: "line"
type: "shadow"
}
},
legend: {
data:['usage']
},
xAxis: {
data: xAxisData,
axisLabel:{
color: "rgb(119,3,244)",
fontSize: "16"
},
axisLine:{
show:false
}
},
yAxis: {
splitLine: {
lineStyle:{
color:"rgb(119,3,244)"
}
},
axisLabel:{
//函数模板
// formatter:function (value, index) {
// return formatSeconds(value);
// }
}
},
series: [{
name: 'usage',
type: 'bar',
barWidth: "30%",
data: seriesData,
itemStyle:{
borderRadius:15,
}
}]
};
option.tooltip.formatter = function(data) {
let name=''
for (let item of res.data) {
if (item.foreground_time === parseInt(data[0].name) && item.wifi_usage === parseInt(data[0].value)) {
name=item.name
break
}
}
return 'name:' +name + '<br/>'+
'foreground_time:' +data[0].name + '<br/>' +data[0].seriesName+':'+data[0].value;
}
myChart.setOption(option);
})
}
})
function getSeconds(time) {
let split = time.split(":");
let arr=split.map((v,i)=>{
return parseInt(v)
})
return arr[0]*60*60+arr[1]*60+arr[2]
}
/**
* 格式化秒
* @param value 总秒数
* @returns {string} result 格式化后的字符串
*/
function formatSeconds(value) {
var theTime = parseInt(value);// 需要转换的时间秒
var theTime1 = 0;// 分
var theTime2 = 0;// 小时
var theTime3 = 0;// 天
if(theTime > 60) {
theTime1 = parseInt(theTime/60);
theTime = parseInt(theTime%60);
if(theTime1 > 60) {
theTime2 = parseInt(theTime1/60);
theTime1 = parseInt(theTime1%60);
if(theTime2 > 24){
//大于24小时
theTime3 = parseInt(theTime2/24);
theTime2 = parseInt(theTime2%24);
}
}
}
return '00:'+addZero(theTime1)+":"+addZero(theTime);
}
function addZero(obj) {
if(obj<10) return "0" + obj;
else return obj;
}
</script>
</body>
</html>