Advertisement
aaaaaa123456789

Flash policy daemon (or an attempt at it)

Nov 9th, 2013
96
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.  
  3. require_once "server.php";
  4.  
  5. // Change at will.
  6. $policy = <<<'xml'
  7. <?xml version="1.0"?>
  8. <!DOCTYPE cross-domain-policy SYSTEM "/xml/dtds/cross-domain-policy.dtd">
  9. <cross-domain-policy>
  10.   <site-control permitted-cross-domain-policies="master-only" />
  11.   <allow-access-from domain="*" to-ports="*" />
  12. </cross-domain-policy>
  13. xml;
  14.  
  15. $server = new Server();
  16.  
  17. function requestHandler ($request, $client) {
  18.   global $server, $xml;
  19.   $server -> send($client, "$xml\0", SERVER_SEND_ALL);
  20. }
  21.  
  22. $server -> splitMode = SERVER_SPLIT_CHAR;
  23. $server -> delimiter = 0;
  24. $server -> packetLimit = 128; // prevents pointless flooding
  25. $server -> receiveCallback = "requestHandler";
  26.  
  27. $server -> open(843);
  28.  
  29. ?>
Advertisement
RAW Paste Data Copied
Advertisement