1 |
#! perl # optional depends=tcp |
2 |
|
3 |
# permissive flash policy socket server |
4 |
|
5 |
our $DETECTOR = ext::tcp::register flashpolicy => 23, sub { |
6 |
m{^<policy-file-request/>\x00} |
7 |
}, sub { |
8 |
# socket policy file, just write answer and hope the kernel accepts it in one go |
9 |
syswrite $_[1], <<EOF . "\x00"; |
10 |
<?xml version="1.0"?> |
11 |
<!DOCTYPE cross-domain-policy SYSTEM "http://www.adobe.com/xml/dtds/cross-domain-policy.dtd"> |
12 |
<cross-domain-policy> |
13 |
<allow-access-from domain="*" to-ports="*"/> |
14 |
</cross-domain-policy> |
15 |
EOF |
16 |
} |
17 |
|