googleprojectzero / domato

DOM fuzzer
https://googleprojectzero.blogspot.ch/2017/09/the-great-dom-fuzz-off-of-2017.html
Apache License 2.0
1.69k stars 278 forks source link

Help please embedding into CSS #18

Closed ghost closed 6 years ago

ghost commented 6 years ago

I'm trying to make a grammar that embeds XML and XSL into CSS used in a private document editor, but I do not understand why I can not use:

htmlgrammar.generate_symbol('style_value')

I created another section:

<cssurl> = url(<xmlelement_xml>)

Error:

...
...
  File "/Users/agarcia/domato/grammar.py", line 347, in _select_creator
    raise GrammarError('No creators for type ' + symbol)
grammar.GrammarError: No creators for type xmlelement_xml

Result should be:

cssurl = URL(data:mimetype;<xml.....>)
ifratric commented 6 years ago

Hey there, The error you are getting means that the grammar generator doesn't know how to generate the <xmlelement_xml> symbol. Somewhere in the current grammar (or the included grammars) you should have a rule that starts with <xmlelement_xml> =

ghost commented 6 years ago

I have a xml.txt and xmlattrb.txt included in the bottom of xml.txt. But doesn't work. As example I used = url() and I got same error

ghost commented 6 years ago

The error is always in this line <xml_style_value> = <import from=cssgrammar symbol=declaration5> Adding css.txt and cssproperties doesn't work, and I think there are some files including others that ends in a loop. Tried to fix it, but still getting this error because the import declaration.

ifratric commented 6 years ago

Hey, sorry for not replying sooner (I was away for a couple of days), did you resolve the issue? If not, I can take a look at your grammar files. You can either attach it here or mail it to ifratric@google.com