Skip to content

Commit

Permalink
Doc update
Browse files Browse the repository at this point in the history
  • Loading branch information
andreas-zeller committed Jul 1, 2024
1 parent ce5291e commit 9a35552
Show file tree
Hide file tree
Showing 186 changed files with 41,491 additions and 35,957 deletions.
2 changes: 1 addition & 1 deletion docs/beta/404.html
Original file line number Diff line number Diff line change
Expand Up @@ -12156,7 +12156,7 @@

<div class="output_subarea output_stream output_stderr output_text">
<pre>Traceback (most recent call last):
File &#34;/var/folders/n2/xd9445p97rb3xh7m1dfx8_4h0006ts/T/ipykernel_26806/1830731544.py&#34;, line 4, in &lt;cell line: 3&gt;
File &#34;/var/folders/n2/xd9445p97rb3xh7m1dfx8_4h0006ts/T/ipykernel_24959/1830731544.py&#34;, line 4, in &lt;cell line: 3&gt;
raise NotFoundError
NotFoundError: &#39;404&#39; (expected)
</pre>
Expand Down
2 changes: 1 addition & 1 deletion docs/beta/code/01_Intro.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

# "Part I: Whetting Your Appetite" - a chapter of "The Fuzzing Book"
# Web site: https://www.fuzzingbook.org/html/01_Intro.html
# Last change: 2024-06-29 18:10:55+02:00
# Last change: 2024-06-30 18:22:56+02:00
#
# Copyright (c) 2021-2023 CISPA Helmholtz Center for Information Security
# Copyright (c) 2018-2020 Saarland University, authors, and contributors
Expand Down
2 changes: 1 addition & 1 deletion docs/beta/code/02_Lexical_Fuzzing.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

# "Part II: Lexical Fuzzing" - a chapter of "The Fuzzing Book"
# Web site: https://www.fuzzingbook.org/html/02_Lexical_Fuzzing.html
# Last change: 2024-06-29 18:11:10+02:00
# Last change: 2024-06-30 18:23:13+02:00
#
# Copyright (c) 2021-2023 CISPA Helmholtz Center for Information Security
# Copyright (c) 2018-2020 Saarland University, authors, and contributors
Expand Down
2 changes: 1 addition & 1 deletion docs/beta/code/03_Syntactical_Fuzzing.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

# "Part III: Syntactic Fuzzing" - a chapter of "The Fuzzing Book"
# Web site: https://www.fuzzingbook.org/html/03_Syntactical_Fuzzing.html
# Last change: 2024-06-29 18:12:53+02:00
# Last change: 2024-06-30 18:25:21+02:00
#
# Copyright (c) 2021-2023 CISPA Helmholtz Center for Information Security
# Copyright (c) 2018-2020 Saarland University, authors, and contributors
Expand Down
2 changes: 1 addition & 1 deletion docs/beta/code/04_Semantical_Fuzzing.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

# "Part IV: Semantic Fuzzing" - a chapter of "The Fuzzing Book"
# Web site: https://www.fuzzingbook.org/html/04_Semantical_Fuzzing.html
# Last change: 2024-06-29 18:16:09+02:00
# Last change: 2024-06-30 18:47:57+02:00
#
# Copyright (c) 2021-2023 CISPA Helmholtz Center for Information Security
# Copyright (c) 2018-2020 Saarland University, authors, and contributors
Expand Down
2 changes: 1 addition & 1 deletion docs/beta/code/05_Domain-Specific_Fuzzing.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

# "Part V: Domain-Specific Fuzzing" - a chapter of "The Fuzzing Book"
# Web site: https://www.fuzzingbook.org/html/05_Domain-Specific_Fuzzing.html
# Last change: 2024-06-29 18:19:28+02:00
# Last change: 2024-06-30 18:50:09+02:00
#
# Copyright (c) 2021-2023 CISPA Helmholtz Center for Information Security
# Copyright (c) 2018-2020 Saarland University, authors, and contributors
Expand Down
2 changes: 1 addition & 1 deletion docs/beta/code/06_Managing_Fuzzing.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

# "Part VI: Managing Fuzzing" - a chapter of "The Fuzzing Book"
# Web site: https://www.fuzzingbook.org/html/06_Managing_Fuzzing.html
# Last change: 2024-06-29 18:30:49+02:00
# Last change: 2024-06-30 18:55:49+02:00
#
# Copyright (c) 2021-2023 CISPA Helmholtz Center for Information Security
# Copyright (c) 2018-2020 Saarland University, authors, and contributors
Expand Down
2 changes: 1 addition & 1 deletion docs/beta/code/99_Appendices.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

