12.06.2015 Views

The Annoyance Filter.pdf - Fourmilab

The Annoyance Filter.pdf - Fourmilab

The Annoyance Filter.pdf - Fourmilab

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

104 FLASH TEXT EXTRACTOR ANNOYANCE-FILTER §124<br />

124. Some of the DoAction tags contain string we might be interested in perusing. Walk through<br />

the action items in a DoAction tag and push any relevant strings onto the strings queue.<br />

〈 Parse Flash DoAction tag 124 〉 ≡<br />

{<br />

#ifdef FLASH_PARSE_DEBUG<br />

cout ≪ "Do␣action:" ≪ endl ;<br />

#endif<br />

actionCode ac;<br />

while (isOK ( ) ∧ (ac = static cast〈actionCode〉(get8 ( ))) ≠ sactionNone ) {<br />

unsigned int dlen = 0;<br />

if ((ac & # 80) ≠ 0) {<br />

dlen = get16 ( );<br />

}<br />

switch (ac) {<br />

case sactionGetURL:<br />

{<br />

string url , target ;<br />

getString (url );<br />

getString (target );<br />

if (¬textOnly ) {<br />

strings .push (url );<br />

}<br />

strings .push (target );<br />

}<br />

break;<br />

default:<br />

if (dlen > 0) {<br />

skip8n (dlen );<br />

}<br />

#ifdef FLASH_PARSE_DEBUG<br />

cout ≪ "␣␣Skipping␣action␣code␣0x" ≪ hex ≪ ac ≪ dec ≪ "␣data␣length␣" ≪ dlen ≪<br />

endl ;<br />

#endif<br />

break;<br />

}<br />

}<br />

}<br />

This code is used in section 115.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!