7a58a8672947eca49a4246a3722ca9234252c1b7
[www.jankratochvil.net.git] / project / netdnsspoof / Index.pm
1 # $Id$
2 # Main page of 'My::Project::netdnsspoof'
3 # Copyright (C) 2005 Jan Kratochvil <project-www.jankratochvil.net@jankratochvil.net>
4
5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; exactly version 2 of June 1991 is required
8
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 # GNU General Public License for more details.
13
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write to the Free Software
16 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
17
18
19 package project::netdnsspoof::Index;
20 require 5.6.0;  # at least 'use warnings;' but we need some 5.6.0+ modules anyway
21 our $VERSION=do { my @r=(q$Revision$=~/\d+/g); sprintf "%d.".("%03d"x$#r),@r; };
22 our $CVS_ID=q$Id$;
23 use strict;
24 use warnings;
25
26 use My::Web;
27 Wuse 'project::Lib';
28 Wrequire 'product::Lib';
29
30
31 our @ListItem=(
32                 "name"=>"netdnsspoof",
33                 "platform"=>"unixuser",
34                 "priority"=>483,
35                 "cvs"=>"netdnsspoof",
36                 # FIXME: 'http://cvs.jankratochvil.net/viewcvs/' -> $W->{"project_viewcvs"}
37                 "link-Source file"=>'http://cvs.jankratochvil.net/viewcvs/'."netdnsspoof/netdnsspoof?rev=HEAD",
38                 "summary"=>"Network DNS proxy spoofing any nonexisting names",
39                 "license"=>"GPL",
40                 "maintenance"=>"ready",
41                 "language"=>"Perl",
42                 "description"=>sub { return <<"HERE"; },
43 <p>Would you like to catch requests to any even-nonexisting DNS queries on your
44 network? 
45 It may be useful for @{[ 'Plug&nbsp;&amp;&nbsp;Play' ]}-like zero-configuration networks.</p>
46 <p>This project is a GPLed part of my product:
47 @{[ a_href '/product/hotelgate/',product::Lib->title(product::Lib->name_to_hashref("hotelgate")) ]}</p>
48 HERE
49                 );
50
51 sub handler
52 {
53 project::Lib->init();
54
55
56 print <<"HERE";
57 <p>This code can be used also as framework for any DNS-modifying requirements.
58 You may create virtual TLDs based on non-DNS resources etc.</p>
59 HERE
60
61 my $hotelgate_title=product::Lib->title(product::Lib->name_to_hashref("hotelgate"));
62 print <<"HERE";
63 <table border="0" class="margin-center td-center">
64         <tr><td>@{[
65                 img '/product/hotelgate/Admin-Login-icon.jpeg',$hotelgate_title,
66                                 "a_href"=>'/product/hotelgate/'
67                 ]}</td></tr>
68         <tr><td style="font-size: xx-large;">@{[ a_href '/product/hotelgate/',$hotelgate_title ]}</td></tr>
69 </table>
70 HERE
71
72
73 exit;
74 }
75 1;