updates schema template to match current layout
This commit is contained in:
parent
17b1353718
commit
a472e0b560
@ -4,8 +4,8 @@ from zschema.leaves import *
|
||||
from zschema.compounds import *
|
||||
import zschema.registry
|
||||
|
||||
import schemas.zcrypto as zcrypto
|
||||
import schemas.zgrab2 as zgrab2
|
||||
import zcrypto
|
||||
import zgrab2
|
||||
|
||||
#{MODULE_NAME}_scan_response = SubRecord({
|
||||
"result": SubRecord({
|
||||
|
@ -30,10 +30,10 @@ for file in $(ls *.sh); do
|
||||
done
|
||||
popd
|
||||
|
||||
cp "integration_tests/.template/schema.py" "schemas/$module_name.py"
|
||||
cp "integration_tests/.template/schema.py" "schemas/zgrab2/$module_name.py"
|
||||
doReplacements "schemas/$module_name.py"
|
||||
|
||||
echo "import schemas.$module_name" >> schemas/__init__.py
|
||||
echo "import $module_name" >> schemas/__init__.py
|
||||
|
||||
cp "integration_tests/.template/module.go" "modules/$module_name.go"
|
||||
doReplacements "modules/$module_name.go"
|
||||
|
@ -69,7 +69,7 @@ for protocol in $(ls $ZGRAB_OUTPUT); do
|
||||
echo "Validating $target [{("
|
||||
cat $target
|
||||
echo ")}]:"
|
||||
if ! python -m zschema validate schemas/__init__.py:zgrab2 $target; then
|
||||
if ! python -m zschema validate zgrab2 $target --path . --module schemas.zgrab2 ; then
|
||||
echo "Schema validation failed for $protocol/$outfile"
|
||||
err="schema failure@$protocol/$outfile"
|
||||
if [[ $status -eq 0 ]]; then
|
||||
|
Loading…
Reference in New Issue
Block a user