smb2www-980804/ 40775 1750 1750 0 6561651057 12211 5 ustar csmall csmall smb2www-980804/etc/ 40775 1750 1750 0 6533634051 12756 5 ustar csmall csmall smb2www-980804/etc/english.lang 100664 1750 1750 2141 6535641542 15352 0 ustar csmall csmall # (C) Remco van Mook 1998
lang_author = Remco van Mook <remco@samba.anu.edu.au>
welcome = Welcome to the SMB to WWW gateway !
workgroup = Workgroup
othernet = Other Networks
submit = Submit
help = Help
help2 = HELP
network = Network
ent_net = The Entire Network
ent_net2 = THE ENTIRE NETWORK
shares = Shares
share = Share
printer = Printer
no_group = Group Not Found
no_group2 = The group you requested could not be found.
in_group = Computers in group
shares_on = Shares on computer
no_host = Host Not Found
no_host2 = The host you requested could not be found.
req_pass = Password required for
on_computer = on Computer
or_acc_den = or access denied
name_pass = Please enter name and/or password
name = name
upass = password
content = Contents of
top_share = Top of Share
down_dir = Download this Directory
dir = DIR
file = FILE
goback = Go back to the SMB to WWW gateway
sendmsg = Send a Message
sendmsg2 = Enter message to send to
message_ok = The message has been sent successfully.
smb2www-980804/etc/english_help.lang 100664 1750 1750 2427 6535641554 16374 0 ustar csmall csmall header = Help for the SMB to WWW gateway
info = This is a brief explanation of the icons used in SMB2WWW, the SMB to WWW gateway. Most are pretty much self-explanatory. Also, I'll discuss a few of the other things you can encounter.
info2 = SMB2WWW is organized in the same way SMB, or Windows Network, is organized. Every computer has shares, those shares have directories, every computer is part of a workgroup. Within a site, there can be several workgroups.
othernet = Behind this icon is a page that refers to other SMB2WWW sites.
network = This brings you back to an overview of the entire SMB2WWW site.
workgroup = Goes to the Workgroup mentioned.
shares = Goes to the Computer mentioned. There is one special case: on the overview page, there is a Form Field next to this icon. You can type in the computer you wish to go to.
share = Opens the share mentioned.
dir = Opens the directory mentioned.
file = Opens the file mentioned. What occurs depends on your browser and the kind of file you're opening. The gateway will try to provide the correct MIME-type, based on the extension of the filename.
tar = This Icon will show up on directory overviews. With this icon, you can download an entire directory tree at once, as a TAR file. Please use sparingly.
help = Brings you to this page.
smb2www-980804/etc/finnish.lang 100664 1750 1750 2016 6533636634 15364 0 ustar csmall csmall # (C) Mika T. Lindqvist 1998
lang_author = Mika T. Lindqvist <mika@field.ttaol.fi>
welcome = Tervetuloa SMB:n WWW-liittymään !
workgroup = Työryhmä
othernet = Muut verkot
submit = Lähetä
help = Ohje
help2 = OHJE
network = Verkko
ent_net = Koko Verkko
ent_net2 = KOKO VERKKO
shares = Jakonimet
share = Jakonimi
no_group = Ryhmää Ei Löydy
no_group2 = Pyytämäsi ryhmää ei löydy.
in_group = Tietokoneet ryhmässä
shares_on = Jakonimet tietokoneella
no_host = Ei konetta
no_host2 = Konetta, jota pyysit, ei löydetä.
req_pass = Tarvitaan salasana jakonimelle
on_computer = tietokoneella
or_acc_den = tai pääsy estetty
name_pass = Anna tunnus ja/tai salasana
name = tunnus
upass = salasana
content = Sisältö kohteesta
top_share = Jakonimen alku
down_dir = Imuroi tämä hakemisto
dir = HAKEMISTO
file = TIEDOSTO
smb2www-980804/etc/finnish_help.lang 100664 1750 1750 3321 6533635026 16366 0 ustar csmall csmall help_author = Mika T. Lindqvist
header = Ohje SMB:n WWW-liittymään
info = Tämä on lyhyt selitys kuvakkeista, joita on käytetty SMB2WWW:ssä, SMB:n WWW-liittymä. Useimmat ovat suurelta osin itseselkoisia. Kerron myös muutamasta muusta asiasta, jotka voit kohdata.
info2 = SMB2WWW on järjestelty samalla tavalla kuin SMB, tai Windows-verkko, on järjestelty. Jokaisessa tietokoneessa on jakonimiä, nuo jakonimet sisältävät hakemistoja, jokainen tietokone on osa työryhmää. Yksikön sisällä voi olla useita työryhmiä.
othernet = Tämän kuvakkeen takana on sivu, joka viittaa muihin SMB2WWW-yksikköihin.
network = Tämä vie sinut takaisin koko SMB2WWW-yksikön yleiskatsaukseen.
workgroup = Menee mainittuun Työryhmään.
shares = Menee mainittuun Tietokoneeseen. On myös erikoistapaus: yleiskatsaus-sivulla, siell on Kaavake-kenttä tämän kuvakkeen vieressä. Voit kirjoittaa tietokoneen, johon haluat mennä, nimen siihen.
share = Avaa mainitun jakonimen.
dir = Avaa mainitun hakemiston.
file = Avaa mainitun tiedoston. Se mitä tapahtuu, riippuu selaimestasi ja siitä, minkä tyyppistä tiedostoa olet avaamassa. Liittymä yrittää välittää oikean MIME-tyypin, tiedoston päätteen perusteella.
tar = Tämä kuvake ilmestyy hakemistojen yleiskatsauksessa. Sillä voit imuroida kokonaisen hakemistopuun kerralla, TAR-tiedostona. Muista käyttää säästäen.
help = Tuo sinut tälle sivulle.
goback = Mene takaisin SMB:n WWW-liittymään.
smb2www-980804/etc/dutch.lang 100664 1750 1750 1711 6557101751 15027 0 ustar csmall csmall # (C) Remco van Mook 1998
lang_author = Remco van Mook <remco@samba.anu.edu.a>
welcome = Welkom bij de SMB naar WWW gateway !
workgroup = Werkgroep
othernet = Overige Netwerken
submit = Verzenden
help = Help
help2 = HELP
network = Netwerk
ent_net = Het gehele Netwerk
ent_net2 = HET GEHELE NETWERK
shares = Mappen
share = Map
no_group = Groep niet gevonden
no_group2 = De door u gevraagde groep werd niet gevonden.
in_group = Computers in groep
shares_on = Mappen op computer
no_host = Computer niet gevonden
no_host2 = De door u gevraagde computer werd niet gevonden.
req_pass = Wachtwoord benodigd voor
on_computer = op Computer
or_acc_den = of geen toegang
name_pass = Geef uw naam en/of wachtwoord op:
name = naam
upass = wachtwoord
content = Inhoud van
top_share = Bovenkant van Map
down_dir = Haal deze gehele folder op
dir = MAP
file = BESTAND
smb2www-980804/etc/dutch_help.lang 100664 1750 1750 2624 6533636117 16046 0 ustar csmall csmall header = Help voor de SMB naar WWW gateway
info = Dit is een korte uitleg van de gebruikte ikonen in SMB2WWW, de SMB naar WWW gateway. De meesten spreken voor zich.
info2 = SMB2WWW is op dezelfde manier opgezet als SMB, of Windows Network. Elke computer heeft mappen, die mappen hebben folders, elke computer is onderdeel van een werkgroep. Op een lokatie kunnen meerdere werkgroepen bestaan.
othernet = Achter dit ikoon is een pagina die verwijst naar andere SMB2WWW lokaties.
network = Dit ikoon brengt je terug naar een overzicht van alle werkgroepen.
workgroup = Dit ikoon brengt je naar naastvermelde werkgroep.
shares = Gaat naar de vermelde computer. er is een speciaal geval: op de overzichtspagina van alle werkgroepen is er een formulierveld naast het ikoon. Hier kan je de naam intikken van de computer waar je naartoe wilt.
share = Opent de map.
dir = Opent de folder.
file = Opent het bestand. Wat er gebeurt hangt af van je browser en het type van het bestand. De gateway zal proberen het juiste MIME-type te vinden, op basis van de extensie van het bestand.
tar = Dit ikoon is te zien op overzichten van folders. Met dit ikoon kan je een hele boom van folders en bestanden in een keer downloaden, als TAR bestand. Dit is meestal VEEL informatie, ga er zuinig mee om.
help = Dit ikoon brengt je naar deze pagina.
goback = Ga terug naar de SMB naar WWW gateway
smb2www-980804/cgi-bin/ 46775 1750 1750 0 6557100352 13517 5 ustar csmall csmall smb2www-980804/cgi-bin/smbmsg.pl 100775 1750 1750 3407 6542234167 15450 0 ustar csmall csmall #! /usr/bin/perl
# This file smbmsg.pl Copyright 1998 Edward Rudd
# Modifications by Remco van Mook, 1998.
use strict;
use smb2www;
my %all=decode_query;
sub Message_OK {
header ("$text{message_ok}");
print "
",
""
);
trailer;
exit;
}
my $line = "";
foreach $line ( @smbout ) {
SendHostMessage ($line->{name},$all{'mesg'});
}
Message_OK;
} else {
SendHostMessage ($all{'host'},$all{'mesg'});
Message_OK;
}
}
smb2www-980804/cgi-bin/smb2www.pl 100775 1750 1750 3346 6542206404 15563 0 ustar csmall csmall #! /usr/bin/perl
# SMB2WWW - a smb to WWW gateway; access windows computers through a browser
# Copyright (C) 1997 Remco van Mook
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
# The author can be contacted by e-mail: remco@samba.anu.edu.au
use strict;
use smb2www;
my @smbout = GetSMBGroups;
header ("$text{welcome}");
table (
href ($cfg{linkto_other}, image ($cfg{icon_other},"$text{othernet}")),
"",
href ($cfg{linkto_other}, "
"
);
}
trailer;
smb2www-980804/cgi-bin/smb2www.pm 100664 1750 1750 31601 6561650721 15602 0 ustar csmall csmall ### Copyright notice
# SMB2WWW - a smb to WWW gateway; access windows computers through a browser
# Copyright (C) 1997,1998 Remco van Mook
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
# The author can be contacted by e-mail: remco@samba.anu.edu.au
### Configuration and common procedures for smb2www
## This is a perl module. Some headers
package smb2www;
use Exporter ();
use MIME::Base64;
use Time::Local; # for lmtime
use strict;
use vars qw( %cfg %text @ISA @EXPORT );
@ISA = qw(Exporter);
@EXPORT = qw( %cfg $cfg %text $text urlDecode urlEncode image table href
shref header trailer decode_query mimetype lmtime
GetSMBTar GetSMBFile GetSMBDir GetSMBShr
GetSMBHosts GetSMBGroups
httptime MakeAuth GetAuth
SendHostMessage
);
## Configuration
%cfg = ();
open (CONFIG,"/usr/local/smb2www/etc/smb2www.conf") or die "SMB2WWW: No config file found.";
while () {
if ( $_ =~ /([\w\_]+)\s*=\s*(.+)/ ) {
$cfg{$1} = $2;
}
}
close CONFIG;
## Multi-language support
%text = ();
open (LANGUAGE,"$cfg{cfgdir}/$cfg{language}.lang") or die "SMB2WWW: No language support found for $cfg{language}.";
while () {
if ( $_ =~/([\w\_]+)\s*=\s*(.+)/ ) {
$text{$1} = $2;
}
}
close LANGUAGE;
## Common procedures
# Nasty URL encoding/decoding stuff
sub urlDecode{
my $value= $_[0];
$value =~ tr/+/ /;
$value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
return $value;
};
sub urlEncode {
my $value=$_[0];
$value =~ s/([^a-zA-Z0-9\.\_\'\-\$\~\\\/])/'%'.unpack("H*",$1)/eg;
$value =~ tr/ /+/;
return $value;
};
# Getting info from the webserver
# Some security might be nice.. let's kill it at the first ; for now
# Only brave souls hack smb2www without going insane at all the refs..
sub decode_query {
my %query = ();
my $input;
if ($ENV{'REQUEST_METHOD'} eq "POST") {
chomp ($input = urlDecode );
} else {
$input = $ENV{'QUERY_STRING'};
}
my @security = split ( ';',$input);
my @qs = split ( '&', $security[0]);
my $entry;
foreach $entry (@qs) {
if ($entry =~ /([\w]+)=([^\&\?]+)/) {
my $key = $1;
my $value = $2;
$query{$key}=$value;
}
}
return %query;
};
# Return a HTML href tag
sub href {
return "$_[1]";
};
# Return a HTML image tag
sub image {
return "";
};
# Return a HTML table entry
sub table {
my @table = @_;
print "
\n";
foreach ( @table ) {
print "
$_
\n";
}
print "
\n";
}
# Return a SMB2WWW url tag
sub shref {
my ($type, $group, $master, $host, $share, $dir,
$user, $pass, $size, $date, $auth) = @_;
my @urlencoded = ($group,$master, $host,$share,$dir,$user,$pass);
for (@urlencoded) { $_ = urlEncode $_ }
($group,$master, $host,$share,$dir,$user,$pass) = @urlencoded;
my $url;
my $pwa;
if ( $auth eq "" ) {
$pwa = "user=$user&pass=$pass"
} else {
$pwa = "auth=$auth";
}
if ( (lc $type) eq "file" ) {
$url = "$cfg{cgiroot}/smbfile.pl/$host/$share/$size/$dir?$pwa&lm=".lmtime($date);
} elsif ( (lc $type) eq "tar" ) {
$url = "$cfg{cgiroot}/smbtar.pl/$host/$share$dir?$pwa";
} elsif ( (lc $type) eq "dir" ) {
$url = "$cfg{cgiroot}/smbdir.pl?group=$group&master=$master&host=$host&share=$share&dir=$dir&$pwa";
} elsif ( (lc $type) eq "share" ) {
$url = "$cfg{cgiroot}/smbshr.pl?group=$group&master=$master&host=$host";
} elsif ( (lc $type) eq "group" ) {
$url = "$cfg{cgiroot}/smbgrp.pl?group=$group&master=$master";
} elsif ( (lc $type) eq "all" ) {
$url = "$cfg{cgiroot}/smb2www.pl";
} elsif ( (lc $type) eq "msg" ) {
$url = "$cfg{cgiroot}/smbmsg.pl?group=$group&master=$master&host=$host";
} else {
$url = $_[0]; # Act stupid when acted stupid upon
}
return $url;
}
# Determine mimetype, given a file extension
sub mimetype {
my $test = lc $_[0];
my $type;
open MIME, $cfg{mimetype};
RULE: while ( ) {
my $line = $_;
if ( not ($line =~ /^$/) and not ($line =~ /^#/) ) {
if ( $line =~ /^([^\s]+)\s+([\w\ ]+)/ ) {
$type = $1;
if ( $2 =~ /$test/ ) {
last RULE;
} else {
$type = "";
}
}
}
}
close MIME;
$type = "application/octet-stream" if ($type eq "");
return $type;
}
# Calculate expiretime for header()
sub expiretime {
return httptime(time+$cfg{refresh});
}
# Calculate Last-Modified: timestamp out of a SMB timestamp
sub lmtime {
my $timestring = $_[0];
my %month = (
Jan => 0, Feb => 1, Mar => 2,
Apr => 3, May => 4, Jun => 5,
Jul => 6, Aug => 7, Sep => 8,
Oct => 9, Nov =>10, Dec =>11
);
my $time;
if ( $timestring =~ /^\w+ (\w+)[ ]+(\w+) (\w+):(\w+):(\w+) (\w+)/ ){
$time = timelocal ($5,$4,$3,$2,$month{$1},$6);
}
return $time; # Now put this into httptime
}
# Make a HTTP/1.1 certified timestamp out of a UNIX timestamp.
sub httptime {
my $time = $_[0];
my @days = qw (Sun Mon Tue Wed Thu Fri Sat);
my @months = qw (Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec);
my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$istdst) = gmtime($time);
my $realyear;
if ($year < 70) {
$realyear = "20$year";
} else {
$realyear = "19$year";
}
return sprintf ("%s, %02d %s %s %02d:%02d:%02d GMT",
$days[$wday],$mday,$months[$mon],$realyear,$hour,$min,$sec);
}
# Starting a page
sub header {
my $exp = expiretime;
print << "EOF";
Cache-Control: $cfg{cache}
Expires: $exp
Content-type: text/html
$_[0]
EOF
if (not $_[1] =~ /norefresh/ ) {
print "\n";
}
print << "EOF";
$_[0]
EOF
};
# Finishing the page
sub trailer {
my $help = href("$cfg{cgiroot}/smbhelp.pl", image ($cfg{icon_help},"Help")."