OrenGitHub / dhscanner

free as in speech container scanner
https://orengithub.github.io/
1 stars 0 forks source link

Translate knowledge base to prolog file #18

Closed OrenGitHub closed 2 months ago

OrenGitHub commented 2 months ago

delegated to kbgen here

OrenGitHub commented 2 months ago
$ python dhscanner.py --input=example.tar --workdir=workdir
[25/04/2024 ( 16:36:03 )] [INFO]: everything looks great - starting to untar 😃
[25/04/2024 ( 16:36:06 )] [INFO]: everything looks great - finished untar 😃
[25/04/2024 ( 16:36:06 )] [INFO]: found 2 first party js files
[25/04/2024 ( 16:36:06 )] [INFO]: parse errors: {"js": 1}
[25/04/2024 ( 16:36:06 )] [INFO]: total num files: {"js": 2}
[25/04/2024 ( 16:36:06 )] [INFO]: wrote knowledge base: kb.pl

$ cat kb.pl
kb_call( startloc_1_17_endloc_1_34 ).
kb_call( startloc_5_13_endloc_5_21 ).
kb_call( startloc_8_1_endloc_14_2 ).
kb_call( startloc_36_1_endloc_38_2 ).
kb_call( startloc_16_1_endloc_34_2 ).
kb_call( startloc_3_12_endloc_3_24 ).
kb_call( startloc_2_12_endloc_2_25 ).
kb_call( startloc_37_3_endloc_37_57 ).
kb_call( startloc_37_15_endloc_37_56 ).
kb_call( startloc_37_3_endloc_37_9 ).
kb_call( startloc_33_3_endloc_33_30 ).
kb_call( startloc_31_17_endloc_31_27 ).
kb_call( startloc_32_3_endloc_32_27 ).
kb_call( startloc_18_22_endloc_30_3 ).
kb_call( startloc_33_12_endloc_33_29 ).
kb_param( startloc_16_20_endloc_16_22 ).
kb_param_has_name(startloc_16_20_endloc_16_22,req).
kb_callable_has_param(startloc_16_20_endloc_16_22,startloc_16_19_endloc_34_1).
kb_param( startloc_16_25_endloc_16_27 ).
kb_param_has_name(startloc_16_25_endloc_16_27,res).
kb_callable_has_param(startloc_16_25_endloc_16_27,startloc_16_19_endloc_34_1).
kb_param( startloc_8_21_endloc_8_23 ).
kb_param_has_name(startloc_8_21_endloc_8_23,req).
kb_callable_has_param(startloc_8_21_endloc_8_23,startloc_8_20_endloc_14_1).
kb_param( startloc_8_26_endloc_8_28 ).
kb_param_has_name(startloc_8_26_endloc_8_28,res).
kb_callable_has_param(startloc_8_26_endloc_8_28,startloc_8_20_endloc_14_1).