OXIESEC PANEL
- Current Dir:
/
/
home
/
cubot
/
docroot
/
cubcgi
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
02/03/2023 07:42:40 AM
rwxrwxr-x
📄
admmenu.pl
4.98 KB
08/14/2022 11:11:57 AM
rw-r--r--
📄
common.pl
11.84 KB
08/14/2022 11:11:57 AM
rw-r--r--
📄
config.pl
1.13 KB
08/14/2022 11:11:57 AM
rw-r--r--
📄
cubhealth.cgi
2.81 KB
08/14/2022 11:11:57 AM
rwxr-xr-x
📄
download.cgi
1.02 KB
08/14/2022 11:11:57 AM
rwxr-xr-x
📄
forms.pl
4.53 KB
08/14/2022 11:11:57 AM
rw-r--r--
📄
func.pl
3.08 KB
08/14/2022 11:11:57 AM
rw-r--r--
📄
libhtml.pl
4.05 KB
08/14/2022 11:11:57 AM
rw-r--r--
📄
libtest.pl
1.45 KB
08/14/2022 11:11:57 AM
rw-r--r--
📄
test.cgi
255 bytes
08/14/2022 11:11:57 AM
rwxr-xr-x
📄
tips.cgi
2.08 KB
08/14/2022 11:11:57 AM
rwxr-xr-x
Editing: cubhealth.cgi
Close
#!/usr/bin/perl use CGI; use CGI::Carp qw(fatalsToBrowser carpout); $qry = new CGI; %cubconfvars; $ENV{'LD_ASSUME_KERNEL'}=2.4; $CUBOT_HOME="/home/cubot/"; $cubconfvars{'CUBOT_HOME'} = $CUBOT_HOME; if($CUBOT_HOME eq ''){ &cubhomeerr(); exit; } &getcubotconf(); $CUBCGI_HOME="$cubconfvars{'DocRoot'}/cubcgi"; require "$CUBCGI_HOME/libhtml.pl"; &cubhead(); if($cubconfvars{'ED_DIR'} eq ''){ errmsg("Cubot.Conf not found in $CUBOT_HOME/conf/ or ED_DIR missing") ; printfoot(); exit; } $CONFDIR="$cubconfvars{'DocRoot'}/edash/$cubconfvars{'ED_DB'}/cubsys/"; require "$CUBCGI_HOME/config.pl"; require "$CUBCGI_HOME/func.pl"; require "$CUBCGI_HOME/forms.pl"; require "$CUBCGI_HOME/common.pl"; require "$CUBCGI_HOME/admmenu.pl"; require "$CUBCGI_HOME/libtest.pl"; ############################################ #Qrystr($qry); ############################################ main_css(); dash_css(); sortabletable_css(); if($qry->param('page') eq ''){ &healthform($qry); } elsif($qry->param('page') eq 'LOGIN' && $qry->param('cmd') eq 'Login'){ my %confvars; config(\%confvars); if ($qry->param('txtpass') eq $confvars{'ADMPASS'}){ # Admin # $ses=create_session(); my $sesfile = "$CONFDIR/session/CUB_".$ses; if(-e $sesfile){ &adminform($qry, $ses); } else{ errmsg("Error : Connection Out or Session Expired."); } } else{ $qry->append('auth', 'fail'); &healthform($qry); } } elsif($qry->param('cmd') eq 'Logout'){ my $session = $qry->param('Session'); my $sesfile = "$CONFDIR/session/CUB_".$session; &delete_session($sesfile); infomsg("Successfully Logged Out."); &healthform($qry); } elsif($qry->param('page') eq 'ADMFORM'){ my $ses = $qry->param('Session'); my $sesfile = "$CONFDIR/session/CUB_".$ses; if(!-e $sesfile){ errmsg("Error : Connection Out or Session Expired($sesfile)"); &healthform($qry); exit; } open(SESS, $sesfile); while(<SESS>){ chomp($_); next if($_ =~ /^#/); my $line = $_; my @arg = split(/,/ ,$line); $cur_sess{@arg[0]}=@arg[2]; } close(SESS ); if(exists $cur_sess{$qry->param('op')}){ #print $qry->param('op'), "<BR>Valid Command Fired !!", $cur_sess{$qry->param('op')}; my $menufun=$cur_sess{$qry->param('op')}; &adminform($qry, $ses, $menufun, $qry->param('op')); } else{ errmsg("Invalid Command !<BR>"); &adminform($qry, $ses); } } #html("</fieldset>"); #Qrystr($qry); ############################################ printfoot($qry); sub getcubotconf{ open(CUBCONF, "$CUBOT_HOME/conf/cubot.conf") or return; while(<CUBCONF>){ next if($_ =~ /^#/ || length($_) < 2 || $_ =~ /^\s+/); my @arr = split(/\s+/, $_); $cubconfvars{@arr[0]} = @arr[1]; } close(CUBCONF); } sub cubhomeerr{ print $qry->header; print $qry->start_html("CUBOT Health Page"), "\n"; print "<HR><<H3>Cubot Home Not Set</H3>"; print $qry->end_html, "\n"; } exit;