# "Appendices" - a chapter of "The Fuzzing Book"
# Web site: https://www.fuzzingbook.org/html/99_Appendices.html
# Last change: 2024-06-29 18:33:28+02:00
# Last change: 2024-06-30 18:58:46+02:00
#
# Copyright (c) 2021-2023 CISPA Helmholtz Center for Information Security
# Copyright (c) 2018-2020 Saarland University, authors, and contributors
Expand Down
2 changes: 1 addition & 1 deletion docs/beta/code/APIFuzzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

# "Fuzzing APIs" - a chapter of "The Fuzzing Book"
# Web site: https://www.fuzzingbook.org/html/APIFuzzer.html
# Last change: 2024-06-29 18:19:45+02:00
# Last change: 2024-06-30 18:50:30+02:00
#
# Copyright (c) 2021-2023 CISPA Helmholtz Center for Information Security
# Copyright (c) 2018-2020 Saarland University, authors, and contributors
Expand Down
2 changes: 1 addition & 1 deletion docs/beta/code/AcademicPrototyping.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

# "Academic Prototyping" - a chapter of "The Fuzzing Book"
# Web site: https://www.fuzzingbook.org/html/AcademicPrototyping.html
# Last change: 2024-06-29 18:33:32+02:00
# Last change: 2024-06-30 18:58:51+02:00
#
# Copyright (c) 2021-2023 CISPA Helmholtz Center for Information Security
# Copyright (c) 2018-2020 Saarland University, authors, and contributors
Expand Down
8 changes: 4 additions & 4 deletions docs/beta/code/Carver.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

# "Carving Unit Tests" - a chapter of "The Fuzzing Book"
# Web site: https://www.fuzzingbook.org/html/Carver.html
# Last change: 2024-06-29 18:19:51+02:00
# Last change: 2024-06-30 18:50:39+02:00
#
# Copyright (c) 2021-2023 CISPA Helmholtz Center for Information Security
# Copyright (c) 2018-2020 Saarland University, authors, and contributors
Expand Down Expand Up @@ -75,19 +75,19 @@
>>> my_sqrt_grammar
{'': [''],
'': [''],
'': ['2', '4'],
'': ['4', '2'],
'': ['my_sqrt()']}
This grammar can be used to synthesize calls.
>>> fuzzer = GrammarCoverageFuzzer(my_sqrt_grammar)
>>> fuzzer.fuzz()
'my_sqrt(4)'
'my_sqrt(2)'
These calls can be executed in isolation, effectively extracting unit tests from system tests:
>>> eval(fuzzer.fuzz())
1.414213562373095
2.0
For more details, source, and documentation, see
Expand Down
6 changes: 5 additions & 1 deletion docs/beta/code/ClassDiagram.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

