- qpscanner/views/results/json.cfm
- develop
- 1 KB
- 39
1<cfcontent type="application/json"/><cfoutput>{
2 <cfset Data = rc.ScanResults.Data />
3 <cfset Info = rc.ScanResults.Info />
4 "info" :
5 { "count" :
6 { "alerts" : #Info.Totals.AlertCount#
7 , "riskfiles" : #Info.Totals.RiskFileCount#
8 , "queries" : #Info.Totals.QueryCount#
9 , "files" : #Info.Totals.FileCount#
10 }
11 , "timetaken" : #Info.Totals.Time#
12 , "timeout" : #Info.Timeout#
13 }
14
15 , "files" : </cfoutput>
16 [<cfoutput query="Data" group="FileId">
17 <cfif CurrentRow GT 1>,</cfif>
18 { "id" : #serializeJson(FileId)#
19 , "name" : #serializeJson(FileName)#
20 , "alertcount" : #QueryAlertCount#
21 , "queries" :
22 <cfset SubRow = 0 />
23 [<cfoutput><cfif SubRow++ >,</cfif>
24 { "id" : #serializeJson(QueryId)#
25 , "name" : #serializeJson(QueryName)#
26 <cfif isNumeric(QueryStartLine)>, "startline" : #QueryStartLine#
27 , "endline" : #QueryEndLine#</cfif>
28 <cfif Len(ScopeList)> , "scopes" : #serializeJson(ScopeList)#</cfif>
29 , "code" : #serializeJson(QueryCode)#
30 , "FilteredCode" : #serializeJson(FilteredCode)#
31 <cfif StructKeyExists(Data,'QuerySegments')>
32 , "segments" : #serializeJson(QuerySegments)#
33 </cfif>
34 }
35 </cfoutput>]
36 }
37 </cfoutput>
38 <cfoutput>]
39
40}</cfoutput>