updates schema template to match current layout

This commit is contained in:
Justin Bastress 2018-04-23 16:41:34 -04:00
parent 17b1353718
commit a472e0b560
3 changed files with 5 additions and 5 deletions

@ -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