#!/usr/local/bin/perl ########################################################################### # Customize this section - This file should also be read protected. # This file should be readable by the http (nobody) group. # This security mechanism is kind of lame, but better than nothing. # Feel free to modify this script for better security implementation. # $users{'szeto'} = "iisiis"; $users{'ichen'} = "amy.opm"; $users{'kuno'} = "harumi.opm"; $users{'kosky'} = "anthony.opm"; $users{'markowitz'} = "victor.opm"; $users{'shoshani'} = "arie.opm"; $users{'bunton'} = "bunton"; # # Gateway home: this directory. #$gwHome = "/a/gizmo/home/gizmo/disk1/szeto/jopmCgi"; $gwHome = "/star/u2c/yepes/opm/jopmCgi"; # ############################################################################ # Location of .so .pl files and binaries # require "getcwd.pl"; #$gwHome = &getcwd (); $ENV{'PATH'} .= ':' . $gwHome; push (@INC, $gwHome); require "cgi-lib.pl"; require "wutil.pl"; &ReadParse; print "Content-type: text/plain\n\n"; #&showInput (); if (!defined ($in{'user'})) { &gwFatal ("ERROR: user arg not defined\n"); } if (!defined ($in{'pw'})) { &gwFatal ("ERROR: pw arg not defined\n"); } $remoteHost = $ENV{'REMOTE_HOST'}; $server = $in{'server'}; $db = $in{'db'}; $user = $in{'user'}; $pw = $in{'pw'}; $cmd = "uncrip '$pw' 'JCmiT6H7n4VEk' |"; open (F, $cmd) || &gwFatal ("cannot open '$cmd'\n"); $pw = ""; while ($line = ) { $pw .= $line . "\n"; } $pw2 = $users{$user}; if (&blankStr ($pw)) { print "ERROR: login failure\n"; return; } if (&strTrim($pw) ne $pw2) { print "ERROR: login failure\n"; } else { print "$user\n"; $tmpFile = "/tmp/${user}4${db}\@${remoteHost}"; $st = system ("date > $tmpFile"); } exit 0;