- qpscanner/controllers/scan.cfc
- master
- 809 B
- 40
1component
2{
3 function init(fw){variables.fw=arguments.fw;}
4
5
6 function go(rc)
7 {
8 if ( NOT StructKeyExists(rc,'Config') )
9 rc.Config = "default";
10
11 if ( NOT StructKeyExists(rc,'Instance') )
12 rc.Instance = createUuid();
13
14 if ( NOT StructKeyExists(rc,'OutputFormat') )
15 rc.OutputFormat = 'html';
16
17 rc.ScanData = Application.Cfcs.Settings.read
18 ( ConfigId : rc.Config
19 , Format : 'Struct'
20 , Overrides : rc
21 );
22
23 Request.Scanner = Application.Cfcs.Scanner.init( ArgumentCollection = rc.ScanData );
24
25 rc.ScanResults = Request.Scanner.go();
26
27 Session.Instance[rc.Instance] =
28 { Settings = rc.ScanData
29 , Results = rc.ScanResults
30 , TimeRun = Now()
31 };
32
33 fw.setView('results.#rc.OutputFormat#');
34
35 request.layout = rc.OutputFormat EQ 'html';
36
37 rc.Title = 'Scan Results';
38 }
39
40
41}