- Timestamp:
- Jan 5, 2007, 11:28:07 AM (14 years ago)
- Location:
- zzuf/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
zzuf/trunk/doc/zzuf.1
r1562 r1563 89 89 .RS 90 90 .TP 91 \fB\\0\fR92 null byte93 .TP94 91 \fB\\n\fR 95 92 new line … … 100 97 \fB\\t\fR 101 98 tabulation 99 .TP 100 \fB\\\fR\fINNN\fR 101 the byte whose octal value is \fINNN\fR 102 102 .TP 103 103 \fB\\x\fR\fINN\fR … … 109 109 .IP 110 110 You can use \(oq\fB-\fR\(cq to specify ranges. For instance, to protect all 111 bytes from \(oq\fB\\x01\fR\(cq to \(oq \(cq, use 112 \(oq\fB\-P\ \(aq\\x01-\ \(aq\fR\(cq. 113 114 The statistical outcome of this option should not be overlooked. Because 115 \fBzzuf\fR cannot know the nature of the input data beforehands and must 116 fuzz it even if only one byte of data was received, protecting characters 117 may change the meaning of the \fB\-r\fR flag depending on the data being 118 fuzzed. For instance, asking to fuzz 1% of input bits (\fB\-r\ 0.01\fR) 119 and to protect lowercase characters (\fB\-P\ a-z\fR) will result in 120 an actual average fuzzing ratio of 0.9% with truly random data, 0.3% with 121 random ASCII data and 0.2% with a standard English text. 111 bytes from '\\001' to '/', use \(oq\fB\-P\ \(aq\\001-/\(aq\fR\(cq. 112 113 The statistical outcome of this option should not be overlooked: if characters 114 are protected, the effect of the \(oq\fB\-r\fR\(cq flag will vary depending 115 on the data being fuzzed. For instance, asking to fuzz 1% of input bits 116 (\fB\-r\ 0.01\fR) and to protect lowercase characters (\fB\-P\ a-z\fR) will 117 result in an actual average fuzzing ratio of 0.9% with truly random data, 118 0.3% with random ASCII data and 0.2% with standard English text. 122 119 123 120 See also the \fB\-R\fR flag. … … 189 186 and prevent non-ASCII characters from appearing in the output: 190 187 .PP 191 \fB zzuf -P \(aq\\n\(aq -R \(aq\\ 0-\\x1f\\x7f-\\xff\(aq cat /etc/motd\fR188 \fB zzuf -P \(aq\\n\(aq -R \(aq\\x00-\\x1f\\x7f-\\xff\(aq cat /etc/motd\fR 192 189 .PP 193 190 Fuzz the input of the \fBconvert\fR program, using file \fBfoo.jpeg\fR as the … … 198 195 \fB zzuf -E \(aq\\.xml$\(aq convert -- foo.jpeg -format tga /dev/null\fR 199 196 .PP 200 Fuzz the input of \fB vlc\fR, using file \fBmovie.avi\fR as the original input197 Fuzz the input of \fBVLC\fR, using file \fBmovie.avi\fR as the original input 201 198 and restricting fuzzing to filenames that appear on the command line 202 199 (\fB\-c\fR), then generate \fBfuzzy-movie.avi\fR which is a file that 203 can be read by \fB vlc\fR to reproduce the same behaviour without using200 can be read by \fBVLC\fR to reproduce the same behaviour without using 204 201 \fBzzuf\fR: 205 202 .PP … … 208 205 \fB vlc fuzzy-movie.avi\fR 209 206 .PP 210 Fuzz 2% of \fB mplayer\fR's input bits (\fB\-r\ 0.02\fR) with seeds 0 to 9999207 Fuzz 2% of \fBMPlayer\fR's input bits (\fB\-r\ 0.02\fR) with seeds 0 to 9999 211 208 (\fB\-s\ 0:10000\fR), disabling its standard output messages (\fB\-q\fR), 212 209 launching up to three simultaneous child processes (\fB\-F\ 3\fR), killing 213 \fB mplayer\fR if it takes more than one minute to read the file (\fB\-T\ 60\fR)210 \fBMPlayer\fR if it takes more than one minute to read the file (\fB\-T\ 60\fR) 214 211 and disabling its \fBSIGSEGV\fR signal handler (\fB\-S\fR): 215 212 .PP … … 238 235 .PP 239 236 Though best efforts are made, identical behaviour for different versions of 240 \fBzzuf\fR is not guaranteed. Only the reproducibility for subsequent calls 241 with the same \fBzzuf\fR version on different operating systems and with 242 different target programs is guaranteed. 237 \fBzzuf\fR is not guaranteed. The reproducibility for subsequent calls on 238 different operating systems and with different target programs is only 239 guaranteed when the same version of \fBzzuf\fR is used. 240 .SH HISTORY 241 .PP 242 \fBZzuf\fR started its life in 2002 as the \fBstreamfucker\fR tool, a small 243 multimedia stream corrupter used to find bugs in the \fBVLC\fR media player. 244 \fBZzuf\fR is a complete rewrite of that tool. 243 245 .SH AUTHOR 244 246 .PP -
zzuf/trunk/src/libzzuf.c
r1560 r1563 157 157 else if(*tmp == 't') 158 158 new = '\t'; 159 else if(*tmp == '0') 160 new = '\0'; 159 else if(tmp[0] >= '0' && tmp[0] <= '7' && tmp[1] >= '0' 160 && tmp[1] <= '7' && tmp[2] >= '0' && tmp[2] <= '7') 161 { 162 new = tmp[2] - '0'; 163 new |= (int)(tmp[1] - '0') << 3; 164 new |= (int)(tmp[0] - '0') << 6; 165 tmp += 2; 166 } 161 167 else if((*tmp == 'x' || *tmp == 'X') 162 168 && tmp[1] && strchr(hex, tmp[1])
Note: See TracChangeset
for help on using the changeset viewer.