# "Class Diagrams" - a chapter of "The Fuzzing Book"
# Web site: https://www.fuzzingbook.org/html/ClassDiagram.html
# Last change: 2024-06-29 18:34:10+02:00
# Last change: 2024-06-30 18:59:39+02:00
#
# Copyright (c) 2021-2023 CISPA Helmholtz Center for Information Security
# Copyright (c) 2018-2020 Saarland University, authors, and contributors
Expand Down Expand Up @@ -451,6 +451,10 @@ def display_class_hierarchy(classes: Union[Type, List[Type]], *,
dot.attr('node', shape='record', fontname=CLASS_FONT)
dot.attr('graph', rankdir='BT', tooltip=title)
dot.attr('edge', arrowhead='empty')

# Hack to force rendering as HTML, allowing hovers and links in Jupyter
dot._repr_html_ = dot._repr_image_svg_xml

edges = set()
overloaded_methods: Set[str] = set()

Expand Down
68 changes: 25 additions & 43 deletions docs/beta/code/ConcolicFuzzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

# "Concolic Fuzzing" - a chapter of "The Fuzzing Book"
# Web site: https://www.fuzzingbook.org/html/ConcolicFuzzer.html
# Last change: 2024-06-29 18:19:06+02:00
# Last change: 2024-06-30 18:49:39+02:00
#
# Copyright (c) 2021-2023 CISPA Helmholtz Center for Information Security
# Copyright (c) 2018-2020 Saarland University, authors, and contributors
Expand Down Expand Up @@ -89,34 +89,31 @@
>>> _[cgi_decode](v)
>>> scf.add_trace(_, v)
' '
'+'
'%'
'A'
'%'
''
'A'
'AB'
'A+'
'ABC'
'+A'
'AB'
'AB+'
'++'
'++A'
'+++'
'A'
'+A'
IndexError: string index out of range (expected)
IndexError: string index out of range (expected)
'A%'
'AB'
'AB+C'
'+++A'
'+AB'
'++'
'%'
'AB%'
'AB+CDE'
'AB+'
'A%'
'A+'
'++AB'
'++A+'
'+A'
'++'
'+'
'+%'
IndexError: string index out of range (expected)
IndexError: string index out of range (expected)
IndexError: string index out of range (expected)
IndexError: string index out of range (expected)
We see how the additional inputs generated explore additional paths.
Expand All @@ -141,33 +138,18 @@
>>> print(e)
>>> cgf.update_grammar(_)
>>> print()
select (:) from aX1Nbwy4
Table ('aX1Nbwy4') was not found
delete from W5. where O*ci+D+T-_+H
Invalid WHERE ('.-B+S+a*s>i+D+T-_+H')
update Ubz set a2=Q1 where N-c+p/V+C/c+N>(L-i/i)
Table ('Ubz') was not found
update c set l=i,i=q,r=h,F=. where r!=r!=c+E
Table ('c') was not found
insert into vehicles (L58i91TQf2Z5V1S) values (-1.890)
Column ('L58i91TQf2Z5V1S') was not found
insert into months (kind,company) values (3742,'8|XE','+Y:',8)
Column ('kind') was not found
select 245 from :2 where r(_)-N+e>n
Table (':2') was not found
delete from vehicles where (((K)==p!=o))==(((((_>E)))))!=b((pu),D>o)
Invalid WHERE ('(((K)==p!=o))==(((((_>E)))))!=b((pu),D>o)')
delete from months where Q/x/j/q(p)/H*h-B==cz
Invalid WHERE ('Q/x/j/q(p)/H*h-B==cz')
select zFocn,(u-e*S-k/U*l>(l)),yq35r16 from m7
Table ('m7') was not found
insert into vehicles (:b) values (22.72)
Column (':b') was not found
update months set company=z8 where ((P==e==8.7))!=I+f/C-J*_-H
Column ('company') was not found
select i*q!=(4) from vehicles where L*S/l/u/b+b==W
delete from vehicles where W/V!=A(f)+tL+S))==((:+lL+S))==((:+l
For more details, source, and documentation, see
"The Fuzzing Book - Concolic Fuzzing"
at https://www.fuzzingbook.org/html/ConcolicFuzzer.html
Expand Down
2 changes: 1 addition & 1 deletion docs/beta/code/ConfigurationFuzzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

# "Testing Configurations" - a chapter of "The Fuzzing Book"
# Web site: https://www.fuzzingbook.org/html/ConfigurationFuzzer.html
# Last change: 2024-06-29 18:19:40+02:00
# Last change: 2024-06-30 18:50:23+02:00
#
# Copyright (c) 2021-2023 CISPA Helmholtz Center for Information Security
# Copyright (c) 2018-2020 Saarland University, authors, and contributors
Expand Down
2 changes: 1 addition & 1 deletion docs/beta/code/ControlFlow.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

# "Control Flow Graph" - a chapter of "The Fuzzing Book"
# Web site: https://www.fuzzingbook.org/html/ControlFlow.html
# Last change: 2024-06-29 18:34:19+02:00
# Last change: 2024-06-30 18:59:53+02:00
#
# Copyright (c) 2021-2023 CISPA Helmholtz Center for Information Security
# Copyright (c) 2018-2020 Saarland University, authors, and contributors
Expand Down
2 changes: 1 addition & 1 deletion docs/beta/code/Coverage.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

# "Code Coverage" - a chapter of "The Fuzzing Book"
# Web site: https://www.fuzzingbook.org/html/Coverage.html
# Last change: 2024-06-29 18:11:21+02:00
# Last change: 2024-06-30 22:06:38+02:00
#
# Copyright (c) 2021-2023 CISPA Helmholtz Center for Information Security
# Copyright (c) 2018-2020 Saarland University, authors, and contributors
Expand Down
2 changes: 1 addition & 1 deletion docs/beta/code/DynamicInvariants.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

# "Mining Function Specifications" - a chapter of "The Fuzzing Book"
# Web site: https://www.fuzzingbook.org/html/DynamicInvariants.html
# Last change: 2024-06-29 18:19:25+02:00
# Last change: 2024-06-30 18:50:04+02:00
#
# Copyright (c) 2021-2023 CISPA Helmholtz Center for Information Security
# Copyright (c) 2018-2020 Saarland University, authors, and contributors
Expand Down
10 changes: 5 additions & 5 deletions docs/beta/code/ExpectError.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

# "Error Handling" - a chapter of "The Fuzzing Book"
# Web site: https://www.fuzzingbook.org/html/ExpectError.html
# Last change: 2024-06-29 18:33:57+02:00
# Last change: 2024-06-30 18:59:20+02:00
#
# Copyright (c) 2021-2023 CISPA Helmholtz Center for Information Security
# Copyright (c) 2018-2020 Saarland University, authors, and contributors
Expand Down Expand Up @@ -47,7 +47,7 @@
>>> with ExpectError():
>>> x = 1 / 0
Traceback (most recent call last):
File "/var/folders/n2/xd9445p97rb3xh7m1dfx8_4h0006ts/T/ipykernel_25088/2664980466.py", line 2, in
File "/var/folders/n2/xd9445p97rb3xh7m1dfx8_4h0006ts/T/ipykernel_21642/2664980466.py", line 2, in
x = 1 / 0
ZeroDivisionError: division by zero (expected)
Expand All @@ -63,11 +63,11 @@
3 seconds have passed
Traceback (most recent call last):
File "/var/folders/n2/xd9445p97rb3xh7m1dfx8_4h0006ts/T/ipykernel_25088/1223755941.py", line 2, in
File "/var/folders/n2/xd9445p97rb3xh7m1dfx8_4h0006ts/T/ipykernel_21642/1223755941.py", line 2, in
long_running_test()
File "/var/folders/n2/xd9445p97rb3xh7m1dfx8_4h0006ts/T/ipykernel_25088/3930412460.py", line 4, in long_running_test
File "/var/folders/n2/xd9445p97rb3xh7m1dfx8_4h0006ts/T/ipykernel_21642/3930412460.py", line 4, in long_running_test
time.sleep(1)
File "/Users/zeller/Projects/fuzzingbook/notebooks/Timeout.ipynb", line 43, in timeout_handler
File "Timeout.ipynb", line 43, in timeout_handler
raise TimeoutError()
TimeoutError (expected)
Expand Down
2 changes: 1 addition & 1 deletion docs/beta/code/Fuzzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

# "Fuzzing: Breaking Things with Random Inputs" - a chapter of "The Fuzzing Book"
# Web site: https://www.fuzzingbook.org/html/Fuzzer.html
# Last change: 2024-06-29 18:04:20+02:00
# Last change: 2024-06-30 22:06:25+02:00
#
# Copyright (c) 2021-2023 CISPA Helmholtz Center for Information Security
# Copyright (c) 2018-2020 Saarland University, authors, and contributors
Expand Down
2 changes: 1 addition & 1 deletion docs/beta/code/FuzzingInTheLarge.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

# "Fuzzing in the Large" - a chapter of "The Fuzzing Book"
# Web site: https://www.fuzzingbook.org/html/FuzzingInTheLarge.html
# Last change: 2024-06-29 18:32:39+02:00
# Last change: 2024-06-30 18:57:51+02:00
#
# Copyright (c) 2021-2023 CISPA Helmholtz Center for Information Security
# Copyright (c) 2018-2020 Saarland University, authors, and contributors
Expand Down
24 changes: 12 additions & 12 deletions docs/beta/code/FuzzingWithConstraints.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

# "Fuzzing with Constraints" - a chapter of "The Fuzzing Book"
# Web site: https://www.fuzzingbook.org/html/FuzzingWithConstraints.html
# Last change: 2024-06-29 18:18:22+02:00
# Last change: 2024-06-30 18:48:45+02:00
#
# Copyright (c) 2021-2023 CISPA Helmholtz Center for Information Security
# Copyright (c) 2018-2020 Saarland University, authors, and contributors
Expand Down Expand Up @@ -75,24 +75,24 @@
With that, invoking `solver.solve()` returns a _solution_ for the constraints.
>>> str(solver.solve())
'(905)636-9584'
'(907)636-9584'
`solve()` returns a derivation tree, which typically is converted into a string using `str()` as above. The `print()` function does this implicitly.
Subsequent calls of `solve()` return more solutions:
>>> for _ in range(10):
>>> print(solver.solve())
(905)410-2075
(905)248-5250
(905)827-2843
(905)302-2243
(905)987-2797
(905)540-7715
(905)767-9108
(905)377-4904
(905)401-3406
(904)257-9854
(907)410-2075
(907)248-5250
(907)827-2843
(907)302-2243
(907)987-2797
(907)540-7715
(907)767-9108
(907)377-4904
(907)401-3406
(905)257-9854
We see that the solver produces a number of inputs that all satisfy the constraint - the area code is always more than 900.
Expand Down
Loading

0 comments on commit 9a35552

Please sign in to comment.