├── servers ├── dockers │ ├── idx_0 │ │ ├── requirements.txt │ │ ├── Dockerfile │ │ └── app.py │ ├── idx_1 │ │ ├── requirements.txt │ │ ├── Dockerfile │ │ └── app.py │ ├── idx_2 │ │ ├── requirements.txt │ │ ├── Dockerfile │ │ └── app.py │ ├── idx_3 │ │ ├── requirements.txt │ │ ├── Dockerfile │ │ └── app.py │ ├── idx_4 │ │ ├── requirements.txt │ │ ├── Dockerfile │ │ └── app.py │ ├── idx_5 │ │ ├── requirements.txt │ │ ├── Dockerfile │ │ └── app.py │ ├── idx_6 │ │ ├── requirements.txt │ │ ├── Dockerfile │ │ └── app.py │ ├── idx_7 │ │ ├── requirements.txt │ │ ├── Dockerfile │ │ └── app.py │ ├── idx_8 │ │ ├── requirements.txt │ │ ├── Dockerfile │ │ └── app.py │ ├── idx_9 │ │ ├── requirements.txt │ │ ├── Dockerfile │ │ └── app.py │ └── idx_10 │ │ ├── requirements.txt │ │ ├── Dockerfile │ │ └── app.py └── docker-compose.yml ├── requirements.txt ├── src ├── fuzzer │ ├── exception.py │ ├── minimizer.py │ └── reproducer.py ├── web_api │ ├── web_api_type.py │ ├── tag_manager.py │ ├── value.json │ ├── value_manager.py │ ├── tag.json │ └── web_object.py ├── js_api │ ├── js_api_type.py │ └── js_object.py └── script │ ├── testcase.py │ ├── string_instruction.py │ ├── script.py │ ├── js_instruction.py │ ├── web_instruction.py │ ├── web_page.py │ ├── statement.py │ ├── testcase_generator.py │ └── pattern_builder.py ├── tools └── domato │ ├── vbscript │ ├── README.md │ └── generator.py │ ├── jscript │ ├── README.md │ ├── template.html │ └── generator.py │ ├── template.html │ ├── php │ ├── README.md │ ├── generator.py │ ├── php.txt │ ├── parse_types.py │ └── template.php │ ├── CONTRIBUTING.md │ ├── mathml │ ├── test.py │ └── mathattrvalues.txt │ ├── canvas │ ├── template.html │ ├── README.md │ ├── generator.py │ └── canvas.txt │ ├── webgl │ ├── generator.py │ └── template.html │ ├── LICENSE │ └── common.txt ├── kill.sh ├── README.md ├── .gitignore └── chrome_downloader.py /servers/dockers/idx_0/requirements.txt: -------------------------------------------------------------------------------- 1 | flask 2 | -------------------------------------------------------------------------------- /servers/dockers/idx_1/requirements.txt: -------------------------------------------------------------------------------- 1 | flask 2 | -------------------------------------------------------------------------------- /servers/dockers/idx_2/requirements.txt: -------------------------------------------------------------------------------- 1 | flask 2 | -------------------------------------------------------------------------------- /servers/dockers/idx_3/requirements.txt: -------------------------------------------------------------------------------- 1 | flask 2 | -------------------------------------------------------------------------------- /servers/dockers/idx_4/requirements.txt: -------------------------------------------------------------------------------- 1 | flask 2 | -------------------------------------------------------------------------------- /servers/dockers/idx_5/requirements.txt: -------------------------------------------------------------------------------- 1 | flask 2 | -------------------------------------------------------------------------------- /servers/dockers/idx_6/requirements.txt: -------------------------------------------------------------------------------- 1 | flask 2 | -------------------------------------------------------------------------------- /servers/dockers/idx_7/requirements.txt: -------------------------------------------------------------------------------- 1 | flask 2 | -------------------------------------------------------------------------------- /servers/dockers/idx_8/requirements.txt: -------------------------------------------------------------------------------- 1 | flask 2 | -------------------------------------------------------------------------------- /servers/dockers/idx_9/requirements.txt: -------------------------------------------------------------------------------- 1 | flask 2 | -------------------------------------------------------------------------------- /servers/dockers/idx_10/requirements.txt: -------------------------------------------------------------------------------- 1 | flask 2 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | selenium 2 | bs4 3 | flask 4 | msedge-selenium-tools 5 | -------------------------------------------------------------------------------- /src/fuzzer/exception.py: -------------------------------------------------------------------------------- 1 | class TestcaseTimeout(Exception): 2 | """Base class for other exceptions""" 3 | pass 4 | -------------------------------------------------------------------------------- /tools/domato/vbscript/README.md: -------------------------------------------------------------------------------- 1 | Script and grammar for fuzzing Microsoft VBScript engine. 2 | 3 | Usage is the same as for DOM fuzzing. 4 | -------------------------------------------------------------------------------- /tools/domato/jscript/README.md: -------------------------------------------------------------------------------- 1 | Script and grammar for fuzzing Microsoft jscript.dll JavaScript engine. 2 | 3 | Usage is the same as for DOM fuzzing. 4 | -------------------------------------------------------------------------------- /src/web_api/web_api_type.py: -------------------------------------------------------------------------------- 1 | from enum import Enum 2 | from enum import auto 3 | 4 | class WebApiType(Enum): 5 | read_property = auto() 6 | write_property = auto() 7 | call_method = auto() 8 | construct = auto() -------------------------------------------------------------------------------- /tools/domato/template.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /servers/dockers/idx_0/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.7-alpine 2 | WORKDIR /code 3 | ENV FLASK_APP=app.py 4 | ENV FLASK_RUN_HOST=0.0.0.0 5 | RUN apk add --no-cache gcc musl-dev linux-headers 6 | COPY requirements.txt requirements.txt 7 | RUN pip install -r requirements.txt 8 | EXPOSE 7000 9 | COPY . . 10 | CMD ["flask", "run"] 11 | -------------------------------------------------------------------------------- /servers/dockers/idx_1/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.7-alpine 2 | WORKDIR /code 3 | ENV FLASK_APP=app.py 4 | ENV FLASK_RUN_HOST=0.0.0.0 5 | RUN apk add --no-cache gcc musl-dev linux-headers 6 | COPY requirements.txt requirements.txt 7 | RUN pip install -r requirements.txt 8 | EXPOSE 7001 9 | COPY . . 10 | CMD ["flask", "run"] 11 | -------------------------------------------------------------------------------- /servers/dockers/idx_10/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.7-alpine 2 | WORKDIR /code 3 | ENV FLASK_APP=app.py 4 | ENV FLASK_RUN_HOST=0.0.0.0 5 | RUN apk add --no-cache gcc musl-dev linux-headers 6 | COPY requirements.txt requirements.txt 7 | RUN pip install -r requirements.txt 8 | EXPOSE 7010 9 | COPY . . 10 | CMD ["flask", "run"] 11 | -------------------------------------------------------------------------------- /servers/dockers/idx_2/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.7-alpine 2 | WORKDIR /code 3 | ENV FLASK_APP=app.py 4 | ENV FLASK_RUN_HOST=0.0.0.0 5 | RUN apk add --no-cache gcc musl-dev linux-headers 6 | COPY requirements.txt requirements.txt 7 | RUN pip install -r requirements.txt 8 | EXPOSE 7002 9 | COPY . . 10 | CMD ["flask", "run"] 11 | -------------------------------------------------------------------------------- /servers/dockers/idx_3/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.7-alpine 2 | WORKDIR /code 3 | ENV FLASK_APP=app.py 4 | ENV FLASK_RUN_HOST=0.0.0.0 5 | RUN apk add --no-cache gcc musl-dev linux-headers 6 | COPY requirements.txt requirements.txt 7 | RUN pip install -r requirements.txt 8 | EXPOSE 7003 9 | COPY . . 10 | CMD ["flask", "run"] 11 | -------------------------------------------------------------------------------- /servers/dockers/idx_4/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.7-alpine 2 | WORKDIR /code 3 | ENV FLASK_APP=app.py 4 | ENV FLASK_RUN_HOST=0.0.0.0 5 | RUN apk add --no-cache gcc musl-dev linux-headers 6 | COPY requirements.txt requirements.txt 7 | RUN pip install -r requirements.txt 8 | EXPOSE 7004 9 | COPY . . 10 | CMD ["flask", "run"] 11 | -------------------------------------------------------------------------------- /servers/dockers/idx_5/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.7-alpine 2 | WORKDIR /code 3 | ENV FLASK_APP=app.py 4 | ENV FLASK_RUN_HOST=0.0.0.0 5 | RUN apk add --no-cache gcc musl-dev linux-headers 6 | COPY requirements.txt requirements.txt 7 | RUN pip install -r requirements.txt 8 | EXPOSE 7005 9 | COPY . . 10 | CMD ["flask", "run"] 11 | -------------------------------------------------------------------------------- /servers/dockers/idx_6/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.7-alpine 2 | WORKDIR /code 3 | ENV FLASK_APP=app.py 4 | ENV FLASK_RUN_HOST=0.0.0.0 5 | RUN apk add --no-cache gcc musl-dev linux-headers 6 | COPY requirements.txt requirements.txt 7 | RUN pip install -r requirements.txt 8 | EXPOSE 7006 9 | COPY . . 10 | CMD ["flask", "run"] 11 | -------------------------------------------------------------------------------- /servers/dockers/idx_7/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.7-alpine 2 | WORKDIR /code 3 | ENV FLASK_APP=app.py 4 | ENV FLASK_RUN_HOST=0.0.0.0 5 | RUN apk add --no-cache gcc musl-dev linux-headers 6 | COPY requirements.txt requirements.txt 7 | RUN pip install -r requirements.txt 8 | EXPOSE 7007 9 | COPY . . 10 | CMD ["flask", "run"] 11 | -------------------------------------------------------------------------------- /servers/dockers/idx_8/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.7-alpine 2 | WORKDIR /code 3 | ENV FLASK_APP=app.py 4 | ENV FLASK_RUN_HOST=0.0.0.0 5 | RUN apk add --no-cache gcc musl-dev linux-headers 6 | COPY requirements.txt requirements.txt 7 | RUN pip install -r requirements.txt 8 | EXPOSE 7008 9 | COPY . . 10 | CMD ["flask", "run"] 11 | -------------------------------------------------------------------------------- /servers/dockers/idx_9/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.7-alpine 2 | WORKDIR /code 3 | ENV FLASK_APP=app.py 4 | ENV FLASK_RUN_HOST=0.0.0.0 5 | RUN apk add --no-cache gcc musl-dev linux-headers 6 | COPY requirements.txt requirements.txt 7 | RUN pip install -r requirements.txt 8 | EXPOSE 7009 9 | COPY . . 10 | CMD ["flask", "run"] 11 | -------------------------------------------------------------------------------- /src/js_api/js_api_type.py: -------------------------------------------------------------------------------- 1 | from enum import Enum 2 | from enum import auto 3 | 4 | class JsApiType(Enum): 5 | assign = auto() 6 | operation_addition = auto() 7 | operation_minus = auto() 8 | operation_multiple = auto() 9 | operation_division = auto() 10 | operation_equal = auto() 11 | operation_not_equal = auto() 12 | -------------------------------------------------------------------------------- /kill.sh: -------------------------------------------------------------------------------- 1 | ps -ef | grep fuzzer.fuzzer | awk -F" " '{print "kill -9 " $2}' | sh 2 | ps -ef | grep chrome | grep /home/shelling/chromium | awk -F" " '{print "kill -9 " $2}' | sh 3 | ps -ef | grep geckodriver | awk -F" " '{print "kill -9 " $2}' | sh 4 | ps -ef | grep firefox-bin | awk -F" " '{print "kill -9 " $2}' | sh 5 | ps -ef | grep msedgedriver | awk -F" " '{print "kill -9 " $2}' | sh 6 | ps -ef | grep msedge | awk -F" " '{print "kill -9 " $2}' | sh 7 | ps -ef | grep firefox | awk -F" " '{print "kill -9 " $2}' | sh 8 | ps -ef | grep chrome | awk -F" " '{print "kill -9 " $2}' | sh 9 | -------------------------------------------------------------------------------- /src/script/testcase.py: -------------------------------------------------------------------------------- 1 | from src.script.web_page import WebPage 2 | 3 | class Testcase: 4 | def __init__(self, name, origins, pages): 5 | self.data = {} 6 | self.name = name 7 | self.origins = origins 8 | self.pages = pages 9 | 10 | for o in range(self.origins): 11 | self.data[o] = {} 12 | # for p in range(pages): 13 | # self.data[o][p] 14 | 15 | def add(self, html, origin, page): 16 | self.data[origin][page] = html 17 | 18 | def get(self, origin, page): 19 | return self.data[origin][page] 20 | -------------------------------------------------------------------------------- /src/script/string_instruction.py: -------------------------------------------------------------------------------- 1 | from src.web_api.web_object import WebObject 2 | from src.web_api.web_api_type import WebApiType 3 | 4 | class StrInstruction: 5 | def __init__(self, text, keep=True): 6 | self.text = text 7 | self.keep = keep 8 | 9 | def lift(self, guard=False, debug=False, indent=0): 10 | code = self.text 11 | if guard: 12 | code = "try {" + code + "} catch(e) {" 13 | if debug: 14 | code += "console.log(e);" 15 | code += "} " 16 | 17 | code = " " * indent + code 18 | 19 | return code 20 | -------------------------------------------------------------------------------- /tools/domato/php/README.md: -------------------------------------------------------------------------------- 1 | The `php_generated.txt` file was generated by running `parse_types.py` on the 2 | source code of php. 3 | 4 | Possible improvements: 5 | - Callbacks are currently unused (`` always point to `phpinfo`). 6 | Generating callback code in a similar manner to the main function could 7 | potentially expose additional bugs, especially if callbacks get access to the 8 | same variables / can mess up stuff that the caller didn't expect. 9 | - Currently, the return values from the function / method calls are ignored. 10 | In cases where function / method calls return non-trivial types, it be better 11 | to store these return values in variables and use them as function arguments 12 | in later calls or potentially call methods on these "generated" objects. 13 | - It would be great to be able to infer the expected classes of the objects 14 | parameters taken by functions/methods. 15 | - The `parse_type.py` code is ugly, and should be refactored a bit. 16 | - Randomize the references (`$ref_` in template.php). 17 | 18 | -------------------------------------------------------------------------------- /tools/domato/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # How to contribute 2 | 3 | We'd love to accept your patches and contributions to this project. There are 4 | just a few small guidelines you need to follow. 5 | 6 | ## Contributor License Agreement 7 | 8 | Contributions to any Google project must be accompanied by a Contributor License 9 | Agreement. This is necessary because you own the copyright to your changes, even 10 | after your contribution becomes part of this project. So this agreement simply 11 | gives us permission to use and redistribute your contributions as part of the 12 | project. Head over to to see your current 13 | agreements on file or to sign a new one. 14 | 15 | You generally only need to submit a CLA once, so if you've already submitted one 16 | (even if it was for a different project), you probably don't need to do it 17 | again. 18 | 19 | ## Code reviews 20 | 21 | All submissions, including submissions by project members, require review. We 22 | use GitHub pull requests for this purpose. Consult [GitHub Help] for more 23 | information on using pull requests. 24 | 25 | [GitHub Help]: https://help.github.com/articles/about-pull-requests/ 26 | -------------------------------------------------------------------------------- /src/web_api/tag_manager.py: -------------------------------------------------------------------------------- 1 | import json 2 | import random 3 | 4 | class TagManager: 5 | __grammar = None 6 | 7 | @classmethod 8 | def init(cls): 9 | if cls.__grammar is None: 10 | with open("src/web_api/tag.json") as f: 11 | cls.__grammar = json.load(f) 12 | 13 | @classmethod 14 | def bind(cls, name): 15 | cls.init() 16 | if name in cls.__grammar: 17 | try: 18 | obj = cls.__grammar[name] 19 | if obj: 20 | return obj 21 | else: 22 | return "HTMLElement" 23 | except KeyError as e: 24 | return "HTMLElement" 25 | 26 | @classmethod 27 | def tags(cls): 28 | cls.init() 29 | return list(cls.__grammar.keys()) 30 | 31 | @classmethod 32 | def random_tag(cls): 33 | cls.init() 34 | tag = random.choice(list(cls.__grammar.keys())) 35 | return f"'{tag}'" 36 | 37 | 38 | def main(): 39 | candidate = TagManager.tags() 40 | print(candidate) 41 | 42 | obj = TagManager.bind("a") 43 | print(obj) 44 | 45 | if __name__ == "__main__": 46 | main() -------------------------------------------------------------------------------- /tools/domato/mathml/test.py: -------------------------------------------------------------------------------- 1 | # Copyright 2017 Google Inc. All Rights Reserved. 2 | # Licensed under the Apache License, Version 2.0 (the "License"); 3 | # you may not use this file except in compliance with the License. 4 | # You may obtain a copy of the License at 5 | # 6 | # http://www.apache.org/licenses/LICENSE-2.0 7 | # 8 | # Unless required by applicable law or agreed to in writing, software 9 | # distributed under the License is distributed on an "AS IS" BASIS, 10 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | # See the License for the specific language governing permissions and 12 | # limitations under the License. 13 | 14 | from __future__ import print_function 15 | import os 16 | import re 17 | import random 18 | import sys 19 | 20 | from grammar import Grammar 21 | 22 | cssgrammar = Grammar() 23 | err = cssgrammar.parse_from_file('css.txt') 24 | 25 | htmlgrammar = Grammar() 26 | htmlgrammar.add_import('cssgrammar', cssgrammar) 27 | htmlgrammar.parse_from_file('mathml.txt') 28 | 29 | # result_string = htmlgrammar .generate_symbol('svgelement_svg') 30 | # just math, without svg 31 | 32 | result_string = htmlgrammar .generate_symbol('mathelement_math') 33 | print('\n' + result_string) 34 | -------------------------------------------------------------------------------- /tools/domato/canvas/template.html: -------------------------------------------------------------------------------- 1 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /servers/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: "3.5" 2 | services: 3 | idx_0: 4 | build: dockers/idx_0 5 | ports: 6 | - "7000:5000" 7 | volumes: 8 | - ./data/idx_0:/data 9 | idx_1: 10 | build: dockers/idx_1 11 | ports: 12 | - "7001:5000" 13 | volumes: 14 | - ./data/idx_1:/data 15 | idx_2: 16 | build: dockers/idx_2 17 | ports: 18 | - "7002:5000" 19 | volumes: 20 | - ./data/idx_2:/data 21 | idx_3: 22 | build: dockers/idx_3 23 | ports: 24 | - "7003:5000" 25 | volumes: 26 | - ./data/idx_3:/data 27 | idx_4: 28 | build: dockers/idx_4 29 | ports: 30 | - "7004:5000" 31 | volumes: 32 | - ./data/idx_4:/data 33 | idx_5: 34 | build: dockers/idx_5 35 | ports: 36 | - "7005:5000" 37 | volumes: 38 | - ./data/idx_5:/data 39 | idx_6: 40 | build: dockers/idx_6 41 | ports: 42 | - "7006:5000" 43 | volumes: 44 | - ./data/idx_6:/data 45 | idx_7: 46 | build: dockers/idx_7 47 | ports: 48 | - "7007:5000" 49 | volumes: 50 | - ./data/idx_7:/data 51 | idx_8: 52 | build: dockers/idx_8 53 | ports: 54 | - "7008:5000" 55 | volumes: 56 | - ./data/idx_8:/data 57 | idx_9: 58 | build: dockers/idx_9 59 | ports: 60 | - "7009:5000" 61 | volumes: 62 | - ./data/idx_9:/data 63 | idx_10: 64 | build: dockers/idx_10 65 | ports: 66 | - "7010:5000" 67 | volumes: 68 | - ./data/idx_10:/data -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # FuzzOrigin 2 | 3 | ## Paper 4 | [FuzzOrigin: Detecting UXSS vulnerabilities in Browsers through Origin Fuzzing](https://www.usenix.org/conference/usenixsecurity22/presentation/kim) 5 | 6 | ## Server Setting 7 | ``` 8 | $ sudo apt-get install docker-compose 9 | $ cd servers 10 | $ sudo docker-compose up -d 11 | $ sudo chown -R $(id -nu):$(id -ng) . 12 | ``` 13 | 14 | ## Download chrome 15 | ``` 16 | $ python3 chrome_downloader.py [version] 17 | ``` 18 | Visit [OmahaProxy](https://omahaproxy.appspot.com/) to check chrome version. 19 | 20 | ## Run fuzzer 21 | python3 -m src.fuzzer.fuzzer [browser type] [browser binary] [idx] 22 | - browser type: chrome, firefox, edge 23 | - browser binary: browser binary path 24 | - idx: test idx 25 | ``` 26 | $ python3 -m src.fuzzer.fuzzer chrome chrome/103.0.5042.0_999146/chrome 0 27 | ``` 28 | 29 | ## Result 30 | tests/output_[idx] 31 | ``` 32 | $ ls tests/output_0 33 | ``` 34 | 35 | ## Citation 36 | ``` 37 | @inproceedings {281314, 38 | author = {Sunwoo Kim and Young Min Kim and Jaewon Hur and Suhwan Song and Gwangmu Lee and Byoungyoung Lee}, 39 | title = {{FuzzOrigin}: Detecting {UXSS} vulnerabilities in Browsers through Origin Fuzzing}, 40 | booktitle = {31st USENIX Security Symposium (USENIX Security 22)}, 41 | year = {2022}, 42 | isbn = {978-1-939133-31-1}, 43 | address = {Boston, MA}, 44 | pages = {1008--1023}, 45 | url = {https://www.usenix.org/conference/usenixsecurity22/presentation/kim}, 46 | publisher = {USENIX Association}, 47 | month = aug, 48 | } 49 | ``` -------------------------------------------------------------------------------- /src/script/script.py: -------------------------------------------------------------------------------- 1 | from src.script.web_instruction import WebInstruction 2 | from src.script.statement import * 3 | from src.web_api.web_api_type import WebApiType 4 | 5 | 6 | class Script: 7 | def __init__(self): 8 | self.instructions = [] 9 | 10 | def lift(self, guard=False, debug=False, indent=0): 11 | code = "" 12 | for inst in self.instructions: 13 | code += inst.lift(guard, debug, indent) + "\n" 14 | return code 15 | 16 | 17 | def main(): 18 | sc = Script() 19 | inst = WebInstruction("v1", [], "v2", "Node", WebApiType.read_property, "baseURI") 20 | sc.instructions.append(inst) 21 | 22 | state = IfElseStatement() 23 | inst = WebInstruction("v1", [], "v2", "Node", WebApiType.write_property, "nodeValue") 24 | state.if_instructions.append(inst) 25 | 26 | sc.instructions.append(state) 27 | 28 | inst = WebInstruction("v1", ["v2"], "v3", "Element", WebApiType.call_method, "appendChild") 29 | sc.instructions.append(inst) 30 | 31 | state = FunctionStatement("f1", ["v1"]) 32 | inst = WebInstruction("v1", [], "v2", "Node", WebApiType.read_property, "baseURI") 33 | state.instructions.append(inst) 34 | sc.instructions.append(state) 35 | 36 | state = TryCatchStatement() 37 | inst = WebInstruction("v1", [], None, "Node", WebApiType.read_property, "baseURI") 38 | state.try_instructions.append(inst) 39 | inst = WebInstruction("v1", ["v2"], "v3", "Element", WebApiType.call_method, "appendChild") 40 | state.catch_instructions.append(inst) 41 | sc.instructions.append(state) 42 | 43 | 44 | if __name__ == "__main__": 45 | main() 46 | -------------------------------------------------------------------------------- /servers/dockers/idx_1/app.py: -------------------------------------------------------------------------------- 1 | import flask 2 | import time 3 | import logging 4 | 5 | logging.basicConfig(filename = "/data/log.txt", level = logging.DEBUG) 6 | 7 | app = flask.Flask(__name__) 8 | 9 | @app.route('/sop/') 10 | def sop_send(name): 11 | with open(f"/data/sop/{name}") as f: 12 | html = f.read() 13 | 14 | response = flask.Response(html) 15 | response.headers["X-Frame-Options"] = "SAMEORIGIN" 16 | return response 17 | 18 | @app.route('/') 19 | def send(name): 20 | # return flask.send_from_directory('.', name) 21 | logging.info(f"[LOG] {name}") 22 | r = flask.make_response(flask.send_from_directory('/data', name)) 23 | r.headers["Cache-Control"] = "no-cache, no-store, must-revalidate" 24 | r.headers["Pragma"] = "no-cache" 25 | r.headers["Expires"] = "0" 26 | r.headers['Cache-Control'] = 'public, max-age=0' 27 | r.set_cookie('userID', 'parent') 28 | return r 29 | 30 | @app.route('/svg/') 31 | def svg_send(name): 32 | with open("/data/svg/template.svg") as f: 33 | html = f.read() 34 | html = html.replace("", name.split(".")[0]) 35 | r = flask.Response(html, mimetype='image/svg+xml') 36 | return r 37 | 38 | @app.route('/svg_parent/') 39 | def svg_parent_send(name): 40 | with open("/data/svg/template.svg") as f: 41 | html = f.read() 42 | html = html.replace("", f"{name.split('.')[0]}.parentNode") 43 | r = flask.Response(html, mimetype='image/svg+xml') 44 | return r 45 | 46 | @app.route('/') 47 | def hello_world(): 48 | return 'Hello, idx_1!' 49 | 50 | if __name__ == '__main__': 51 | app.debug=True 52 | app.run(host="0.0.0.0", port=7001) 53 | #app.run(port=7000) 54 | -------------------------------------------------------------------------------- /servers/dockers/idx_10/app.py: -------------------------------------------------------------------------------- 1 | import flask 2 | import time 3 | import logging 4 | 5 | logging.basicConfig(filename = "/data/log.txt", level = logging.DEBUG) 6 | 7 | app = flask.Flask(__name__) 8 | 9 | @app.route('/sop/') 10 | def sop_send(name): 11 | with open(f"/data/sop/{name}") as f: 12 | html = f.read() 13 | 14 | response = flask.Response(html) 15 | response.headers["X-Frame-Options"] = "SAMEORIGIN" 16 | return response 17 | 18 | @app.route('/') 19 | def send(name): 20 | # return flask.send_from_directory('.', name) 21 | logging.info(f"[LOG] {name}") 22 | r = flask.make_response(flask.send_from_directory('/data', name)) 23 | r.headers["Cache-Control"] = "no-cache, no-store, must-revalidate" 24 | r.headers["Pragma"] = "no-cache" 25 | r.headers["Expires"] = "0" 26 | r.headers['Cache-Control'] = 'public, max-age=0' 27 | r.set_cookie('userID', 'parent') 28 | return r 29 | 30 | @app.route('/svg/') 31 | def svg_send(name): 32 | with open("/data/svg/template.svg") as f: 33 | html = f.read() 34 | html = html.replace("", name.split(".")[0]) 35 | r = flask.Response(html, mimetype='image/svg+xml') 36 | return r 37 | 38 | @app.route('/svg_parent/') 39 | def svg_parent_send(name): 40 | with open("/data/svg/template.svg") as f: 41 | html = f.read() 42 | html = html.replace("", f"{name.split('.')[0]}.parentNode") 43 | r = flask.Response(html, mimetype='image/svg+xml') 44 | return r 45 | 46 | @app.route('/') 47 | def hello_world(): 48 | return 'Hello, idx_10!' 49 | 50 | if __name__ == '__main__': 51 | app.debug=True 52 | app.run(host="0.0.0.0", port=7010) 53 | #app.run(port=7000) 54 | -------------------------------------------------------------------------------- /servers/dockers/idx_2/app.py: -------------------------------------------------------------------------------- 1 | import flask 2 | import time 3 | import logging 4 | 5 | logging.basicConfig(filename = "/data/log.txt", level = logging.DEBUG) 6 | 7 | app = flask.Flask(__name__) 8 | 9 | @app.route('/sop/') 10 | def sop_send(name): 11 | with open(f"/data/sop/{name}") as f: 12 | html = f.read() 13 | 14 | response = flask.Response(html) 15 | response.headers["X-Frame-Options"] = "SAMEORIGIN" 16 | return response 17 | 18 | @app.route('/') 19 | def send(name): 20 | # return flask.send_from_directory('.', name) 21 | logging.info(f"[LOG] {name}") 22 | r = flask.make_response(flask.send_from_directory('/data', name)) 23 | r.headers["Cache-Control"] = "no-cache, no-store, must-revalidate" 24 | r.headers["Pragma"] = "no-cache" 25 | r.headers["Expires"] = "0" 26 | r.headers['Cache-Control'] = 'public, max-age=0' 27 | r.set_cookie('userID', 'parent') 28 | return r 29 | 30 | @app.route('/svg/') 31 | def svg_send(name): 32 | with open("/data/svg/template.svg") as f: 33 | html = f.read() 34 | html = html.replace("", name.split(".")[0]) 35 | r = flask.Response(html, mimetype='image/svg+xml') 36 | return r 37 | 38 | @app.route('/svg_parent/') 39 | def svg_parent_send(name): 40 | with open("/data/svg/template.svg") as f: 41 | html = f.read() 42 | html = html.replace("", f"{name.split('.')[0]}.parentNode") 43 | r = flask.Response(html, mimetype='image/svg+xml') 44 | return r 45 | 46 | @app.route('/') 47 | def hello_world(): 48 | return 'Hello, idx_2!' 49 | 50 | if __name__ == '__main__': 51 | app.debug=True 52 | app.run(host="0.0.0.0", port=7002) 53 | #app.run(port=7000) 54 | -------------------------------------------------------------------------------- /servers/dockers/idx_3/app.py: -------------------------------------------------------------------------------- 1 | import flask 2 | import time 3 | import logging 4 | 5 | logging.basicConfig(filename = "/data/log.txt", level = logging.DEBUG) 6 | 7 | app = flask.Flask(__name__) 8 | 9 | @app.route('/sop/') 10 | def sop_send(name): 11 | with open(f"/data/sop/{name}") as f: 12 | html = f.read() 13 | 14 | response = flask.Response(html) 15 | response.headers["X-Frame-Options"] = "SAMEORIGIN" 16 | return response 17 | 18 | @app.route('/') 19 | def send(name): 20 | # return flask.send_from_directory('.', name) 21 | logging.info(f"[LOG] {name}") 22 | r = flask.make_response(flask.send_from_directory('/data', name)) 23 | r.headers["Cache-Control"] = "no-cache, no-store, must-revalidate" 24 | r.headers["Pragma"] = "no-cache" 25 | r.headers["Expires"] = "0" 26 | r.headers['Cache-Control'] = 'public, max-age=0' 27 | r.set_cookie('userID', 'parent') 28 | return r 29 | 30 | @app.route('/svg/') 31 | def svg_send(name): 32 | with open("/data/svg/template.svg") as f: 33 | html = f.read() 34 | html = html.replace("", name.split(".")[0]) 35 | r = flask.Response(html, mimetype='image/svg+xml') 36 | return r 37 | 38 | @app.route('/svg_parent/') 39 | def svg_parent_send(name): 40 | with open("/data/svg/template.svg") as f: 41 | html = f.read() 42 | html = html.replace("", f"{name.split('.')[0]}.parentNode") 43 | r = flask.Response(html, mimetype='image/svg+xml') 44 | return r 45 | 46 | @app.route('/') 47 | def hello_world(): 48 | return 'Hello, idx_3!' 49 | 50 | if __name__ == '__main__': 51 | app.debug=True 52 | app.run(host="0.0.0.0", port=7003) 53 | #app.run(port=7000) 54 | -------------------------------------------------------------------------------- /servers/dockers/idx_4/app.py: -------------------------------------------------------------------------------- 1 | import flask 2 | import time 3 | import logging 4 | 5 | logging.basicConfig(filename = "/data/log.txt", level = logging.DEBUG) 6 | 7 | app = flask.Flask(__name__) 8 | 9 | @app.route('/sop/') 10 | def sop_send(name): 11 | with open(f"/data/sop/{name}") as f: 12 | html = f.read() 13 | 14 | response = flask.Response(html) 15 | response.headers["X-Frame-Options"] = "SAMEORIGIN" 16 | return response 17 | 18 | @app.route('/') 19 | def send(name): 20 | # return flask.send_from_directory('.', name) 21 | logging.info(f"[LOG] {name}") 22 | r = flask.make_response(flask.send_from_directory('/data', name)) 23 | r.headers["Cache-Control"] = "no-cache, no-store, must-revalidate" 24 | r.headers["Pragma"] = "no-cache" 25 | r.headers["Expires"] = "0" 26 | r.headers['Cache-Control'] = 'public, max-age=0' 27 | r.set_cookie('userID', 'parent') 28 | return r 29 | 30 | @app.route('/svg/') 31 | def svg_send(name): 32 | with open("/data/svg/template.svg") as f: 33 | html = f.read() 34 | html = html.replace("", name.split(".")[0]) 35 | r = flask.Response(html, mimetype='image/svg+xml') 36 | return r 37 | 38 | @app.route('/svg_parent/') 39 | def svg_parent_send(name): 40 | with open("/data/svg/template.svg") as f: 41 | html = f.read() 42 | html = html.replace("", f"{name.split('.')[0]}.parentNode") 43 | r = flask.Response(html, mimetype='image/svg+xml') 44 | return r 45 | 46 | @app.route('/') 47 | def hello_world(): 48 | return 'Hello, idx_4!' 49 | 50 | if __name__ == '__main__': 51 | app.debug=True 52 | app.run(host="0.0.0.0", port=7004) 53 | #app.run(port=7000) 54 | -------------------------------------------------------------------------------- /servers/dockers/idx_5/app.py: -------------------------------------------------------------------------------- 1 | import flask 2 | import time 3 | import logging 4 | 5 | logging.basicConfig(filename = "/data/log.txt", level = logging.DEBUG) 6 | 7 | app = flask.Flask(__name__) 8 | 9 | @app.route('/sop/') 10 | def sop_send(name): 11 | with open(f"/data/sop/{name}") as f: 12 | html = f.read() 13 | 14 | response = flask.Response(html) 15 | response.headers["X-Frame-Options"] = "SAMEORIGIN" 16 | return response 17 | 18 | @app.route('/') 19 | def send(name): 20 | # return flask.send_from_directory('.', name) 21 | logging.info(f"[LOG] {name}") 22 | r = flask.make_response(flask.send_from_directory('/data', name)) 23 | r.headers["Cache-Control"] = "no-cache, no-store, must-revalidate" 24 | r.headers["Pragma"] = "no-cache" 25 | r.headers["Expires"] = "0" 26 | r.headers['Cache-Control'] = 'public, max-age=0' 27 | r.set_cookie('userID', 'parent') 28 | return r 29 | 30 | @app.route('/svg/') 31 | def svg_send(name): 32 | with open("/data/svg/template.svg") as f: 33 | html = f.read() 34 | html = html.replace("", name.split(".")[0]) 35 | r = flask.Response(html, mimetype='image/svg+xml') 36 | return r 37 | 38 | @app.route('/svg_parent/') 39 | def svg_parent_send(name): 40 | with open("/data/svg/template.svg") as f: 41 | html = f.read() 42 | html = html.replace("", f"{name.split('.')[0]}.parentNode") 43 | r = flask.Response(html, mimetype='image/svg+xml') 44 | return r 45 | 46 | @app.route('/') 47 | def hello_world(): 48 | return 'Hello, idx_5!' 49 | 50 | if __name__ == '__main__': 51 | app.debug=True 52 | app.run(host="0.0.0.0", port=7005) 53 | #app.run(port=7000) 54 | -------------------------------------------------------------------------------- /servers/dockers/idx_6/app.py: -------------------------------------------------------------------------------- 1 | import flask 2 | import time 3 | import logging 4 | 5 | logging.basicConfig(filename = "/data/log.txt", level = logging.DEBUG) 6 | 7 | app = flask.Flask(__name__) 8 | 9 | @app.route('/sop/') 10 | def sop_send(name): 11 | with open(f"/data/sop/{name}") as f: 12 | html = f.read() 13 | 14 | response = flask.Response(html) 15 | response.headers["X-Frame-Options"] = "SAMEORIGIN" 16 | return response 17 | 18 | @app.route('/') 19 | def send(name): 20 | # return flask.send_from_directory('.', name) 21 | logging.info(f"[LOG] {name}") 22 | r = flask.make_response(flask.send_from_directory('/data', name)) 23 | r.headers["Cache-Control"] = "no-cache, no-store, must-revalidate" 24 | r.headers["Pragma"] = "no-cache" 25 | r.headers["Expires"] = "0" 26 | r.headers['Cache-Control'] = 'public, max-age=0' 27 | r.set_cookie('userID', 'parent') 28 | return r 29 | 30 | @app.route('/svg/') 31 | def svg_send(name): 32 | with open("/data/svg/template.svg") as f: 33 | html = f.read() 34 | html = html.replace("", name.split(".")[0]) 35 | r = flask.Response(html, mimetype='image/svg+xml') 36 | return r 37 | 38 | @app.route('/svg_parent/') 39 | def svg_parent_send(name): 40 | with open("/data/svg/template.svg") as f: 41 | html = f.read() 42 | html = html.replace("", f"{name.split('.')[0]}.parentNode") 43 | r = flask.Response(html, mimetype='image/svg+xml') 44 | return r 45 | 46 | @app.route('/') 47 | def hello_world(): 48 | return 'Hello, idx_6!' 49 | 50 | if __name__ == '__main__': 51 | app.debug=True 52 | app.run(host="0.0.0.0", port=7006) 53 | #app.run(port=7000) 54 | -------------------------------------------------------------------------------- /servers/dockers/idx_7/app.py: -------------------------------------------------------------------------------- 1 | import flask 2 | import time 3 | import logging 4 | 5 | logging.basicConfig(filename = "/data/log.txt", level = logging.DEBUG) 6 | 7 | app = flask.Flask(__name__) 8 | 9 | @app.route('/sop/') 10 | def sop_send(name): 11 | with open(f"/data/sop/{name}") as f: 12 | html = f.read() 13 | 14 | response = flask.Response(html) 15 | response.headers["X-Frame-Options"] = "SAMEORIGIN" 16 | return response 17 | 18 | @app.route('/') 19 | def send(name): 20 | # return flask.send_from_directory('.', name) 21 | logging.info(f"[LOG] {name}") 22 | r = flask.make_response(flask.send_from_directory('/data', name)) 23 | r.headers["Cache-Control"] = "no-cache, no-store, must-revalidate" 24 | r.headers["Pragma"] = "no-cache" 25 | r.headers["Expires"] = "0" 26 | r.headers['Cache-Control'] = 'public, max-age=0' 27 | r.set_cookie('userID', 'parent') 28 | return r 29 | 30 | @app.route('/svg/') 31 | def svg_send(name): 32 | with open("/data/svg/template.svg") as f: 33 | html = f.read() 34 | html = html.replace("", name.split(".")[0]) 35 | r = flask.Response(html, mimetype='image/svg+xml') 36 | return r 37 | 38 | @app.route('/svg_parent/') 39 | def svg_parent_send(name): 40 | with open("/data/svg/template.svg") as f: 41 | html = f.read() 42 | html = html.replace("", f"{name.split('.')[0]}.parentNode") 43 | r = flask.Response(html, mimetype='image/svg+xml') 44 | return r 45 | 46 | @app.route('/') 47 | def hello_world(): 48 | return 'Hello, idx_7!' 49 | 50 | if __name__ == '__main__': 51 | app.debug=True 52 | app.run(host="0.0.0.0", port=7007) 53 | #app.run(port=7000) 54 | -------------------------------------------------------------------------------- /servers/dockers/idx_8/app.py: -------------------------------------------------------------------------------- 1 | import flask 2 | import time 3 | import logging 4 | 5 | logging.basicConfig(filename = "/data/log.txt", level = logging.DEBUG) 6 | 7 | app = flask.Flask(__name__) 8 | 9 | @app.route('/sop/') 10 | def sop_send(name): 11 | with open(f"/data/sop/{name}") as f: 12 | html = f.read() 13 | 14 | response = flask.Response(html) 15 | response.headers["X-Frame-Options"] = "SAMEORIGIN" 16 | return response 17 | 18 | @app.route('/') 19 | def send(name): 20 | # return flask.send_from_directory('.', name) 21 | logging.info(f"[LOG] {name}") 22 | r = flask.make_response(flask.send_from_directory('/data', name)) 23 | r.headers["Cache-Control"] = "no-cache, no-store, must-revalidate" 24 | r.headers["Pragma"] = "no-cache" 25 | r.headers["Expires"] = "0" 26 | r.headers['Cache-Control'] = 'public, max-age=0' 27 | r.set_cookie('userID', 'parent') 28 | return r 29 | 30 | @app.route('/svg/') 31 | def svg_send(name): 32 | with open("/data/svg/template.svg") as f: 33 | html = f.read() 34 | html = html.replace("", name.split(".")[0]) 35 | r = flask.Response(html, mimetype='image/svg+xml') 36 | return r 37 | 38 | @app.route('/svg_parent/') 39 | def svg_parent_send(name): 40 | with open("/data/svg/template.svg") as f: 41 | html = f.read() 42 | html = html.replace("", f"{name.split('.')[0]}.parentNode") 43 | r = flask.Response(html, mimetype='image/svg+xml') 44 | return r 45 | 46 | @app.route('/') 47 | def hello_world(): 48 | return 'Hello, idx_8!' 49 | 50 | if __name__ == '__main__': 51 | app.debug=True 52 | app.run(host="0.0.0.0", port=7008) 53 | #app.run(port=7000) 54 | -------------------------------------------------------------------------------- /servers/dockers/idx_9/app.py: -------------------------------------------------------------------------------- 1 | import flask 2 | import time 3 | import logging 4 | 5 | logging.basicConfig(filename = "/data/log.txt", level = logging.DEBUG) 6 | 7 | app = flask.Flask(__name__) 8 | 9 | @app.route('/sop/') 10 | def sop_send(name): 11 | with open(f"/data/sop/{name}") as f: 12 | html = f.read() 13 | 14 | response = flask.Response(html) 15 | response.headers["X-Frame-Options"] = "SAMEORIGIN" 16 | return response 17 | 18 | @app.route('/') 19 | def send(name): 20 | # return flask.send_from_directory('.', name) 21 | logging.info(f"[LOG] {name}") 22 | r = flask.make_response(flask.send_from_directory('/data', name)) 23 | r.headers["Cache-Control"] = "no-cache, no-store, must-revalidate" 24 | r.headers["Pragma"] = "no-cache" 25 | r.headers["Expires"] = "0" 26 | r.headers['Cache-Control'] = 'public, max-age=0' 27 | r.set_cookie('userID', 'parent') 28 | return r 29 | 30 | @app.route('/svg/') 31 | def svg_send(name): 32 | with open("/data/svg/template.svg") as f: 33 | html = f.read() 34 | html = html.replace("", name.split(".")[0]) 35 | r = flask.Response(html, mimetype='image/svg+xml') 36 | return r 37 | 38 | @app.route('/svg_parent/') 39 | def svg_parent_send(name): 40 | with open("/data/svg/template.svg") as f: 41 | html = f.read() 42 | html = html.replace("", f"{name.split('.')[0]}.parentNode") 43 | r = flask.Response(html, mimetype='image/svg+xml') 44 | return r 45 | 46 | @app.route('/') 47 | def hello_world(): 48 | return 'Hello, idx_9!' 49 | 50 | if __name__ == '__main__': 51 | app.debug=True 52 | app.run(host="0.0.0.0", port=7009) 53 | #app.run(port=7000) 54 | -------------------------------------------------------------------------------- /servers/dockers/idx_0/app.py: -------------------------------------------------------------------------------- 1 | import flask 2 | import time 3 | import logging 4 | 5 | logging.basicConfig(filename = "/data/log.txt", level = logging.DEBUG) 6 | 7 | app = flask.Flask(__name__) 8 | 9 | @app.route('/sop/') 10 | def sop_send(name): 11 | with open(f"/data/sop/{name}") as f: 12 | html = f.read() 13 | 14 | response = flask.Response(html) 15 | response.headers["X-Frame-Options"] = "SAMEORIGIN" 16 | return response 17 | 18 | @app.route('/') 19 | def send(name): 20 | # return flask.send_from_directory('.', name) 21 | logging.info(f"[LOG] {name}") 22 | r = flask.make_response(flask.send_from_directory('/data', name)) 23 | r.headers["Cache-Control"] = "no-cache, no-store, must-revalidate" 24 | r.headers["Pragma"] = "no-cache" 25 | r.headers["Expires"] = "0" 26 | r.headers['Cache-Control'] = 'public, max-age=0' 27 | r.set_cookie('userID', 'parent') 28 | 29 | return r 30 | 31 | @app.route('/svg/') 32 | def svg_send(name): 33 | with open("/data/svg/template.svg") as f: 34 | html = f.read() 35 | html = html.replace("", name.split(".")[0]) 36 | r = flask.Response(html, mimetype='image/svg+xml') 37 | return r 38 | 39 | @app.route('/svg_parent/') 40 | def svg_parent_send(name): 41 | with open("/data/svg/template.svg") as f: 42 | html = f.read() 43 | html = html.replace("", f"{name.split('.')[0]}.parentNode") 44 | r = flask.Response(html, mimetype='image/svg+xml') 45 | return r 46 | 47 | @app.route('/') 48 | def hello_world(): 49 | return 'Hello, idx_0!' 50 | 51 | if __name__ == '__main__': 52 | app.debug=True 53 | app.run(host="0.0.0.0", port=7000) 54 | #app.run(port=7000) 55 | -------------------------------------------------------------------------------- /src/script/js_instruction.py: -------------------------------------------------------------------------------- 1 | from src.js_api.js_api_type import JsApiType 2 | 3 | 4 | class JsInstruction: 5 | def __init__(self, input, params, output, obj, api_type, name=None, keep=True): 6 | self.input = input 7 | self.params = params 8 | self.output = output 9 | self.obj = obj 10 | self.api_type = api_type 11 | self.name = name 12 | self.keep = keep 13 | 14 | def lift(self, guard=False, debug=False, indent=0): 15 | code = "" 16 | 17 | if self.api_type == JsApiType.assign: 18 | code += f"{self.input}" 19 | else: 20 | if self.api_type == JsApiType.operation_addition: 21 | operation = "+" 22 | elif self.api_type == JsApiType.operation_minus: 23 | operation = "-" 24 | elif self.api_type == JsApiType.operation_multiple: 25 | operation = "*" 26 | elif self.api_type == JsApiType.operation_division: 27 | operation = "/" 28 | elif self.api_type == JsApiType.operation_equal: 29 | operation = "==" 30 | elif self.api_type == JsApiType.operation_not_equal: 31 | operation = "!=" 32 | code += f"{self.input} {operation} {self.params[0]}" 33 | 34 | if self.output: 35 | code = f"{self.output} = {code}" 36 | 37 | code += ";" 38 | if guard: 39 | code = "try {" + code + "} catch(e) {" 40 | if debug: 41 | code += "console.log(e);" 42 | code += "} " 43 | 44 | code = " " * indent + code 45 | 46 | return code 47 | 48 | 49 | def main(): 50 | inst = JsInstruction("v1", [1], "v2", "Integer", JsApiType.operation_addition, None) 51 | print(inst.lift()) 52 | 53 | 54 | if __name__ == "__main__": 55 | main() -------------------------------------------------------------------------------- /tools/domato/canvas/README.md: -------------------------------------------------------------------------------- 1 | Script and grammar for fuzzing Canvas API based on CanvasRenderingContext2D specification found at https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D 2 | 3 | *** Example usage *** 4 | 5 | Running the generate_one_case.py script will yield a sample fuzzed case: 6 | 7 | ``` 8 | ctx.clearHitRegions(); 9 | /* newvar{fuzzvar00001:path2d} */ var fuzzvar00001 = new Path2D('M1 0 H -1 V 0 H 10 L 1 1'); 10 | if (!fuzzvar00001) { fuzzvar00001 = GetVariable(fuzzervars, 'path2d'); } else { SetVariable(fuzzvar00001, 'path2d'); } 11 | ctx.stroke(fuzzvar00001); 12 | console.log(ctx.isPointInPath(fuzzvar00001, 1073741824, 2147483647, "nonzero")); 13 | console.log(ctx.isPointInStroke(fuzzvar00001, -2147483648, 2147483647)); 14 | ctx.stroke(fuzzvar00001); 15 | ctx.fill(fuzzvar00001, "evenodd"); 16 | console.log(ctx.isPointInPath(fuzzvar00001, -1, 0, "nonzero")); 17 | console.log(ctx.isPointInStroke(fuzzvar00001, -1073741824, 2147483648)); 18 | console.log(ctx.isPointInStroke(fuzzvar00001, 536870912, 268435456)); 19 | console.log(ctx.isPointInStroke(fuzzvar00001, 268435456, -32769)); 20 | ctx.clip(fuzzvar00001, "nonzero"); 21 | /* newvar{fuzzvar00002:path2d} */ var fuzzvar00002 = new Path2D(fuzzvar00001); 22 | if (!fuzzvar00002) { fuzzvar00002 = GetVariable(fuzzervars, 'path2d'); } else { SetVariable(fuzzvar00002, 'path2d'); } 23 | console.log(ctx.isPointInPath(fuzzvar00002, -32769, 32768, "nonzero")); 24 | ctx.clip(fuzzvar00002, "nonzero"); 25 | console.log(ctx.isPointInPath(fuzzvar00001, -32769, 268435456, "evenodd")); 26 | ctx.clip(fuzzvar00001, "nonzero"); 27 | ctx.bezierCurveTo(-2147483648, -2147483648, 268435456, 4294967295, 2147483647, 65535); 28 | ctx.fill(fuzzvar00001, "nonzero"); 29 | ctx.fill(fuzzvar00001, "evenodd"); 30 | /* newvar{fuzzvar00003:path2d} */ var fuzzvar00003 = new Path2D(fuzzvar00002); 31 | if (!fuzzvar00003) { fuzzvar00003 = GetVariable(fuzzervars, 'path2d'); } else { SetVariable(fuzzvar00003, 'path2d'); } 32 | ``` 33 | 34 | Your mileage may vary so feel free to modify/edit template.html. 35 | 36 | 37 | -------------------------------------------------------------------------------- /src/web_api/value.json: -------------------------------------------------------------------------------- 1 | { 2 | "Boolean": ["true", "false"], 3 | "rtlltrString": ["rtl", "ltr"], 4 | "OnOffString": ["on", "off"], 5 | "ReferrerPolicyString": ["no-referrer", "no-referrer-when-downgrade", "origin", "origin-when-cross-origin", "same-origin", "strict-origin", "strict-origin-when-cross-origin", "unsafe-url"], 6 | "RelString": ["alternate", "author", "bookmark", "external", "help", "license", "next", "nofollow", "noreferrer", "noopener", "prev", "search", "tag"], 7 | "TargetString": ["_blank", "_parent", "_self", "_top"], 8 | "CoordsString": ["10, 10, 10", "20, 20, 20, 20"], 9 | "ShapeString": ["rect", "circle", "poly", "default"], 10 | "MethodString": ["get", "post", "dialog"], 11 | "HTTPMethodString": ["GET", "POST", "PUT", "DELETE"], 12 | "TypeString": ["submit", "reset", "button", "menu"], 13 | "AlignString": ["left", "right", "justify", "center"], 14 | "vAlignString": ["top", "middle", "bottom", "baseline"], 15 | "FeaturePolicyString": ["allowsFeature", "features", "allowedFeatures", "getAllowlistForFeature"], 16 | "SandboxString": ["allow-forms", "allow-pointer-lock", "allow-popups", "allow-same-origin", "allow-scripts", "allow-top-navigation"], 17 | "RefString": ["sync", "async", "auto"], 18 | "EagerLazyString": ["eager", "lazy"], 19 | "InputtypeString": ["button", "checkbox", "color", "date", "datetime-local", "email", "file", "hidden", "image", "month", "number", "password", "radio", "range", "reset", "search", "submit", "tel", "text", "time", "url", "week", "datetime"], 20 | "PreloadString": ["none", "metadata", "auto"], 21 | "DateTimeString": ["0062-02-05", "1993-11-01", "2021-07-01", "2162-02-05"], 22 | "ValueTypeString": ["data", "ref", "object"], 23 | "SelectionDirectionString": ["forward", "backward", "none"], 24 | "KindString": ["subtitles", "captions", "descriptions", "chapters", "metadata"], 25 | "PositionString": ["beforebegin", "afterbegin", "beforeend", "afterend"], 26 | "ReadyStateString": ["loading", "interactive", "complete"] 27 | 28 | 29 | 30 | 31 | 32 | } -------------------------------------------------------------------------------- /tools/domato/jscript/template.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 105 | 106 | 107 | -------------------------------------------------------------------------------- /src/script/web_instruction.py: -------------------------------------------------------------------------------- 1 | from src.web_api.web_object import WebObject 2 | from src.web_api.web_api_type import WebApiType 3 | 4 | class WebInstruction: 5 | def __init__(self, input, params, output, obj, api_type, name, keep=True): 6 | self.input = input 7 | self.params = params 8 | self.output = output 9 | self.obj = obj 10 | self.api_type = api_type 11 | self.name = name 12 | self.keep = keep 13 | 14 | def lift(self, guard=False, debug=False, indent=0): 15 | code = "" 16 | 17 | if self.input and self.obj != "Function" and self.obj != "Built-in": 18 | code += f"{self.input}." 19 | 20 | if self.api_type == WebApiType.call_method or self.api_type == WebApiType.construct: 21 | if self.name == "item": 22 | code = code[:-1] + f"[{', '.join(map(str, self.params))}]" 23 | else: 24 | code += f"{self.name}" 25 | code += f"({', '.join(map(str, self.params))})" 26 | 27 | else: 28 | code += f"{self.name}" 29 | 30 | if self.api_type == WebApiType.construct: 31 | code = "new " + code 32 | 33 | if self.output: 34 | if self.api_type == WebApiType.read_property or \ 35 | self.api_type == WebApiType.call_method or \ 36 | self.api_type == WebApiType.construct: 37 | code = f"{self.output} = {code}" 38 | if self.api_type == WebApiType.write_property: 39 | code = f"{code} = {self.output}" 40 | 41 | code += ";" 42 | if guard: 43 | code = "try {" + code + "} catch(e) {" 44 | if debug: 45 | code += "console.log(e);" 46 | code += "} " 47 | 48 | code = " " * indent + code 49 | 50 | return code 51 | 52 | def get_input_object(self): 53 | return WebObject.create(self.obj) 54 | 55 | def get_output_object(self): 56 | instance = WebObject.create(self.obj) 57 | if instance is not None: 58 | if self.api_type == WebApiType.call_method: 59 | return instance.get_method_return(self.name) 60 | elif self.api_type == WebApiType.construct: 61 | return instance.get_constructor_return(self.name) 62 | else: 63 | return instance.get_property_return(self.name) 64 | 65 | 66 | def main(): 67 | inst = WebInstruction("v1", [], "v2", "Node", WebApiType.read_property, "baseURI") 68 | print(inst.lift()) 69 | 70 | 71 | if __name__ == "__main__": 72 | main() -------------------------------------------------------------------------------- /src/script/web_page.py: -------------------------------------------------------------------------------- 1 | import secrets 2 | 3 | class WebPage: 4 | def __init__(self, html=None, event_handlers=[], body_script=[], 5 | foo_bar=None): 6 | self.html = html 7 | self.event_handlers = event_handlers 8 | self.body_script = body_script 9 | 10 | self.handler = False 11 | if len(self.event_handlers) > 0: 12 | self.handler = True 13 | self.event_handler1 = event_handlers[0] 14 | self.event_handler2 = event_handlers[1] 15 | 16 | 17 | self.loader = False 18 | 19 | if len(self.event_handlers) > 2: 20 | self.loader = True 21 | self.load_handler1 = event_handlers[2] 22 | self.load_handler2 = event_handlers[3] 23 | self.load_handler3 = event_handlers[4] 24 | self.load_handler4 = event_handlers[5] 25 | 26 | self.foo_bar = foo_bar 27 | 28 | def to_string(self, skip=False, debug=False): 29 | code = self.html 30 | if skip: 31 | return code 32 | 33 | head_script = \ 34 | "\n" 55 | code = code.replace('', head_script) 56 | 57 | if "" in code: 58 | code = code.replace('', self.foo_bar) 59 | 60 | for script in self.body_script: 61 | lift = \ 62 | "\n" 69 | 70 | code = code.replace('', lift, 1) 71 | return code -------------------------------------------------------------------------------- /src/web_api/value_manager.py: -------------------------------------------------------------------------------- 1 | import json 2 | import random 3 | import string 4 | 5 | class ValueManager: 6 | __grammar = None 7 | 8 | @classmethod 9 | def init(cls): 10 | if cls.__grammar is None: 11 | with open("src/web_api/value.json") as f: 12 | cls.__grammar = json.load(f) 13 | 14 | @classmethod 15 | def bind(cls, name): 16 | cls.init() 17 | if name in cls.__grammar: 18 | try: 19 | arr = cls.__grammar[name] 20 | if arr: 21 | return arr 22 | else: 23 | return [] 24 | except KeyError as e: 25 | return [] 26 | 27 | @classmethod 28 | def random_bind(cls, name): 29 | cls.init() 30 | if name in cls.__grammar: 31 | try: 32 | arr = cls.__grammar[name] 33 | if arr: 34 | value = random.choice(arr) 35 | if name.endswith("String"): 36 | value = f"'{value}'" 37 | return value 38 | else: 39 | return "null" 40 | except KeyError as e: 41 | return "null" 42 | elif name == "Integer": 43 | return str(random.randrange(100)) 44 | elif name == "Double": 45 | return str(random.random() * 100) 46 | elif name == "String": 47 | N = random.randrange(10) + 1 48 | value = ''.join(random.choices(string.ascii_letters + string.digits, k=N)) 49 | return f"'{value}'" 50 | elif name == "DOMString": 51 | N = random.randrange(10) + 1 52 | value = ''.join(random.choices(string.ascii_letters + string.digits, k=N)) 53 | return f"'{value}'" 54 | elif name == "URI": 55 | value = "http://127.0.0.1" 56 | return f"'{value}'" 57 | elif name == "DomainString": 58 | value = "127.0.0.1" 59 | return f"'{value}'" 60 | # elif name == "Markup": 61 | # value = " 7 | 8 | 11 | 71 | 72 | 73 | 74 | 75 | 76 | -------------------------------------------------------------------------------- /tools/domato/php/template.php: -------------------------------------------------------------------------------- 1 | new stdClass(), 21 | "Exception" => new Exception(), 22 | "ErrorException" => new ErrorException(), 23 | "Error" => new Error(), 24 | "CompileError" => new CompileError(), 25 | "ParseError" => new ParseError(), 26 | "TypeError" => new TypeError(), 27 | "ArgumentCountError" => new ArgumentCountError(), 28 | "ArithmeticError" => new ArithmeticError(), 29 | "DivisionByZeroError" => new DivisionByZeroError(), 30 | "ClosedGeneratorException" => new ClosedGeneratorException(), 31 | "DateTime" => new DateTime(), 32 | "DateTimeImmutable" => new DateTimeImmutable(), 33 | "DateTimeZone" => new DateTimeZone("America/Chicago"), 34 | "DateInterval" => new DateInterval("P2Y4DT6H8M"), 35 | "DatePeriod" => new DatePeriod("R4/2012-07-01T00:00:00Z/P7D"), 36 | "LibXMLError" => new LibXMLError(), 37 | "DOMException" => new DOMException(), 38 | "DOMStringList" => new DOMStringList(), 39 | "DOMNameList" => new DOMNameList(), 40 | "DOMImplementationList" => new DOMImplementationList(), 41 | "DOMImplementationSource" => new DOMImplementationSource(), 42 | "DOMImplementation" => new DOMImplementation(), 43 | "DOMNode" => new DOMNode(), 44 | "DOMNameSpaceNode" => new DOMNameSpaceNode(), 45 | "DOMDocumentFragment" => new DOMDocumentFragment(), 46 | "DOMDocument" => new DOMDocument(), 47 | "DOMNodeList" => new DOMNodeList(), 48 | "DOMNamedNodeMap" => new DOMNamedNodeMap(), 49 | "DOMCharacterData" => new DOMCharacterData(), 50 | "DOMAttr" => new DOMAttr("artr"), 51 | "DOMElement" => new DOMElement("root"), 52 | "DOMText" => new DOMText(), 53 | "DOMComment" => new DOMComment(), 54 | "DOMTypeinfo" => new DOMTypeinfo(), 55 | "DOMUserDataHandler" => new DOMUserDataHandler(), 56 | "DOMDomError" => new DOMDomError(), 57 | "DOMErrorHandler" => new DOMErrorHandler(), 58 | "DOMLocator" => new DOMLocator(), 59 | "DOMConfiguration" => new DOMConfiguration(), 60 | "DOMCdataSection" => new DOMCdataSection("root value"), 61 | "DOMDocumentType" => new DOMDocumentType(), 62 | "DOMNotation" => new DOMNotation(), 63 | "DOMEntity" => new DOMEntity(), 64 | "DOMEntityReference" => new DOMEntityReference("nbsp"), 65 | "DOMProcessingInstruction" => new DOMProcessingInstruction("php"), 66 | "DOMStringExtend" => new DOMStringExtend(), 67 | "DOMXPath" => new DOMXPath(new DOMDocument()), 68 | "finfo" => new finfo(), 69 | "JsonException" => new JsonException(), 70 | "LogicException" => new LogicException(), 71 | "BadFunctionCallException" => new BadFunctionCallException(), 72 | "BadMethodCallException" => new BadMethodCallException(), 73 | "DomainException" => new DomainException(), 74 | "InvalidArgumentException" => new InvalidArgumentException(), 75 | "LengthException" => new LengthException(), 76 | "OutOfRangeException" => new OutOfRangeException(), 77 | "RuntimeException" => new RuntimeException(), 78 | "OutOfBoundsException" => new OutOfBoundsException(), 79 | "OverflowException" => new OverflowException(), 80 | "RangeException" => new RangeException(), 81 | "UnderflowException" => new UnderflowException(), 82 | "UnexpectedValueException" => new UnexpectedValueException(), 83 | "SplFileObject" => new SplFileObject(__FILE__), 84 | "SplTempFileObject" => new SplTempFileObject(), 85 | "SplDoublyLinkedList" => new SplDoublyLinkedList(), 86 | "SplQueue" => new SplQueue(), 87 | "SplStack" => new SplStack(), 88 | "SplMinHeap" => new SplMinHeap(), 89 | "SplMaxHeap" => new SplMaxHeap(), 90 | "SplPriorityQueue" => new SplPriorityQueue(), 91 | "SplFixedArray" => new SplFixedArray(), 92 | "SplObjectStorage" => new SplObjectStorage(), 93 | "MultipleIterator" => new MultipleIterator(), 94 | "SessionHandler" => new SessionHandler(), 95 | "ReflectionException" => new ReflectionException(), 96 | "Reflection" => new Reflection(), 97 | "ReflectionFunction" => new ReflectionFunction("templateFunction"), 98 | "ReflectionGenerator" => new ReflectionGenerator(templateGenerator()), 99 | "ReflectionParameter" => new ReflectionParameter("templateFunction", "templateParameter"), 100 | "ReflectionType" => (new ReflectionClass("ZipArchive"))->getMethod("getCommentName")->getReturnType(), 101 | "ReflectionNamedType" => new ReflectionNamedType(), 102 | "ReflectionMethod" => new ReflectionMethod("TemplateClass", "templateMethod"), 103 | "ReflectionClass" => new ReflectionClass("TemplateClass"), 104 | "ReflectionObject" => new ReflectionObject(new TemplateClass()), 105 | "ReflectionProperty" => new ReflectionProperty("TemplateClass", "templateProperty"), 106 | "ReflectionClassConstant" => new ReflectionClassConstant("TemplateClass", "TEMPLATE_CONSTANT"), 107 | "ReflectionExtension" => new ReflectionExtension("Reflection"), 108 | "__PHP_Incomplete_Class" => new __PHP_Incomplete_Class(), 109 | "php_user_filter" => new php_user_filter(), 110 | "Directory" => new Directory(), 111 | "AssertionError" => new AssertionError(), 112 | "SimpleXMLElement" => new SimpleXMLElement("a"), 113 | "SimpleXMLIterator" => new SimpleXMLIterator("a"), 114 | "PharException" => new PharException(), 115 | "Phar" => new Phar("/tmp/fuzz.phar"), 116 | "PharData" => new PharData("/tmp/fuzz.tar"), 117 | "PharFileInfo" => new PharFileInfo("phar:///tmp/fuzz.phar/fuzz.txt"), 118 | "XMLReader" => new XMLReader(), 119 | "XMLWriter" => new XMLWriter(), 120 | "CURLFile" => new CURLFile("/tmp/fuzz"), 121 | "ZipArchive" => new ZipArchive(), 122 | 123 | /* - Instantiation not allowed - 124 | "ReflectionZendExtension" => new ReflectionZendExtension(), 125 | "ReflectionFunctionAbstract" => new ReflectionFunctionAbstract(), 126 | "PDOException" => new PDOException(), 127 | "PDO" => new PDO(), 128 | "PDOStatement" => new PDOStatement(), 129 | "SplHeap" => new SplHeap(), 130 | "PDORow" => new PDORow(), 131 | "RecursiveIteratorIterator" => new RecursiveIteratorIterator(), 132 | "IteratorIterator" => new IteratorIterator(), 133 | "FilterIterator" => new FilterIterator(), 134 | "RecursiveFilterIterator" => new RecursiveFilterIterator(), 135 | "CallbackFilterIterator" => new CallbackFilterIterator(), 136 | "RecursiveCallbackFilterIterator" => new RecursiveCallbackFilterIterator(), 137 | "ParentIterator" => new ParentIterator(), 138 | "LimitIterator" => new LimitIterator(), 139 | "CachingIterator" => new CachingIterator(), 140 | "RecursiveCachingIterator" => new RecursiveCachingIterator(), 141 | "NoRewindIterator" => new NoRewindIterator(), 142 | "AppendIterator" => new AppendIterator(), 143 | "InfiniteIterator" => new InfiniteIterator(), 144 | "RegexIterator" => new RegexIterator(), 145 | "RecursiveRegexIterator" => new RecursiveRegexIterator(), 146 | "EmptyIterator" => new EmptyIterator(), 147 | "RecursiveTreeIterator" => new RecursiveTreeIterator(), 148 | "ArrayObject" => new ArrayObject(), 149 | "ArrayIterator" => new ArrayIterator(), 150 | "RecursiveArrayIterator" => new RecursiveArrayIterator(), 151 | "SplFileInfo" => new SplFileInfo(), 152 | "DirectoryIterator" => new DirectoryIterator(), 153 | "FilesystemIterator" => new FilesystemIterator(), 154 | "RecursiveDirectoryIterator" => new RecursiveDirectoryIterator(), 155 | "GlobIterator" => new GlobIterator(), 156 | "HashContext" => new HashContext(), 157 | "Closure" => new Closure(), 158 | "Generator" => new Generator(), 159 | */ 160 | ); 161 | 162 | // TODO randomize those as well 163 | $ref_bool = true; 164 | $ref_int = 1337; 165 | $ref_string= "bla"; 166 | $ref_array = array(1.0, 2, -3e3); 167 | $ref_object = new StdClass(); 168 | $ref_resource = fopen("/dev/null", "r"); 169 | $ref_path = "/dev/null"; 170 | 171 | 172 | 173 | ?> 174 | -------------------------------------------------------------------------------- /tools/domato/mathml/mathattrvalues.txt: -------------------------------------------------------------------------------- 1 | # Copyright 2017 Google Inc. All Rights Reserved. 2 | # Licensed under the Apache License, Version 2.0 (the "License"); 3 | # you may not use this file except in compliance with the License. 4 | # You may obtain a copy of the License at 5 | # 6 | # http://www.apache.org/licenses/LICENSE-2.0 7 | # 8 | # Unless required by applicable law or agreed to in writing, software 9 | # distributed under the License is distributed on an "AS IS" BASIS, 10 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | # See the License for the specific language governing permissions and 12 | # limitations under the License. 13 | 14 | = 15 | = 16 | 17 | 18 | = 19 | = x 20 | = 21 | = 22 | = 23 | = ltr 24 | = rtl 25 | = toggle 26 | = statusline 27 | = tooltip 28 | = input 29 | = none 30 | = block 31 | = inline 32 | = inherit 33 | 34 | = linebreak 35 | = scroll 36 | = elide 37 | = truncate 38 | = scale 39 | 40 | = x 41 | = true 42 | = false 43 | = before 44 | = after 45 | = duplicate 46 | = 47 | = 48 | = 15 49 | = +15 50 | = -5 51 | = -1 52 | = 53 | = 54 | = % 55 | = 56 | = 57 | = % 58 | = longdiv 59 | = actuarial 60 | = radical 61 | = box 62 | = roundedbox 63 | = circle 64 | = left 65 | = right 66 | = top 67 | = bottom 68 | = updiagonalstrike 69 | = downdiagonalstrike 70 | = verticalstrike 71 | = horizontalstrike 72 | = madruwb 73 | = updiagonalnarrow 74 | = phasorangle 75 | 76 | = > 77 | = ) 78 | = ] 79 | = } 80 | = < 81 | = ( 82 | = [ 83 | = { 84 | = , 85 | = . 86 | = ; 87 | = ;;, 88 | = : 89 | = ||||, 90 | 91 | 92 | = true 93 | = false 94 | 95 | = left 96 | = right 97 | = center 98 | 99 | 100 | = 101 | = 102 | = thin 103 | = medium 104 | = thick 105 | = left 106 | = right 107 | = center 108 | = http://localhost/image.png 109 | = middle 110 | = bottom 111 | = baseline 112 | = 113 | = 114 | = % 115 | = px 116 | = inherit 117 | = 118 | = 119 | = % 120 | = px 121 | = small 122 | = normal 123 | = big 124 | = normal 125 | = bold 126 | = italic 127 | = bold-italic 128 | = double-struck 129 | = bold-fraktur 130 | = sans-serif 131 | = axis 132 | = baseline 133 | = bottom 134 | = center 135 | = top 136 | = 137 | = 138 | = % 139 | = px 140 | = infinity 141 | = 142 | = 143 | = true 144 | = false 145 | = 146 | = 147 | = % 148 | = px 149 | = true 150 | = false 151 | = true 152 | = false 153 | = true 154 | = false 155 | = left 156 | = center 157 | = right 158 | = 159 | = 160 | = % 161 | = px 162 | = 163 | = 164 | = px 165 | = % 166 | = 167 | = % 168 | = px 169 | = 170 | = 171 | = px 172 | = % 173 | = 174 | = " 175 | = " 176 | = ' 177 | = " 178 | = " 179 | = ' 180 | = auto 181 | = newline 182 | = nobreak 183 | = goodbreak 184 | = badbreak 185 | = 186 | = px 187 | = % 188 | = 189 | = 190 | = 191 | = 192 | = % 193 | = px 194 | = 195 | = 196 | = px 197 | = % 198 | = 199 | = true 200 | = false 201 | = true 202 | = false 203 | = none 204 | = solid 205 | = dashed 206 | = 207 | = % 208 | = px 209 | = 210 | = 211 | = px 212 | = % 213 | = 214 | = none 215 | = solid 216 | = dashed 217 | = 218 | = % 219 | = px 220 | = 221 | = left 222 | = leftoverlap 223 | = right 224 | = rightoverlap 225 | = 226 | = px 227 | = % 228 | = 229 | = left 230 | = center 231 | = right 232 | = left 233 | = center 234 | = right 235 | = true 236 | = false 237 | = none 238 | = MathML-Presentation 239 | = Mathematica 240 | = Maple 241 | = TeX 242 | = ASCII 243 | = MathMLType 244 | = OpenMath 245 | = content-MathML 246 | = x 247 | = 248 | = % 249 | = px 250 | = infinity 251 | = altvalue 252 | -------------------------------------------------------------------------------- /tools/domato/LICENSE: -------------------------------------------------------------------------------- 1 | 2 | Apache License 3 | Version 2.0, January 2004 4 | http://www.apache.org/licenses/ 5 | 6 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 7 | 8 | 1. Definitions. 9 | 10 | "License" shall mean the terms and conditions for use, reproduction, 11 | and distribution as defined by Sections 1 through 9 of this document. 12 | 13 | "Licensor" shall mean the copyright owner or entity authorized by 14 | the copyright owner that is granting the License. 15 | 16 | "Legal Entity" shall mean the union of the acting entity and all 17 | other entities that control, are controlled by, or are under common 18 | control with that entity. For the purposes of this definition, 19 | "control" means (i) the power, direct or indirect, to cause the 20 | direction or management of such entity, whether by contract or 21 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 22 | outstanding shares, or (iii) beneficial ownership of such entity. 23 | 24 | "You" (or "Your") shall mean an individual or Legal Entity 25 | exercising permissions granted by this License. 26 | 27 | "Source" form shall mean the preferred form for making modifications, 28 | including but not limited to software source code, documentation 29 | source, and configuration files. 30 | 31 | "Object" form shall mean any form resulting from mechanical 32 | transformation or translation of a Source form, including but 33 | not limited to compiled object code, generated documentation, 34 | and conversions to other media types. 35 | 36 | "Work" shall mean the work of authorship, whether in Source or 37 | Object form, made available under the License, as indicated by a 38 | copyright notice that is included in or attached to the work 39 | (an example is provided in the Appendix below). 40 | 41 | "Derivative Works" shall mean any work, whether in Source or Object 42 | form, that is based on (or derived from) the Work and for which the 43 | editorial revisions, annotations, elaborations, or other modifications 44 | represent, as a whole, an original work of authorship. For the purposes 45 | of this License, Derivative Works shall not include works that remain 46 | separable from, or merely link (or bind by name) to the interfaces of, 47 | the Work and Derivative Works thereof. 48 | 49 | "Contribution" shall mean any work of authorship, including 50 | the original version of the Work and any modifications or additions 51 | to that Work or Derivative Works thereof, that is intentionally 52 | submitted to Licensor for inclusion in the Work by the copyright owner 53 | or by an individual or Legal Entity authorized to submit on behalf of 54 | the copyright owner. For the purposes of this definition, "submitted" 55 | means any form of electronic, verbal, or written communication sent 56 | to the Licensor or its representatives, including but not limited to 57 | communication on electronic mailing lists, source code control systems, 58 | and issue tracking systems that are managed by, or on behalf of, the 59 | Licensor for the purpose of discussing and improving the Work, but 60 | excluding communication that is conspicuously marked or otherwise 61 | designated in writing by the copyright owner as "Not a Contribution." 62 | 63 | "Contributor" shall mean Licensor and any individual or Legal Entity 64 | on behalf of whom a Contribution has been received by Licensor and 65 | subsequently incorporated within the Work. 66 | 67 | 2. Grant of Copyright License. Subject to the terms and conditions of 68 | this License, each Contributor hereby grants to You a perpetual, 69 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 70 | copyright license to reproduce, prepare Derivative Works of, 71 | publicly display, publicly perform, sublicense, and distribute the 72 | Work and such Derivative Works in Source or Object form. 73 | 74 | 3. Grant of Patent License. Subject to the terms and conditions of 75 | this License, each Contributor hereby grants to You a perpetual, 76 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 77 | (except as stated in this section) patent license to make, have made, 78 | use, offer to sell, sell, import, and otherwise transfer the Work, 79 | where such license applies only to those patent claims licensable 80 | by such Contributor that are necessarily infringed by their 81 | Contribution(s) alone or by combination of their Contribution(s) 82 | with the Work to which such Contribution(s) was submitted. If You 83 | institute patent litigation against any entity (including a 84 | cross-claim or counterclaim in a lawsuit) alleging that the Work 85 | or a Contribution incorporated within the Work constitutes direct 86 | or contributory patent infringement, then any patent licenses 87 | granted to You under this License for that Work shall terminate 88 | as of the date such litigation is filed. 89 | 90 | 4. Redistribution. You may reproduce and distribute copies of the 91 | Work or Derivative Works thereof in any medium, with or without 92 | modifications, and in Source or Object form, provided that You 93 | meet the following conditions: 94 | 95 | (a) You must give any other recipients of the Work or 96 | Derivative Works a copy of this License; and 97 | 98 | (b) You must cause any modified files to carry prominent notices 99 | stating that You changed the files; and 100 | 101 | (c) You must retain, in the Source form of any Derivative Works 102 | that You distribute, all copyright, patent, trademark, and 103 | attribution notices from the Source form of the Work, 104 | excluding those notices that do not pertain to any part of 105 | the Derivative Works; and 106 | 107 | (d) If the Work includes a "NOTICE" text file as part of its 108 | distribution, then any Derivative Works that You distribute must 109 | include a readable copy of the attribution notices contained 110 | within such NOTICE file, excluding those notices that do not 111 | pertain to any part of the Derivative Works, in at least one 112 | of the following places: within a NOTICE text file distributed 113 | as part of the Derivative Works; within the Source form or 114 | documentation, if provided along with the Derivative Works; or, 115 | within a display generated by the Derivative Works, if and 116 | wherever such third-party notices normally appear. The contents 117 | of the NOTICE file are for informational purposes only and 118 | do not modify the License. You may add Your own attribution 119 | notices within Derivative Works that You distribute, alongside 120 | or as an addendum to the NOTICE text from the Work, provided 121 | that such additional attribution notices cannot be construed 122 | as modifying the License. 123 | 124 | You may add Your own copyright statement to Your modifications and 125 | may provide additional or different license terms and conditions 126 | for use, reproduction, or distribution of Your modifications, or 127 | for any such Derivative Works as a whole, provided Your use, 128 | reproduction, and distribution of the Work otherwise complies with 129 | the conditions stated in this License. 130 | 131 | 5. Submission of Contributions. Unless You explicitly state otherwise, 132 | any Contribution intentionally submitted for inclusion in the Work 133 | by You to the Licensor shall be under the terms and conditions of 134 | this License, without any additional terms or conditions. 135 | Notwithstanding the above, nothing herein shall supersede or modify 136 | the terms of any separate license agreement you may have executed 137 | with Licensor regarding such Contributions. 138 | 139 | 6. Trademarks. This License does not grant permission to use the trade 140 | names, trademarks, service marks, or product names of the Licensor, 141 | except as required for reasonable and customary use in describing the 142 | origin of the Work and reproducing the content of the NOTICE file. 143 | 144 | 7. Disclaimer of Warranty. Unless required by applicable law or 145 | agreed to in writing, Licensor provides the Work (and each 146 | Contributor provides its Contributions) on an "AS IS" BASIS, 147 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 148 | implied, including, without limitation, any warranties or conditions 149 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 150 | PARTICULAR PURPOSE. You are solely responsible for determining the 151 | appropriateness of using or redistributing the Work and assume any 152 | risks associated with Your exercise of permissions under this License. 153 | 154 | 8. Limitation of Liability. In no event and under no legal theory, 155 | whether in tort (including negligence), contract, or otherwise, 156 | unless required by applicable law (such as deliberate and grossly 157 | negligent acts) or agreed to in writing, shall any Contributor be 158 | liable to You for damages, including any direct, indirect, special, 159 | incidental, or consequential damages of any character arising as a 160 | result of this License or out of the use or inability to use the 161 | Work (including but not limited to damages for loss of goodwill, 162 | work stoppage, computer failure or malfunction, or any and all 163 | other commercial damages or losses), even if such Contributor 164 | has been advised of the possibility of such damages. 165 | 166 | 9. Accepting Warranty or Additional Liability. While redistributing 167 | the Work or Derivative Works thereof, You may choose to offer, 168 | and charge a fee for, acceptance of support, warranty, indemnity, 169 | or other liability obligations and/or rights consistent with this 170 | License. However, in accepting such obligations, You may act only 171 | on Your own behalf and on Your sole responsibility, not on behalf 172 | of any other Contributor, and only if You agree to indemnify, 173 | defend, and hold each Contributor harmless for any liability 174 | incurred by, or claims asserted against, such Contributor by reason 175 | of your accepting any such warranty or additional liability. 176 | 177 | END OF TERMS AND CONDITIONS 178 | 179 | APPENDIX: How to apply the Apache License to your work. 180 | 181 | To apply the Apache License to your work, attach the following 182 | boilerplate notice, with the fields enclosed by brackets "[]" 183 | replaced with your own identifying information. (Don't include 184 | the brackets!) The text should be enclosed in the appropriate 185 | comment syntax for the file format. We also recommend that a 186 | file or class name and description of purpose be included on the 187 | same "printed page" as the copyright notice for easier 188 | identification within third-party archives. 189 | 190 | Copyright 2017 Google Inc. 191 | 192 | Licensed under the Apache License, Version 2.0 (the "License"); 193 | you may not use this file except in compliance with the License. 194 | You may obtain a copy of the License at 195 | 196 | http://www.apache.org/licenses/LICENSE-2.0 197 | 198 | Unless required by applicable law or agreed to in writing, software 199 | distributed under the License is distributed on an "AS IS" BASIS, 200 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 201 | See the License for the specific language governing permissions and 202 | limitations under the License. 203 | -------------------------------------------------------------------------------- /tools/domato/common.txt: -------------------------------------------------------------------------------- 1 | # Copyright 2017 Google Inc. All Rights Reserved. 2 | # Licensed under the Apache License, Version 2.0 (the "License"); 3 | # you may not use this file except in compliance with the License. 4 | # You may obtain a copy of the License at 5 | # 6 | # http://www.apache.org/licenses/LICENSE-2.0 7 | # 8 | # Unless required by applicable law or agreed to in writing, software 9 | # distributed under the License is distributed on an "AS IS" BASIS, 10 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | # See the License for the specific language governing permissions and 12 | # limitations under the License. 13 | 14 | 15 | = 16 | 17 | = 32768 18 | = 65535 19 | = 65536 20 | = 1073741824 21 | = 536870912 22 | = 268435456 23 | = 4294967295 24 | = 2147483648 25 | = 2147483647 26 | = -2147483648 27 | = -1073741824 28 | = -32769 29 | 30 | = 0 31 | = 0 32 | = 0 33 | = 1 34 | = 1 35 | = -1 36 | = 37 | = 38 | = 39 | 40 | = true 41 | = false 42 | 43 | = 44 | 45 | = htmlvar0000 46 | = svgvar0000 47 | = class 48 | 49 | = red 50 | = green 51 | = white 52 | = black 53 | = # 54 | = rgb(,,) 55 | 56 | = a 57 | = abbr 58 | = acronym 59 | = address 60 | = applet 61 | = area 62 | = article 63 | = aside 64 | = audio 65 | = b 66 | = base 67 | = basefont 68 | = bdi 69 | = bdo 70 | = bgsound 71 | = big 72 | = blink 73 | = blockquote 74 | = body 75 | = br 76 | = button 77 | = canvas 78 | = caption 79 | = center 80 | = cite 81 | = code 82 | = col 83 | = colgroup 84 | = command 85 | = content 86 | = data 87 | = datalist 88 | = dd 89 | = del 90 | = details 91 | = dfn 92 | = dialog 93 | = dir 94 | = div 95 | = dl 96 | = dt 97 | = element 98 | = em 99 | = embed 100 | = fieldset 101 | = figcaption 102 | = figure 103 | = font 104 | = footer 105 | = form 106 | = frame 107 | = frameset 108 | = h1 109 | = h2 110 | = h3 111 | = h4 112 | = h5 113 | = h6 114 | = head 115 | = header 116 | = hgroup 117 | = hr 118 | = html 119 | = i 120 | = iframe 121 | = image 122 | = img 123 | = input 124 | = ins 125 | = isindex 126 | = kbd 127 | = keygen 128 | = label 129 | = layer 130 | = legend 131 | = li 132 | = link 133 | = listing 134 | = main 135 | = map 136 | = mark 137 | = marquee 138 | = menu 139 | = menuitem 140 | = meta 141 | = meter 142 | = multicol 143 | = nav 144 | = nobr 145 | = noembed 146 | = noframes 147 | = nolayer 148 | = noscript 149 | = object 150 | = ol 151 | = optgroup 152 | = option 153 | = output 154 | = p 155 | = param 156 | = picture 157 | = plaintext 158 | = pre 159 | = progress 160 | = q 161 | = rp 162 | = rt 163 | = rtc 164 | = ruby 165 | = s 166 | = samp 167 | = script 168 | = section 169 | = select 170 | = shadow 171 | = small 172 | = source 173 | = spacer 174 | = span 175 | = strike 176 | = strong 177 | = style 178 | = sub 179 | = summary 180 | = sup 181 | = table 182 | = tbody 183 | = td 184 | = template 185 | = textarea 186 | = tfoot 187 | = th 188 | = thead 189 | = time 190 | = title 191 | = tr 192 | = track 193 | = tt 194 | = u 195 | = ul 196 | = var 197 | = video 198 | = wbr 199 | = xmp 200 | 201 | = a 202 | = altGlyph 203 | = altGlyphDef 204 | = altGlyphItem 205 | = animate 206 | = animateColor 207 | = animateMotion 208 | = animateTransform 209 | = circle 210 | = clipPath 211 | = cursor 212 | = defs 213 | = desc 214 | = ellipse 215 | = feBlend 216 | = feColorMatrix 217 | = feComponentTransfer 218 | = feComposite 219 | = feConvolveMatrix 220 | = feDiffuseLighting 221 | = feDisplacementMap 222 | = feDistantLight 223 | = feDropShadow 224 | = feFlood 225 | = feFuncA 226 | = feFuncB 227 | = feFuncG 228 | = feFuncR 229 | = feGaussianBlur 230 | = feImage 231 | = feMerge 232 | = feMergeNode 233 | = feMorphology 234 | = feOffset 235 | = fePointLight 236 | = feSpecularLighting 237 | = feSpotLight 238 | = feTile 239 | = feTurbulence 240 | = filter 241 | = font 242 | = font_face 243 | = font_face_format 244 | = font_face_name 245 | = font_face_src 246 | = font_face_uri 247 | = foreignObject 248 | = g 249 | = glyph 250 | = glyphRef 251 | = hkern 252 | = image 253 | = line 254 | = linearGradient 255 | = marker 256 | = mask 257 | = metadata 258 | = missing_glyph 259 | = mpath 260 | = path 261 | = pattern 262 | = polygon 263 | = polyline 264 | = radialGradient 265 | = rect 266 | = script 267 | = set 268 | = stop 269 | = style 270 | = svg 271 | = switch 272 | = symbol 273 | = text 274 | = textPath 275 | = title 276 | = tref 277 | = tspan 278 | = use 279 | = view 280 | = vkern 281 | 282 | = x 283 | = data:image/gif;base64,R0lGODlhIAAgAPIBAGbMzP///wAAADOZZpn/zAAAAAAAAAAAACH5BAAAAAAALAAAAAAgACAAAAOLGLrc/k7ISau9S5DNu/8fICgaYJ5oqqbDGJRrLAMtScw468J5Xr+3nm8XFM5+PGMMWYwxcMyZ40iULQaDhSzqDGBNisGyuhUDrmNb72pWcaXhtpsM/27pVi8UX96rcQpDf3V+QD12d4NKK2+Lc4qOKI2RJ5OUNHyXSDRYnZ6foKAuLxelphMQqaoPCQA7 284 | 285 | = x 286 | = data:video/mp4;base64,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 287 | 288 | = x 289 | = data:audio/mp3;base64,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 290 | 291 | 292 | -------------------------------------------------------------------------------- /tools/domato/canvas/canvas.txt: -------------------------------------------------------------------------------- 1 | # Copyright 2017 Google Inc. All Rights Reserved. 2 | # Licensed under the Apache License, Version 2.0 (the "License"); 3 | # you may not use this file except in compliance with the License. 4 | # You may obtain a copy of the License at 5 | # 6 | # http://www.apache.org/licenses/LICENSE-2.0 7 | # 8 | # Unless required by applicable law or agreed to in writing, software 9 | # distributed under the License is distributed on an "AS IS" BASIS, 10 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | # See the License for the specific language governing permissions and 12 | # limitations under the License. 13 | 14 | = 15 | = 16 | = 17 | 18 | = 536870911 19 | = 536870912 20 | = 1073741823 21 | = 1073741824 22 | = 2147483647 23 | = 2147483648 24 | = 4294967295 25 | = 4294967296 26 | 27 | = 28 | = + 29 | = + + 30 | = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" 31 | = 17 32 | = 65 33 | = 257 34 | = 1025 35 | = 4097 36 | = 65537 37 | = String.fromCharCode() 38 | = String.fromCharCode().repeat() 39 | 40 | = "nonzero" 41 | = "evenodd" 42 | 43 | = "butt" 44 | = "round" 45 | = "square" 46 | = "bevel" 47 | = "round" 48 | = "miter" 49 | 50 | = "left" 51 | = "right" 52 | = "center" 53 | = "start" 54 | = "end" 55 | 56 | = "top" 57 | = "hanging" 58 | = "middle" 59 | = "alphabetic" 60 | = "ideographic" 61 | = "bottom" 62 | 63 | = "ltr" 64 | = "rtl" 65 | = "inherit" 66 | 67 | = "repeat" 68 | = "repeat-x" 69 | = "repeat-y" 70 | = "no-repeat" 71 | 72 | = "image/png" 73 | = "image/webp" 74 | 75 | = + 76 | = - 77 | = / 78 | = * 79 | 80 | = "source-over" 81 | = "source-in" 82 | = "source-out" 83 | = "source-atop" 84 | = "destination-over" 85 | = "destination-in" 86 | = "destination-out" 87 | = "destination-atop" 88 | = "lighter" 89 | = "copy" 90 | = "xor" 91 | = "multiply" 92 | = "screen" 93 | = "overlay" 94 | = "darken" 95 | = "lighten" 96 | = "color-dodge" 97 | = "hard-light" 98 | = "soft-light" 99 | = "difference" 100 | = "exclusion" 101 | = "hue" 102 | = "saturation" 103 | = "color" 104 | = "luminosity" 105 | 106 | = this 107 | 108 | = 109 | 110 | !include ../common.txt 111 | !include ../cssproperties.txt 112 | 113 | !lineguard try { } catch(e) { console.log(e.message) } 114 | !varformat fuzzvar%05d 115 | !begin lines 116 | 117 | # Image 118 | = new Image(); 119 | = new Image(, ); 120 | .src = "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw=="; 121 | 122 | # Uint8ClampedArray 123 | = new Uint8ClampedArray(); 124 | = new Uint8ClampedArray([,]); 125 | 126 | # ImageData 127 | = new ImageData(, , ); 128 | = new ImageData(, ); 129 | 130 | # The button 131 | = document.getElementById('button'); 132 |