1 # Not related to Apache2::Registry; generates a .reg file for Windows XP to import.
3 package Sesse::pr0n::Registry;
7 use Sesse::pr0n::Common qw(error dberror);
12 my $dbh = Sesse::pr0n::Common::get_dbh();
13 my $vhost = $r->get_server_name;
14 chomp (my $desc = Sesse::pr0n::Templates::fetch_template($r, 'wizard-description'));
16 $r->content_type("application/octet-stream");
17 $r->headers_out->add('Content-disposition' => 'attachment; filename="' . $vhost . '.reg"');
19 $r->print("Windows Registry Editor Version 5.00\r\n\r\n");
20 $r->print("[HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\Currentversion\\Explorer\\PublishingWizard\\PublishingWizard\\Providers\\$vhost]\r\n");
21 $r->print("\"Icon\"=\"http://$vhost/pr0n.ico\"\r\n");
22 $r->print("\"DisplayName\"=\"$vhost\"\r\n");
23 $r->print("\"Description\"=\"$desc\"\r\n");
24 $r->print("\"HREF\"=\"http://$vhost/wizard\"\r\n");
26 $r->print("[HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\Currentversion\\Explorer\\PublishingWizard\\InternetPhotoPrinting\\Providers\\$vhost]\r\n");
27 $r->print("\"Icon\"=\"http://$vhost/pr0n.ico\"\r\n");
28 $r->print("\"DisplayName\"=\"$vhost\"\r\n");
29 $r->print("\"Description\"=\"$desc\"\r\n");
30 $r->print("\"HREF\"=\"http://$vhost/wizard\"\r\n");
32 return Apache2::Const::OK;