netpass-devel Mailing List for NetPass (Page 11)
Brought to you by:
jeffmurphy
You can subscribe to this list here.
2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2005 |
Jan
|
Feb
|
Mar
|
Apr
(39) |
May
(103) |
Jun
(89) |
Jul
(22) |
Aug
(100) |
Sep
(21) |
Oct
(5) |
Nov
|
Dec
(7) |
2006 |
Jan
(25) |
Feb
(8) |
Mar
(12) |
Apr
(2) |
May
|
Jun
(1) |
Jul
(4) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(4) |
2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(3) |
Sep
(1) |
Oct
|
Nov
|
Dec
|
From: Matt <mt...@us...> - 2005-06-08 12:17:45
|
Update of /cvsroot/netpass/NetPass In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24020 Modified Files: MANIFEST Log Message: Index: MANIFEST =================================================================== RCS file: /cvsroot/netpass/NetPass/MANIFEST,v retrieving revision 1.46 retrieving revision 1.47 diff -u -d -r1.46 -r1.47 --- MANIFEST 8 Jun 2005 00:15:01 -0000 1.46 +++ MANIFEST 8 Jun 2005 12:17:29 -0000 1.47 @@ -146,14 +146,17 @@ lib/SNMP/driver3.pl lib/NetPass.pm lib/RUNONCE.pm -www/components/Admin/FormNPApi +www/components/Admin/FormNPPolicy www/components/Admin/Login www/components/Admin/MemberOf www/components/Admin/LockConfig www/components/Admin/TableEditPolicy www/components/Admin/FormAuthLDAP www/components/Admin/FormAuthRadius +www/components/Admin/FormNPApi www/components/Admin/FormNPSnort +www/components/Admin/FormNPNessus +www/components/Admin/FormNPDb www/components/Client/BeginScan www/components/Client/GetInfo www/components/Client/Login |
From: Matt <mt...@us...> - 2005-06-08 12:17:18
|
Update of /cvsroot/netpass/NetPass/www/components/Admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23843 Modified Files: FormNPSnort Log Message: Index: FormNPSnort =================================================================== RCS file: /cvsroot/netpass/NetPass/www/components/Admin/FormNPSnort,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- FormNPSnort 8 Jun 2005 02:57:21 -0000 1.2 +++ FormNPSnort 8 Jun 2005 12:17:05 -0000 1.3 @@ -52,7 +52,6 @@ } } } - $np->cfg->save(-user => $m->session->{'username'}); } sub getsnortvalue { @@ -103,7 +102,7 @@ <TR> <TD CLASS="gray" ALIGN=center>Sensor</TD> <TD CLASS="gray" ALIGN=center>Port</TD> -<TD CLASS="gray" ALIGN=center>ro/rw</TD> +<TD CLASS="gray" ALIGN=center>Mode</TD> <TD CLASS="gray" ALIGN=center>Action</TD> </TR> |
From: Matt <mt...@us...> - 2005-06-08 12:12:38
|
Update of /cvsroot/netpass/NetPass/www/htdocs/Admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21682 Modified Files: gencfg.mhtml Log Message: Index: gencfg.mhtml =================================================================== RCS file: /cvsroot/netpass/NetPass/www/htdocs/Admin/gencfg.mhtml,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- gencfg.mhtml 8 Jun 2005 02:38:49 -0000 1.17 +++ gencfg.mhtml 8 Jun 2005 12:12:26 -0000 1.18 @@ -34,43 +34,6 @@ return; } -my $restartnetpass = 0; -my $restartnessus = 0; -my $restarthttpd = 0; - -if ($submit eq 'Commit Changes') { - foreach my $ak ( keys %ARGS ) { - if ($ak =~ /^(\S+):(\S+)$/) { - my $section = $1; - my $var = $2; - - if ($section eq "policy") { - if ($var =~ /^PID_DIR|BASE_DIR$/) { - $restartnetpass = 1; - $restarthttpd = 1; - } - $np->cfg->policy(-key => $var, -val => $ARGS{$ak}); - } - - elsif ($section eq "nessus") { - $np->cfg->policy(-key => $var, -val => $ARGS{$ak}); - $restartnessus = 1; - } - - elsif ($section eq "database") { - $np->cfg->policy(-key => $var, -val => $ARGS{$ak}); - $restartnetpass = 1; - } - } - } - - $np->db->reqAppAction('nessusd', 'restart', '') if ($restartnessus); - $np->db->reqAppAction('netpass', 'restart', '') if ($restartnetpass); - $np->db->reqAppAction('httpd', 'restart', '') if ($restarthttpd); - - $np->cfg->save(-user => $m->session->{'username'}); -} - print $q->start_form(-method => "POST"); </%perl> @@ -81,349 +44,17 @@ % $m->comp('/Admin/LockConfig', 'enableWhenLocked' => 'submitButton'); - -<TABLE WIDTH=800 ID="policyConfig" class="expandable" CELLSPACING=2 CELLPADDING=2> -<THEAD> -<TR><TH onclick="showHideObj2(getElementById('policyConfig').tBodies[0]);" COLSPAN=2>General (Global)</TH></TR> -</THEAD> -<TBODY> -<TR> -<TD CLASS='left'>MULTI_MAC</TD> -<TD CLASS='right' > - -<%$q->popup_menu ( - -name => 'policy:MULTI_MAC', - -values => ['ALL_OK', 'ONE_OK', 'DISALLOWED'], - -default => $np->cfg->policy(-key => 'MULTI_MAC'), - )%> -<!--<a href="help.mhtml?printable=1&topic=MULTI_MAC" target='new' style='align:right;'>?</a>--> -</TD></TR> -<TR> -<TD CLASS='left'>Strikes</TD> -<TD CLASS='right'> -<%$q->textfield ( - -name => 'policy:STRIKES', - -value => $np->cfg->policy(-key => 'STRIKES'), - -size => 3, - )%> -</TD></TR> - -<TR> -<TD CLASS='left'>Disable Strikes For Manual Quarantine</TD> -<TD CLASS='right'> -<%$q->radio_group ( - -name => 'policy:NO_STRIKES_FOR_MANUAL', - -values => [ 'Yes', 'No' ], - -default => $np->cfg->policy(-key => 'NO_STRIKES_FOR_MANUAL' ) ? "Yes" : "No", - -size => 3, - )%> -</TD> -</TR> - -<TR> -<TD CLASS='left'>Disable Strikes For Snort Quarantine</TD> -<TD CLASS='right'> -<%$q->radio_group ( - -name => 'policy:NO_STRIKES_FOR_SNORT', - -values => [ 'Yes', 'No' ], - -default => $np->cfg->policy(-key => 'NO_STRIKES_FOR_SNORT' ) ? "Yes" : "No", - -size => 3, - )%> -</TD> -</TR> - -<TR> -<TD CLASS='left'>Disable Strikes For Nessus Quarantine</TD> -<TD CLASS='right'> -<%$q->radio_group ( - -name => 'policy:NO_STRIKES_FOR_NESSUS', - -values => [ 'Yes', 'No' ], - -default => $np->cfg->policy(-key => 'NO_STRIKES_FOR_NESSUS' ) ? "Yes" : "No", - -size => 3, - )%> -</TD> -</TR> - -<TR> -<TD CLASS='left'>RESULTS_DISPLAY</TD> -<TD CLASS='right'> -<%$q->popup_menu ( - -name => 'policy:RESULTS_DISPLAY', - -values => ['INLINE', 'POPUP'], - -default => $np->cfg->policy(-key => 'RESULTS_DISPLAY'), - )%> -</TD></TR> -<TR> -<TD CLASS='left'>RESULTS_EXPAND</TD> -<TD CLASS='right'> -<%$q->textfield ( - -name => 'policy:RESULTS_EXPAND', - -value => $np->cfg->policy(-key => 'RESULTS_EXPAND'), - -size => 3, - )%> -</TD></TR> -<TR> -<TD CLASS='left'>AUTO_REDIRECT</TD> -<TD CLASS='right'> -<%$q->radio_group ( - -name => 'policy:AUTO_REDIRECT', - -values => ['Yes', 'No'], - -default => ($np->cfg->policy(-key => 'AUTO_REDIRECT')) ? 'Yes' : 'No', - )%> -</TD></TR> -<TR> -<TD CLASS='left'>COOKIE_DETECT</TD> -<TD CLASS='right'> -<%$q->radio_group ( - -name => 'policy:COOKIE_DETECT', - -values => ['Yes', 'No'], - -default => ($np->cfg->policy(-key => 'COOKIE_DETECT')) ? 'Yes' : 'No', - )%> -</TD></TR> -<TR> -<TD CLASS='left'>COOKIE_NAME</TD> -<TD CLASS='right'> -<%$q->textfield ( - -name => 'policy:COOKIE_NAME', - -value => $np->cfg->policy(-key => 'COOKIE_NAME'), - -size => 25, - )%> -</TD></TR> -<TR> -<TD CLASS='left'>REDIR_URL_DEFAULT</TD> -<TD CLASS='right'> -<%$q->textfield ( - -name => 'policy:REDIR_URL_DEFAULT', - -value => $np->cfg->policy(-key => 'REDIR_URL_DEFAULT'), - -size => 25, - )%> -</TD></TR> -<TR> -<TD CLASS='left'>SURVEY_ENABLED</TD> -<TD CLASS='right'> -<%$q->radio_group ( - -name => 'policy:SURVEY_ENABLED', - -values => ['Yes', 'No'], - -default => ($np->cfg->policy(-key => 'SURVEY_ENABLED')) ? 'Yes' : 'No', - )%> -</TD></TR> -<TR> -<TD CLASS='left'>SURVEY_EMAIL</TD> -<TD CLASS='right'> -<%$q->textfield ( - -name => 'policy:SURVEY_EMAIL', - -value => $np->cfg->policy(-key => 'SURVEY_EMAIL'), - -size => 25, - )%> -</TD></TR> -<TR> -<TD CLASS='left'>PID_DIR</TD> -<TD CLASS='right'> -<%$q->textfield ( - -name => 'policy:PID_DIR', - -value => $np->cfg->policy(-key => 'PID_DIR'), - -size => 25, - )%> -</TD></TR> -<TR> -<TD CLASS='left'>BASE_DIR</TD> -<TD CLASS='right'> -<%$q->textfield ( - -name => 'policy:BASE_DIR', - -value => $np->cfg->policy(-key => 'BASE_DIR'), - -size => 25, - )%> -</TD></TR> -<TR> -<TD CLASS='left'>PORT_SEARCH_ALGO</TD> -<TD CLASS='right'> -<%$q->popup_menu ( - -name => 'policy:PORT_SEARCH_ALGO', - -values => ['LINEAR', 'TREE'], - -default => $np->cfg->policy(-key => 'PORT_SEARCH_ALGO'), - )%> -</TD></TR> -<TR> -<TD CLASS='left'>PORT_CACHE</TD> -<TD CLASS='right'> -<%$q->popup_menu ( - -name => 'policy:PORT_CACHE', - -values => ['ON', 'OFF'], - -default => ($np->cfg->policy(-key => 'PORT_CACHE')) ? 'ON' : 'OFF', - )%> -</TD></TR> -<TR> -<TD CLASS='left'>UNQUAR_ON_LINKUP</TD> -<TD CLASS='right'> -<%$q->popup_menu ( - -name => 'policy:UNQUAR_ON_LINKUP', - -values => ['ON', 'OFF', 'ITDEPENDS'], - -default => ($np->cfg->policy(-key => 'UNQUAR_ON_LINKUP') eq - 'ITDEPENDS') ? 'ITDEPENDS' : - ($np->cfg->policy(-key => 'UNQUAR_ON_LINKUP')) ? - 'ON' : 'OFF', - )%> -</TD></TR> -<TR> -<TD CLASS='left'>Enable ResetPort?</TD> -<TD CLASS='right'> -<%$q->popup_menu ( - -name => 'policy:resetport', - -values => ['on', 'off'], - -default => ($np->cfg->policy(-key => 'resetport')) ? 'on': 'off', - )%> -</TD></TR> -<TR> -<TD CLASS='left'>ResetPort Link Flap Tolerance</TD> -<TD CLASS='right'> -<%$q->textfield ( - -name => 'policy:linkflap_tolerance', - -values => $np->cfg->policy(-key => 'linkflap_tolerance'), - -size => 5 - )%> seconds -</TD></TR> -<TR> -<TD CLASS='left'>Enable MacScan?</TD> -<TD CLASS='right'> -<%$q->popup_menu ( - -name => 'policy:macscan', - -values => ['on', 'off'], - -default => ($np->cfg->policy(-key => 'macscan')) ? 'on': 'off', - )%> -</TD></TR> -<TR> -<TD CLASS='left'>Require Nessus to register?</TD> -<TD CLASS='right'> -<%$q->popup_menu ( - -name => 'policy:nessus', - -values => ['on', 'off'], - -default => ($np->cfg->policy(-key => 'nessus')) ? 'on': 'off', - )%> -</TD></TR> -<TR> -<TD CLASS='left'>LDAP Query URL</TD> -<TD CLASS='right'> -<%$q->textfield ( - -name => 'policy:LDAP_USER_QUERY', - -value => $np->cfg->policy(-key => 'LDAP_USER_QUERY'), - -size => 25, - )%> -</TD></TR> -<TR> -<TD CLASS='left'>LDAP Popup Width</TD> -<TD CLASS='right'> -<%$q->textfield ( - -name => 'policy:LDAP_POPUP_WIDTH', - -value => $np->cfg->policy(-key => 'LDAP_POPUP_WIDTH'), - -size => 5, - )%> -</TD></TR> -<TR> -<TD CLASS='left'>LDAP Popup Height</TD> -<TD CLASS='right'> -<%$q->textfield ( - -name => 'policy:LDAP_POPUP_HEIGHT', - -value => $np->cfg->policy(-key => 'LDAP_POPUP_HEIGHT'), - -size => 5, - )%> -</TD></TR> -<TR> -<TD CLASS='left'>Username Prompt</TD> -<TD CLASS='right'> -<%$q->textfield ( - -name => 'policy:USERNAME_PROMPT', - -value => $np->cfg->policy(-key => 'USERNAME_PROMPT'), - -size => 25, - )%> -</TD></TR> -<TR> -<TD CLASS='left'>Password Prompt</TD> -<TD CLASS='right'> -<%$q->textfield ( - -name => 'policy:PASSWORD_PROMPT', - -value => $np->cfg->policy(-key => 'PASSWORD_PROMPT'), - -size => 25, - )%> -</TD></TR> -<TR> -<TD CLASS='left'>Company Name</TD> -<TD CLASS='right'> -<%$q->textfield ( - -name => 'policy:COMPANY_NAME', - -value => $np->cfg->policy(-key => 'COMPANY_NAME'), - -size => 25, - )%> -</TD></TR> -<TR> -<TD CLASS='left'>Company Abbreviation</TD> -<TD CLASS='right'> -<%$q->textfield ( - -name => 'policy:COMPANY_SHORT_NAME', - -value => $np->cfg->policy(-key => 'COMPANY_SHORT_NAME'), - -size => 25, - )%> -</TD></TR> -<TR> -<TD CLASS='left'>Organization Name</TD> -<TD CLASS='right'> -<%$q->textfield ( - -name => 'policy:COMPANY_UNIT_NAME', - -value => $np->cfg->policy(-key => 'COMPANY_UNIT_NAME'), - -size => 25, - )%> -</TD></TR> -<TR> -<TD CLASS='left'>Example IP Address</TD> -<TD CLASS='right'> -<%$q->textfield ( - -name => 'policy:EXAMPLE_IPADDR', - -value => $np->cfg->policy(-key => 'EXAMPLE_IPADDR'), - -size => 16, - )%> -</TD></TR> - -</TBODY></TABLE> -<BR> - - -<TABLE WIDTH=800 class="expandable" ID="nessusConfig" CELLSPACING=2 CELLPADDING=2> -<THEAD> -<TR><TH onclick="showHideObj2(getElementById('nessusConfig').tBodies[0]);" COLSPAN=2>Nessus</TH></TR> -</THEAD> -<TBODY> -<TR><TD CLASS='left'>Base_Dir</TD><TD CLASS='right'><input type="text" name="nessus:base_dir" value="<%$np->cfg->nessus(-key => 'BASE_DIR')%>" size="25" /></TD></TR> -<TR><TD CLASS='left'>Host</TD><TD CLASS='right'><input type="text" name="nessus:host" value="<%$np->cfg->nessus(-key => 'host')%>" size="25" /></TD></TR> -<TR><TD CLASS='left'>Username</TD><TD CLASS='right'><input type="text" name="nessus:username" value="<%$np->cfg->nessus(-key => 'username')%>" size="25" /></TD></TR> -<TR><TD CLASS='left'>Password</TD><TD CLASS='right'><input type="text" name="nessus:password" value="<%$np->cfg->nessus(-key => 'password')%>" size="25" /></TD></TR> -<TR><TD CLASS='left'>Port</TD><TD CLASS='right'><input type="text" name="nessus:port" value="<%$np->cfg->nessus(-key => 'port')%>" size="25" /></TD></TR> -<TR><TD CLASS='left'>When_down</TD><TD CLASS='right'><%$q->radio_group(-name => 'nessus:WHEN_DOWN', -default=>$np->cfg->nessus(-key => 'WHEN_DOWN'), -values => ['OK','FAIL'])%></TD></TR> -</TBODY> -</TABLE> -<BR> - -% $m->comp('/Admin/FormNPSnort', 'submit' => $submit, 'network' => "", %ARGS); -% $m->comp('/Admin/FormNPApi', 'submit' => $submit, %ARGS); - -<TABLE WIDTH=800 CLASS="expandable" ID="databaseConfig" CELLSPACING=2 CELLPADDING=2> -<THEAD> -<TR><TH ONCLICK="showHideObj2(getElementById('databaseConfig').tBodies[0]);" COLSPAN=2>Database</TH></TR> -</THEAD> -<TBODY> <%perl> +$m->comp('/Admin/FormNPPolicy', 'submit' => $submit, %ARGS); +$m->comp('/Admin/FormNPNessus', 'submit' => $submit, %ARGS); +$m->comp('/Admin/FormNPSnort', 'submit' => $submit, 'network' => "", %ARGS); +$m->comp('/Admin/FormNPApi', 'submit' => $submit, %ARGS); +$m->comp('/Admin/FormNPDb', 'submit' => $submit, %ARGS); -foreach my $d (sort $np->cfg->{'cfg'}->keys('database')) { - print "<TR>"; - print "<TD CLASS='left'>$d</TD>"; - print "<TD CLASS='right'>"; - print $q->textfield ( - -name => "database:$d", - -value => $np->cfg->{'cfg'}->obj('database')->value($d), - -size => 25 , - ); - print "</TD></TR>"; +if ($submit eq 'Commit Changes') { + $np->cfg->save(-user => $m->session->{'username'}); } -print "</TBODY></TABLE>"; print $q->end_form(); </%perl> |
From: Matt <mt...@us...> - 2005-06-08 12:12:21
|
Update of /cvsroot/netpass/NetPass/www/components/Admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21480 Added Files: FormNPPolicy Log Message: --- NEW FILE: FormNPPolicy --- <%doc> </%doc> <%args> $submit => ''; </%args> <%perl> my $restartnetpass = 0; my $restarthttpd = 0; if ($submit eq 'Commit Changes') { foreach my $ak ( keys %ARGS ) { if ($ak =~ /^(\S+):(\S+)$/) { my $section = $1; my $var = $2; if ($section eq "policy") { if ($var =~ /^PID_DIR|BASE_DIR$/) { $restartnetpass = 1; $restarthttpd = 1; } $np->cfg->policy(-key => $var, -val => $ARGS{$ak}); } } } $np->db->reqAppAction('netpass', 'restart', '') if ($restartnetpass); $np->db->reqAppAction('httpd', 'restart', '') if ($restarthttpd); } </%perl> <TABLE WIDTH=800 ID="policyConfig" class="expandable" CELLSPACING=2 CELLPADDING=2> <THEAD> <TR><TH onclick="showHideObj2(getElementById('policyConfig').tBodies[0]);" COLSPAN=2>General (Global)</TH></TR> </THEAD> <TBODY> <TR> <TD CLASS='left'>MULTI_MAC</TD> <TD CLASS='right' > <%$q->popup_menu ( -name => 'policy:MULTI_MAC', -values => ['ALL_OK', 'ONE_OK', 'DISALLOWED'], -default => $np->cfg->policy(-key => 'MULTI_MAC'), )%> <!--<a href="help.mhtml?printable=1&topic=MULTI_MAC" target='new' style='align:right;'>?</a>--> </TD></TR> <TR> <TD CLASS='left'>Strikes</TD> <TD CLASS='right'> <%$q->textfield ( -name => 'policy:STRIKES', -value => $np->cfg->policy(-key => 'STRIKES'), -size => 3, )%> </TD></TR> <TR> <TD CLASS='left'>Disable Strikes For Manual Quarantine</TD> <TD CLASS='right'> <%$q->radio_group ( -name => 'policy:NO_STRIKES_FOR_MANUAL', -values => [ 'Yes', 'No' ], -default => $np->cfg->policy(-key => 'NO_STRIKES_FOR_MANUAL' ) ? "Yes" : "No", -size => 3, )%> </TD> </TR> <TR> <TD CLASS='left'>Disable Strikes For Snort Quarantine</TD> <TD CLASS='right'> <%$q->radio_group ( -name => 'policy:NO_STRIKES_FOR_SNORT', -values => [ 'Yes', 'No' ], -default => $np->cfg->policy(-key => 'NO_STRIKES_FOR_SNORT' ) ? "Yes" : "No", -size => 3, )%> </TD> </TR> <TR> <TD CLASS='left'>Disable Strikes For Nessus Quarantine</TD> <TD CLASS='right'> <%$q->radio_group ( -name => 'policy:NO_STRIKES_FOR_NESSUS', -values => [ 'Yes', 'No' ], -default => $np->cfg->policy(-key => 'NO_STRIKES_FOR_NESSUS' ) ? "Yes" : "No", -size => 3, )%> </TD> </TR> <TR> <TD CLASS='left'>RESULTS_DISPLAY</TD> <TD CLASS='right'> <%$q->popup_menu ( -name => 'policy:RESULTS_DISPLAY', -values => ['INLINE', 'POPUP'], -default => $np->cfg->policy(-key => 'RESULTS_DISPLAY'), )%> </TD></TR> <TR> <TD CLASS='left'>RESULTS_EXPAND</TD> <TD CLASS='right'> <%$q->textfield ( -name => 'policy:RESULTS_EXPAND', -value => $np->cfg->policy(-key => 'RESULTS_EXPAND'), -size => 3, )%> </TD></TR> <TR> <TD CLASS='left'>AUTO_REDIRECT</TD> <TD CLASS='right'> <%$q->radio_group ( -name => 'policy:AUTO_REDIRECT', -values => ['Yes', 'No'], -default => ($np->cfg->policy(-key => 'AUTO_REDIRECT')) ? 'Yes' : 'No', )%> </TD></TR> <TR> <TD CLASS='left'>COOKIE_DETECT</TD> <TD CLASS='right'> <%$q->radio_group ( -name => 'policy:COOKIE_DETECT', -values => ['Yes', 'No'], -default => ($np->cfg->policy(-key => 'COOKIE_DETECT')) ? 'Yes' : 'No', )%> </TD></TR> <TR> <TD CLASS='left'>COOKIE_NAME</TD> <TD CLASS='right'> <%$q->textfield ( -name => 'policy:COOKIE_NAME', -value => $np->cfg->policy(-key => 'COOKIE_NAME'), -size => 25, )%> </TD></TR> <TR> <TD CLASS='left'>REDIR_URL_DEFAULT</TD> <TD CLASS='right'> <%$q->textfield ( -name => 'policy:REDIR_URL_DEFAULT', -value => $np->cfg->policy(-key => 'REDIR_URL_DEFAULT'), -size => 25, )%> </TD></TR> <TR> <TD CLASS='left'>SURVEY_ENABLED</TD> <TD CLASS='right'> <%$q->radio_group ( -name => 'policy:SURVEY_ENABLED', -values => ['Yes', 'No'], -default => ($np->cfg->policy(-key => 'SURVEY_ENABLED')) ? 'Yes' : 'No', )%> </TD></TR> <TR> <TD CLASS='left'>SURVEY_EMAIL</TD> <TD CLASS='right'> <%$q->textfield ( -name => 'policy:SURVEY_EMAIL', -value => $np->cfg->policy(-key => 'SURVEY_EMAIL'), -size => 25, )%> </TD></TR> <TR> <TD CLASS='left'>PID_DIR</TD> <TD CLASS='right'> <%$q->textfield ( -name => 'policy:PID_DIR', -value => $np->cfg->policy(-key => 'PID_DIR'), -size => 25, )%> </TD></TR> <TR> <TD CLASS='left'>BASE_DIR</TD> <TD CLASS='right'> <%$q->textfield ( -name => 'policy:BASE_DIR', -value => $np->cfg->policy(-key => 'BASE_DIR'), -size => 25, )%> </TD></TR> <TR> <TD CLASS='left'>PORT_SEARCH_ALGO</TD> <TD CLASS='right'> <%$q->popup_menu ( -name => 'policy:PORT_SEARCH_ALGO', -values => ['LINEAR', 'TREE'], -default => $np->cfg->policy(-key => 'PORT_SEARCH_ALGO'), )%> </TD></TR> <TR> <TD CLASS='left'>PORT_CACHE</TD> <TD CLASS='right'> <%$q->popup_menu ( -name => 'policy:PORT_CACHE', -values => ['ON', 'OFF'], -default => ($np->cfg->policy(-key => 'PORT_CACHE')) ? 'ON' : 'OFF', )%> </TD></TR> <TR> <TD CLASS='left'>UNQUAR_ON_LINKUP</TD> <TD CLASS='right'> <%$q->popup_menu ( -name => 'policy:UNQUAR_ON_LINKUP', -values => ['ON', 'OFF', 'ITDEPENDS'], -default => ($np->cfg->policy(-key => 'UNQUAR_ON_LINKUP') eq 'ITDEPENDS') ? 'ITDEPENDS' : ($np->cfg->policy(-key => 'UNQUAR_ON_LINKUP')) ? 'ON' : 'OFF', )%> </TD></TR> <TR> <TD CLASS='left'>Enable ResetPort?</TD> <TD CLASS='right'> <%$q->popup_menu ( -name => 'policy:resetport', -values => ['on', 'off'], -default => ($np->cfg->policy(-key => 'resetport')) ? 'on': 'off', )%> </TD></TR> <TR> <TD CLASS='left'>ResetPort Link Flap Tolerance</TD> <TD CLASS='right'> <%$q->textfield ( -name => 'policy:linkflap_tolerance', -values => $np->cfg->policy(-key => 'linkflap_tolerance'), -size => 5 )%> seconds </TD></TR> <TR> <TD CLASS='left'>Enable MacScan?</TD> <TD CLASS='right'> <%$q->popup_menu ( -name => 'policy:macscan', -values => ['on', 'off'], -default => ($np->cfg->policy(-key => 'macscan')) ? 'on': 'off', )%> </TD></TR> <TR> <TD CLASS='left'>Require Nessus to register?</TD> <TD CLASS='right'> <%$q->popup_menu ( -name => 'policy:nessus', -values => ['on', 'off'], -default => ($np->cfg->policy(-key => 'nessus')) ? 'on': 'off', )%> </TD></TR> <TR> <TD CLASS='left'>LDAP Query URL</TD> <TD CLASS='right'> <%$q->textfield ( -name => 'policy:LDAP_USER_QUERY', -value => $np->cfg->policy(-key => 'LDAP_USER_QUERY'), -size => 25, )%> </TD></TR> <TR> <TD CLASS='left'>LDAP Popup Width</TD> <TD CLASS='right'> <%$q->textfield ( -name => 'policy:LDAP_POPUP_WIDTH', -value => $np->cfg->policy(-key => 'LDAP_POPUP_WIDTH'), -size => 5, )%> </TD></TR> <TR> <TD CLASS='left'>LDAP Popup Height</TD> <TD CLASS='right'> <%$q->textfield ( -name => 'policy:LDAP_POPUP_HEIGHT', -value => $np->cfg->policy(-key => 'LDAP_POPUP_HEIGHT'), -size => 5, )%> </TD></TR> <TR> <TD CLASS='left'>Username Prompt</TD> <TD CLASS='right'> <%$q->textfield ( -name => 'policy:USERNAME_PROMPT', -value => $np->cfg->policy(-key => 'USERNAME_PROMPT'), -size => 25, )%> </TD></TR> <TR> <TD CLASS='left'>Password Prompt</TD> <TD CLASS='right'> <%$q->textfield ( -name => 'policy:PASSWORD_PROMPT', -value => $np->cfg->policy(-key => 'PASSWORD_PROMPT'), -size => 25, )%> </TD></TR> <TR> <TD CLASS='left'>Company Name</TD> <TD CLASS='right'> <%$q->textfield ( -name => 'policy:COMPANY_NAME', -value => $np->cfg->policy(-key => 'COMPANY_NAME'), -size => 25, )%> </TD></TR> <TR> <TD CLASS='left'>Company Abbreviation</TD> <TD CLASS='right'> <%$q->textfield ( -name => 'policy:COMPANY_SHORT_NAME', -value => $np->cfg->policy(-key => 'COMPANY_SHORT_NAME'), -size => 25, )%> </TD></TR> <TR> <TD CLASS='left'>Organization Name</TD> <TD CLASS='right'> <%$q->textfield ( -name => 'policy:COMPANY_UNIT_NAME', -value => $np->cfg->policy(-key => 'COMPANY_UNIT_NAME'), -size => 25, )%> </TD></TR> <TR> <TD CLASS='left'>Example IP Address</TD> <TD CLASS='right'> <%$q->textfield ( -name => 'policy:EXAMPLE_IPADDR', -value => $np->cfg->policy(-key => 'EXAMPLE_IPADDR'), -size => 16, )%> </TD></TR> </TBODY></TABLE> <BR> |
From: Matt <mt...@us...> - 2005-06-08 12:11:54
|
Update of /cvsroot/netpass/NetPass/www/components/Admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21232 Added Files: FormNPNessus Log Message: --- NEW FILE: FormNPNessus --- <%doc> </%doc> <%args> $submit => ''; </%args> <%perl> my $restartnessus = 0; if ($submit eq 'Commit Changes') { foreach my $ak ( keys %ARGS ) { if ($ak =~ /^(\S+):(\S+)$/) { my $section = $1; my $var = $2; if ($section eq "nessus") { $np->cfg->nessus(-key => $var, -val => $ARGS{$ak}); $restartnessus = 1; } } } $np->db->reqAppAction('nessusd', 'restart', '') if ($restartnessus); } </%perl> <TABLE WIDTH=800 class="expandable" ID="nessusConfig" CELLSPACING=2 CELLPADDING=2> <THEAD> <TR><TH onclick="showHideObj2(getElementById('nessusConfig').tBodies[0]);" COLSPAN=2>Nessus</TH></TR> </THEAD> <TBODY> <TR><TD CLASS='left'>Base_Dir</TD><TD CLASS='right'><input type="text" name="nessus:base_dir" value="<%$np->cfg->nessus(-key => 'BASE_DIR')%>" size="25" /></TD></TR> <TR><TD CLASS='left'>Host</TD><TD CLASS='right'><input type="text" name="nessus:host" value="<%$np->cfg->nessus(-key => 'host')%>" size="25" /></TD></TR> <TR><TD CLASS='left'>Username</TD><TD CLASS='right'><input type="text" name="nessus:username" value="<%$np->cfg->nessus(-key => 'username')%>" size="25" /></TD></TR> <TR><TD CLASS='left'>Password</TD><TD CLASS='right'><input type="text" name="nessus:password" value="<%$np->cfg->nessus(-key => 'password')%>" size="25" /></TD></TR> <TR><TD CLASS='left'>Port</TD><TD CLASS='right'><input type="text" name="nessus:port" value="<%$np->cfg->nessus(-key => 'port')%>" size="25" /></TD></TR> <TR><TD CLASS='left'>When_down</TD><TD CLASS='right'><%$q->radio_group(-name => 'nessus:WHEN_DOWN', -default=>$np->cfg->nessus(-key => 'WHEN_DOWN'), -values => ['OK','FAIL'])%></TD></TR> </TBODY> </TABLE> <BR> |
From: Matt <mt...@us...> - 2005-06-08 12:11:29
|
Update of /cvsroot/netpass/NetPass/www/components/Admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20893 Added Files: FormNPDb Log Message: --- NEW FILE: FormNPDb --- <%doc> </%doc> <%args> $submit => ''; </%args> <%perl> my $restartnetpass = 0; if ($submit eq 'Commit Changes') { foreach my $ak ( keys %ARGS ) { if ($ak =~ /^(\S+):(\S+)$/) { my $section = $1; my $var = $2; if ($section eq "database") { my $db = "database"; if (!$np->cfg->{'cfg'}->exists('database')) { $np->cfg->{'cfg'}->$db({}); } $np->cfg->{'cfg'}->obj('database')->$var($ARGS{$ak}); $restartnetpass = 1; } } } $np->db->reqAppAction('netpass', 'restart', '') if ($restartnetpass); } </%perl> <TABLE WIDTH=800 CLASS="expandable" ID="databaseConfig" CELLSPACING=2 CELLPADDING=2> <THEAD> <TR><TH ONCLICK="showHideObj2(getElementById('databaseConfig').tBodies[0]);" COLSPAN=2>Database</TH></TR> </THEAD> <TBODY> <%perl> foreach my $d (sort $np->cfg->{'cfg'}->keys('database')) { print "<TR>"; print "<TD CLASS='left'>$d</TD>"; print "<TD CLASS='right'>"; print $q->textfield ( -name => "database:$d", -value => $np->cfg->{'cfg'}->obj('database')->value($d), -size => 25 , ); print "</TD></TR>"; } print "</TBODY></TABLE>"; print $q->end_form(); </%perl> |
From: Matt <mt...@us...> - 2005-06-08 02:57:30
|
Update of /cvsroot/netpass/NetPass/www/components/Admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31124 Modified Files: FormNPSnort Log Message: Index: FormNPSnort =================================================================== RCS file: /cvsroot/netpass/NetPass/www/components/Admin/FormNPSnort,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- FormNPSnort 8 Jun 2005 02:37:55 -0000 1.1 +++ FormNPSnort 8 Jun 2005 02:57:21 -0000 1.2 @@ -6,7 +6,6 @@ </%args> <%perl> - my $anychanges = 0; if ($submit eq "Commit Changes") { my $c = getconfigobj($network); @@ -19,12 +18,15 @@ my $var; if ($nparg =~ /^snort:(.+)$/) { $var = $1; - $anychanges = 1; } else { next; } - if ($var =~ /^rorw_(.+)$/) { + if ($var eq 'mode') { + if ($ARGS{$nparg} =~ /^(enabled|disabled|not_really)$/) { + $c->mode($ARGS{$nparg}); + } + } elsif ($var =~ /^rorw_(.+)$/) { my $v = $1; if ($c->exists('servers') && $c->obj('servers')->exists($v) && $ARGS{$nparg} =~ /^(ro|rw)$/) { @@ -50,7 +52,7 @@ } } } - $np->cfg->save(-user => $m->session->{'username'}) if $anychanges; + $np->cfg->save(-user => $m->session->{'username'}); } sub getsnortvalue { |
From: Matt <mt...@us...> - 2005-06-08 02:57:15
|
Update of /cvsroot/netpass/NetPass/www/components/Admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30951 Modified Files: FormNPApi Log Message: Index: FormNPApi =================================================================== RCS file: /cvsroot/netpass/NetPass/www/components/Admin/FormNPApi,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- FormNPApi 8 Jun 2005 00:48:59 -0000 1.2 +++ FormNPApi 8 Jun 2005 02:57:06 -0000 1.3 @@ -5,14 +5,12 @@ </%args> <%perl> - my $anychanges = 0; if ($submit eq "Commit Changes") { foreach my $nparg (keys %ARGS) { my $var; if ($nparg =~ /^npapi:(\w+)$/) { $var = $1; - $anychanges = 1; } else { next; } @@ -22,7 +20,7 @@ } $np->cfg->{'cfg'}->obj('npapi')->$var($ARGS{"npapi:$var"}); } - $np->cfg->save(-user => $m->session->{'username'}) if $anychanges; + $np->cfg->save(-user => $m->session->{'username'}); } sub getnpapivalue { |
From: Matt <mt...@us...> - 2005-06-08 02:38:59
|
Update of /cvsroot/netpass/NetPass/www/htdocs/Admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20719 Modified Files: gencfg.mhtml Log Message: Index: gencfg.mhtml =================================================================== RCS file: /cvsroot/netpass/NetPass/www/htdocs/Admin/gencfg.mhtml,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- gencfg.mhtml 7 Jun 2005 19:30:14 -0000 1.16 +++ gencfg.mhtml 8 Jun 2005 02:38:49 -0000 1.17 @@ -401,24 +401,8 @@ </TABLE> <BR> -<TABLE WIDTH=800 class="expandable" ID="snortConfig" CELLSPACING=2 CELLPADDING=2> -<THEAD> -<TR><TH onclick="showHideObj2(getElementById('snortConfig').tBodies[0]);" COLSPAN=2>Snort</TH></TR> -</THEAD> -<TBODY> -<TR><TD CLASS='left'>mode</TD> -<TD CLASS='right'> -<%$q->popup_menu ( - -name => 'snort:mode', - -values => ['enabled', 'disabled', 'not_really'], - -default => ($np->cfg->{'cfg'}->obj('snort')->value('mode')) - )%> -</TD></TR> -</TBODY> -</TABLE> -<BR> - -% $m->comp('/Admin/FormNPApi', 'submit' => $submit, %ARGS); +% $m->comp('/Admin/FormNPSnort', 'submit' => $submit, 'network' => "", %ARGS); +% $m->comp('/Admin/FormNPApi', 'submit' => $submit, %ARGS); <TABLE WIDTH=800 CLASS="expandable" ID="databaseConfig" CELLSPACING=2 CELLPADDING=2> <THEAD> |
From: Matt <mt...@us...> - 2005-06-08 02:38:04
|
Update of /cvsroot/netpass/NetPass/www/components/Admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20332 Added Files: FormNPSnort Log Message: --- NEW FILE: FormNPSnort --- <%doc> </%doc> <%args> $submit => ''; $network => ''; </%args> <%perl> my $anychanges = 0; if ($submit eq "Commit Changes") { my $c = getconfigobj($network); if (!defined $c) { # error return; } foreach my $nparg (keys %ARGS) { my $var; if ($nparg =~ /^snort:(.+)$/) { $var = $1; $anychanges = 1; } else { next; } if ($var =~ /^rorw_(.+)$/) { my $v = $1; if ($c->exists('servers') && $c->obj('servers')->exists($v) && $ARGS{$nparg} =~ /^(ro|rw)$/) { $c->obj('servers')->$v($ARGS{$nparg}); } } elsif ($var eq 'addnewsensor' && defined $ARGS{'snort:addnewsensor'}) { if (!$c->exists('servers')) { $c->servers({}); } if ($ARGS{'snort:newport'} =~ /^\d+$/ && $ARGS{'snort:newrorw'} =~ /^(ro|rw)$/ && $ARGS{'snort:newsensor'} =~ /^\w*\.*\w*\.*\w+\.\w+$/) { my $v = $ARGS{'snort:newsensor'}.':'.$ARGS{'snort:newport'}; $c->obj('servers')->$v($ARGS{'snort:newrorw'}); } } elsif ($var =~ /^delete_(.+)$/ && defined $ARGS{$nparg} ) { my $v = $1; if ($c->obj('servers')->exists($v)) { $c->obj('servers')->delete($v); } } } $np->cfg->save(-user => $m->session->{'username'}) if $anychanges; } sub getsnortvalue { my $val = shift; my $network = shift; my $c = getconfigobj($network); return "" unless defined $c; if ($c->exists($val)) { return $c->value($val); } return ""; } sub getconfigobj { my $network = shift; if (defined $network && $np->cfg->{'cfg'}->exists($network) && $np->cfg->{'cfg'}->obj($network)->exists('snort')) { return $np->cfg->{'cfg'}->obj($network)->obj('snort'); } elsif ($np->cfg->{'cfg'}->exists('snort')) { return $np->cfg->{'cfg'}->obj('snort'); } return undef; } </%perl> <TABLE WIDTH=800 class="expandable" ID="snortConfig" CELLSPACING=2 CELLPADDING=2> <THEAD> <TR><TH onclick="showHideObj2(getElementById('snortConfig').tBodies[0]);" COLSPAN=2>Snort</TH></TR> </THEAD> <TBODY> <TR><TD CLASS='left'>mode</TD> <TD CLASS='right'> <%$q->popup_menu ( -name => 'snort:mode', -values => ['enabled', 'disabled', 'not_really'], -default => getsnortvalue('mode', $network) )%> </TD></TR> <TR><TD CLASS='left'>Snort Sensors</TD> <TD CLASS='right' ALIGN=center> <TABLE WIDTH=80% BGCOLOR="#ffffff" CELLSPACING=2 CELLPADDING=2> <TR> <TD CLASS="gray" ALIGN=center>Sensor</TD> <TD CLASS="gray" ALIGN=center>Port</TD> <TD CLASS="gray" ALIGN=center>ro/rw</TD> <TD CLASS="gray" ALIGN=center>Action</TD> </TR> <%perl> my $c = getconfigobj($network); if (defined $c && $c->exists('servers')) { foreach my $s ($c->keys('servers')) { my($server, $port) = split(/:/, $s); print "<TR>"; print "<TD CLASS=\"gray\" ALIGN=center>$server</TD>"; print "<TD CLASS=\"gray\" ALIGN=center>$port</TD>"; print "<TD CLASS=\"gray\" ALIGN=center>"; print $q->popup_menu ( -name => "snort:rorw_$s", -values => ['ro', 'rw'], -default => $c->obj('servers')->value($s) ); print "</TD>"; print "<TD CLASS=\"gray\" ALIGN=left>"; print $q->checkbox ( -name => "snort:delete_$s", -label => " Delete", ); print "</TD></TR>"; } } print "<TR>"; print "<TD CLASS=\"gray\" ALIGN=center>"; print $q->textfield ( -name => "snort:newsensor", -size => 40, ); print "</TD><TD CLASS=\"gray\" ALIGN=center>"; print $q->textfield ( -name => "snort:newport", -size => 5, ); print "</TD><TD CLASS=\"gray\" ALIGN=center>"; print $q->popup_menu ( -name => "snort:newrorw", -values => ['ro', 'rw'], -default => 'ro', ); print "</TD><TD CLASS=\"gray\" ALIGN=left>"; print $q->checkbox ( -name => "snort:addnewsensor", -label => " Add", ); print "</TD>"; print "</TR>"; </%perl> </TABLE> </TD></TR> </TBODY> </TABLE> <BR> |
From: Matt <mt...@us...> - 2005-06-08 00:49:07
|
Update of /cvsroot/netpass/NetPass/www/components/Admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28353 Modified Files: FormNPApi Log Message: Index: FormNPApi =================================================================== RCS file: /cvsroot/netpass/NetPass/www/components/Admin/FormNPApi,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- FormNPApi 7 Jun 2005 19:32:58 -0000 1.1 +++ FormNPApi 8 Jun 2005 00:48:59 -0000 1.2 @@ -5,12 +5,14 @@ </%args> <%perl> + my $anychanges = 0; if ($submit eq "Commit Changes") { foreach my $nparg (keys %ARGS) { my $var; if ($nparg =~ /^npapi:(\w+)$/) { - $var = $1; + $var = $1; + $anychanges = 1; } else { next; } @@ -20,7 +22,7 @@ } $np->cfg->{'cfg'}->obj('npapi')->$var($ARGS{"npapi:$var"}); } - $np->cfg->save(-user => $m->session->{'username'}); + $np->cfg->save(-user => $m->session->{'username'}) if $anychanges; } sub getnpapivalue { |
From: Matt <mt...@us...> - 2005-06-08 00:15:11
|
Update of /cvsroot/netpass/NetPass In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7781 Modified Files: MANIFEST Log Message: Index: MANIFEST =================================================================== RCS file: /cvsroot/netpass/NetPass/MANIFEST,v retrieving revision 1.45 retrieving revision 1.46 diff -u -d -r1.45 -r1.46 --- MANIFEST 3 Jun 2005 19:41:21 -0000 1.45 +++ MANIFEST 8 Jun 2005 00:15:01 -0000 1.46 @@ -16,23 +16,26 @@ bin/interfacecfg.pl bin/macscan.pl bin/moveport.pl +bin/myresetport.pl bin/npportcache.pl bin/nessus.pl -bin/coconf.pl +bin/npapid.pl bin/portmover-restart.sh -bin/resetport.pl bin/proc_counter.pl bin/portmover.pl -bin/npapid.pl bin/resetport-restart.sh -bin/ciconf.pl +bin/resetport.pl +bin/resetport3.pl +bin/resetportpool.pl bin/rm_stale_cookies.pl +bin/quarantine_host.pl bin/import_snort_rules.pl bin/getresults.pl -bin/quarantine_host.pl +bin/ciconf.pl +bin/coconf.pl bin/lsconf.pl -bin/rogue-dhcp-detect.pl bin/npsubagent.pl +bin/rogue-dhcp-detect.pl bin/npurlfilter.pl doc/cron.monthly/mysql_binlog_rotate doc/logrotate.d/apache @@ -40,18 +43,12 @@ doc/lvs/setup.txt doc/lvs/getint.c doc/lvs/lvs-netpass.patch -doc/website/supequip.html -doc/website/index.html -doc/website/install.html -doc/website/site.css -doc/website/deploy.html -doc/website/roadmap.html -doc/insert_docs_from_ascit.pl +doc/dhcprelay.patch +doc/appstart doc/Netpass_Overview.txt doc/add_new_network -doc/appstart +doc/insert_docs_from_ascit.pl doc/create_tables.sql -doc/dhcprelay.patch doc/groups.txt doc/popvlanmap.pl doc/mysql.txt @@ -59,64 +56,73 @@ doc/perlmods doc/user_overview.txt doc/squidguard.txt -doc/apachehowto.txt +doc/website/img/arrows.png +doc/website/img/arrows.svg +doc/website/img/arrows.xcf +doc/website/img/index.html +doc/website/deploy.html +doc/website/index.html +doc/website/install.html +doc/website/roadmap.html +doc/website/site.css +doc/website/supequip.html doc/mysqlcluster.txt +doc/apachehowto.txt doc/nessus-install.txt doc/npsnort.txt doc/netpass-install.sxw doc/snort-2.3.3-vlan.patch doc/ebtablesnmpsetup.txt -etc/netpass-example.conf etc/oui.txt -install.d/logrotate.d/apache -install.d/logrotate.d/netpass -install.d/logrotate.d/snort -install.d/convertdb -install.d/install -install.d/install-test -install.d/packages -install.d/services -install.d/iptables.sh -install.d/spinner.pm -install.d/squid.conf -install.d/lvs -install.d/syslog.conf +etc/netpass-example.conf install.d/init.d/netpassha install.d/init.d/nessusd install.d/init.d/netpass install.d/init.d/npgarp -install.d/init.d/apache +install.d/init.d/snortd install.d/init.d/swatch +install.d/init.d/apache install.d/init.d/mysqld -install.d/init.d/snortd install.d/init.d/ndbmgmd +install.d/testpm install.d/crontab.netpass -install.d/httpd.conf +install.d/install +install.d/install-test +install.d/services +install.d/spinner.pm +install.d/syslog.conf +install.d/convertdb install.d/fstab -install.d/swatch.conf -install.d/iptables-lvs.sh +install.d/packages install.d/pages.sql +install.d/squid.conf +install.d/swatch.conf install.d/tables.sql +install.d/logrotate.d/snort +install.d/logrotate.d/apache +install.d/logrotate.d/netpass +install.d/lvs +install.d/iptables.sh install.d/ldirectord.cf -install.d/testpm +install.d/httpd.conf +install.d/iptables-lvs.sh install.d/snmptrapd -install.d/drop-tables.sql install.d/install-ipvs.sh -install.d/drop-indexes.sql install.d/sysconfig.snort install.d/create-indexes.sql -lib/Bundle/NetPass/API.pm +install.d/drop-indexes.sql +install.d/drop-tables.sql lib/Bundle/NetPass1.pm lib/Bundle/NetPass2.pm -lib/NetPass/WWW/Session.pm.mysql lib/NetPass/WWW/Session.pm.file +lib/NetPass/WWW/Session.pm.mysql lib/NetPass/Auth/Radius.pm lib/NetPass/Auth/DB.pm lib/NetPass/Auth/LDAP.pm lib/NetPass/Auth/Unix.pm lib/NetPass/Config.pm -lib/NetPass/DB.pm lib/NetPass/API.pm +lib/NetPass/DB.pm lib/NetPass/LOG.pm lib/NetPass/Nessus.pm lib/NetPass/Network.pm @@ -132,20 +138,22 @@ lib/SNMP/Device/Asante.pm lib/SNMP/Device/BayStack.pm lib/SNMP/Device/BayStack3.pm -lib/SNMP/Device/Cisco.pm lib/SNMP/Device/HP.pm lib/SNMP/Device/HP_AS_HUB.pm +lib/SNMP/Device/Cisco.pm lib/SNMP/Device.pm lib/SNMP/driver2.pl lib/SNMP/driver3.pl lib/NetPass.pm lib/RUNONCE.pm +www/components/Admin/FormNPApi www/components/Admin/Login www/components/Admin/MemberOf -www/components/Admin/FormAuthLDAP www/components/Admin/LockConfig -www/components/Admin/FormAuthRadius www/components/Admin/TableEditPolicy +www/components/Admin/FormAuthLDAP +www/components/Admin/FormAuthRadius +www/components/Admin/FormNPSnort www/components/Client/BeginScan www/components/Client/GetInfo www/components/Client/Login @@ -167,9 +175,9 @@ www/htdocs/Admin/Editor/edit.mhtml www/htdocs/Admin/Editor/index.mhtml www/htdocs/Admin/Editor/view.mhtml +www/htdocs/Admin/Scan/ids.mhtml www/htdocs/Admin/Scan/index.mhtml www/htdocs/Admin/Scan/info.mhtml -www/htdocs/Admin/Scan/ids.mhtml www/htdocs/Admin/reports/byclient.mhtml www/htdocs/Admin/reports/bynet.mhtml www/htdocs/Admin/reports/byos.mhtml @@ -184,16 +192,14 @@ www/htdocs/Admin/mr.mhtml www/htdocs/Admin/qc.mhtml www/htdocs/Admin/user.mhtml -www/htdocs/Admin/urlfilter.mhtml -www/htdocs/Admin/network.mhtml -www/htdocs/Admin/clienthistory.mhtml -www/htdocs/Admin/switch.mhtml -www/htdocs/Admin/help.mhtml www/htdocs/Admin/chpwd.mhtml +www/htdocs/Admin/clienthistory.mhtml +www/htdocs/Admin/urlfilter.mhtml www/htdocs/Admin/auth.mhtml -www/htdocs/Admin/cmd/lockcfg.mhtml -www/htdocs/Admin/cmd/setresult.mhtml +www/htdocs/Admin/help.mhtml www/htdocs/Admin/netgroups.mhtml +www/htdocs/Admin/network.mhtml +www/htdocs/Admin/switch.mhtml www/htdocs/OSSTemplate/css/OSSTemplate.css.cgi www/htdocs/OSSTemplate/css/.htaccess www/htdocs/OSSTemplate/css/calendar.css @@ -210,12 +216,12 @@ www/htdocs/OSSTemplate/images/ossLogo2.gif www/htdocs/OSSTemplate/images/progress.gif www/htdocs/OSSTemplate/js/OSSTemplate.js -www/htdocs/OSSTemplate/js/userform.js www/htdocs/OSSTemplate/js/debug.js -www/htdocs/OSSTemplate/js/netgroups.js +www/htdocs/OSSTemplate/js/userform.js www/htdocs/OSSTemplate/js/xmlhttp.js -www/htdocs/OSSTemplate/js/lockcfg.js www/htdocs/OSSTemplate/js/common.js +www/htdocs/OSSTemplate/js/lockcfg.js +www/htdocs/OSSTemplate/js/netgroups.js www/htdocs/OSSTemplate/js/network.js www/htdocs/OSSTemplate/js/switch.js www/htdocs/OSSTemplate/.htaccess |
From: Matt <mt...@us...> - 2005-06-07 19:33:09
|
Update of /cvsroot/netpass/NetPass/www/components/Admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32609 Added Files: FormNPApi Log Message: --- NEW FILE: FormNPApi --- <%doc> </%doc> <%args> $submit => ''; </%args> <%perl> if ($submit eq "Commit Changes") { foreach my $nparg (keys %ARGS) { my $var; if ($nparg =~ /^npapi:(\w+)$/) { $var = $1; } else { next; } if (!$np->cfg->{'cfg'}->exists('npapi')) { $np->cfg->{'cfg'}->npapi({}); } $np->cfg->{'cfg'}->obj('npapi')->$var($ARGS{"npapi:$var"}); } $np->cfg->save(-user => $m->session->{'username'}); } sub getnpapivalue { my $val = shift; if ($np->cfg->{'cfg'}->exists('npapi') && $np->cfg->{'cfg'}->obj('npapi')->exists($val)) { return $np->cfg->{'cfg'}->obj('npapi')->value($val); } return ""; } </%perl> <TABLE WIDTH=800 class="expandable" ID="npapiConfig" CELLSPACING=2 CELLPADDING=2> <THEAD> <TR><TH onclick="showHideObj2(getElementById('npapiConfig').tBodies[0]);" COLSPAN=2>NetPass API</TH></TR> </THEAD> <TBODY> <TR><TD CLASS='left'>Port</TD><TD CLASS='right'><input type="text" name="npapi:port" value="<%getnpapivalue('port')%>" size="25 " /></TD></TR> <TR><TD CLASS='left'>Secret</TD><TD CLASS='right'><input type="text" name="npapi:secret" value="<%getnpapivalue('secret')%>" size ="25"/></TD></TR> </TBODY> </TABLE> <BR> |
From: Matt <mt...@us...> - 2005-06-07 19:30:22
|
Update of /cvsroot/netpass/NetPass/www/htdocs/Admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30969 Modified Files: gencfg.mhtml Log Message: Index: gencfg.mhtml =================================================================== RCS file: /cvsroot/netpass/NetPass/www/htdocs/Admin/gencfg.mhtml,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- gencfg.mhtml 19 May 2005 20:15:06 -0000 1.15 +++ gencfg.mhtml 7 Jun 2005 19:30:14 -0000 1.16 @@ -401,6 +401,25 @@ </TABLE> <BR> +<TABLE WIDTH=800 class="expandable" ID="snortConfig" CELLSPACING=2 CELLPADDING=2> +<THEAD> +<TR><TH onclick="showHideObj2(getElementById('snortConfig').tBodies[0]);" COLSPAN=2>Snort</TH></TR> +</THEAD> +<TBODY> +<TR><TD CLASS='left'>mode</TD> +<TD CLASS='right'> +<%$q->popup_menu ( + -name => 'snort:mode', + -values => ['enabled', 'disabled', 'not_really'], + -default => ($np->cfg->{'cfg'}->obj('snort')->value('mode')) + )%> +</TD></TR> +</TBODY> +</TABLE> +<BR> + +% $m->comp('/Admin/FormNPApi', 'submit' => $submit, %ARGS); + <TABLE WIDTH=800 CLASS="expandable" ID="databaseConfig" CELLSPACING=2 CELLPADDING=2> <THEAD> <TR><TH ONCLICK="showHideObj2(getElementById('databaseConfig').tBodies[0]);" COLSPAN=2>Database</TH></TR> |
From: rcolantuoni <rco...@us...> - 2005-06-06 15:20:44
|
Update of /cvsroot/netpass/NetPass/lib/Bundle In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4605/lib/Bundle Modified Files: NetPass2.pm Log Message: added Net::DHCP modules Index: NetPass2.pm =================================================================== RCS file: /cvsroot/netpass/NetPass/lib/Bundle/NetPass2.pm,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- NetPass2.pm 3 Jun 2005 20:27:02 -0000 1.11 +++ NetPass2.pm 6 Jun 2005 15:20:35 -0000 1.12 @@ -32,6 +32,10 @@ Proc::ProcessTable::Process +Net::DHCP::Packet + +Net::DHCP::Constants + Net::Pcap Net::Ping |
From: rcolantuoni <rco...@us...> - 2005-06-03 20:53:46
|
Update of /cvsroot/netpass/NetPass/bin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9710 Modified Files: rogue-dhcp-detect.pl Log Message: Added NetPacket and started testing the processPkt subroutine Index: rogue-dhcp-detect.pl =================================================================== RCS file: /cvsroot/netpass/NetPass/bin/rogue-dhcp-detect.pl,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- rogue-dhcp-detect.pl 26 Apr 2005 20:35:36 -0000 1.3 +++ rogue-dhcp-detect.pl 3 Jun 2005 20:53:33 -0000 1.4 @@ -58,11 +58,11 @@ use Getopt::Std; use Pod::Usage; use Net::Pcap; +use NetPacket::Ethernet; use lib qw(/opt/netpass/lib); use NetPass::LOG qw(_log _cont); use NetPass; -use NetPass::Config; use FileHandle; @@ -71,6 +71,23 @@ $Config{useithreads} or die "Recompile Perl with threads to run this program."; } +###################### CONFIG VARS #################################### + +my $allowed = { + '128.205.1.32' => 'ccdhcp-resnet3', + '128.205.1.33' => 'ccdhcp-resnet4', + '128.205.1.26' => 'npw1', + '128.205.1.27' => 'npw2', + '128.205.159.122' => 'dhcp relay exception', + '128.205.159.123' => 'dhcp relay exception', + '128.205.159.126' => 'dhcp relay exception', + }; + +# file containing a map of the first half of a mac address to manufacturer +my $ouiFile = "/opt/netpass/etc/oui.txt"; + +######################################################################## + my %opts; getopts('U:Dqhc:', \%opts); @@ -84,7 +101,6 @@ NetPass::LOG::init *STDOUT if $debug; NetPass::LOG::init [ 'rogue-dhcp-sniff', 'local0' ] unless $debug; - my $np = new NetPass( -cstr => exists $opts{'c'} ? $opts{'c'} : undef, -dbuser => $dbuser, -dbpass => $dbpass, @@ -107,36 +123,15 @@ } die "no interfaces to listen on" if($#interfaces<0); - -###################### CONFIG VARS #################################### - - -my $allowed = { - '128.205.1.32' => 'ccdhcp-resnet3', - '128.205.1.33' => 'ccdhcp-resnet4', - '128.205.1.26' => 'npw1', - '128.205.1.27' => 'npw2', - '128.205.159.122' => 'dhcp relay exception', - '128.205.159.123' => 'dhcp relay exception', - '128.205.159.126' => 'dhcp relay exception', - }; - -my $checkFrequency = 3; # how often (in seconds) to check the tcpdump filehandles for input -my $reportFrequency = 20; # how often (in minutes) to send the report of rogues found - -# file containing a map of the first half of a mac address to manufacturer -my $ouiFile = "/opt/netpass/etc/oui.txt"; -my $fhIfMap = {}; - -######################################################################## - -# convert to seconds -$reportFrequency = $reportFrequency * 60; +$np->DESTROY(); # unbuffer output $|=1; +# use oui file for determining what manufacturer made this device +my $ouiCache = loadOUI($ouiFile); + # when true, we exit my $programExit = 0; @@ -144,51 +139,65 @@ # $roguesFound->{ethernet address} = ip address my $roguesFound = {}; -# the last time a report was sent out -my $lastReport = time; - -# use oui file for determining what manufacturer made this device -my $ouiCache = loadOUI($ouiFile); - my @threads = (); -# for each interface, spawn a thread and push it into the filehandle group +# for each interface, spawn a thread and push it into the threads array foreach my $interface (@interfaces) { my $sniffer = pcapDescriptor($interface); push @threads, new threads (\&threadEntry, $sniffer, $interface); + #my $t = new threads (\&threadEntry, $sniffer, $interface); } -#print "Parent thread waiting\n" if $debug; -#$threads[0]->join; -#print "Parent thread joined\n" if $debug; - # wait for all threads to finish $_->join foreach @threads; +$threads[0]->join; + exit 0; ######################################################################## sub threadEntry { - my $sniffer = shift; - my $interface = shift; + my ($sniffer, $interface) = @_; - #my $tid = threads->tid(); + my $tid = threads->tid(); #print "$tid"; # causes segfault?? wtf! if(ref($sniffer)) { - _log("DEBUG", "Thread [tid] - Listening on interface $interface\n"); -# Net::Pcap::loop($sniffer, -1, \&processPacket, 0); + _log("DEBUG", "Thread [$tid] - Listening on interface $interface\n"); + Net::Pcap::loop($sniffer, -1, \&processPacket, 0); Net::Pcap::close($sniffer); - _log("DEBUG", "Thread [tid] - Done Listening on interface $interface\n"); + _log("DEBUG", "Thread [$tid] - Done Listening on interface $interface\n"); } else { - _log("DEBUG", "Not Listening on interface $interface\n"); + _log("DEBUG", "Thread [$tid] - Not Listening on interface $interface\n"); + + # without this sleep, the $tid throws a segfault? + sleep(1); } } sub processPacket { my($user_data, $hdr, $pkt) = @_; print "got one!\n"; + + my $eth_obj = NetPacket::Ethernet->decode($pkt); + + return if(!defined($eth_obj->{type})); + return if( $eth_obj->{type} != 2048 ); + + # 2048 (0x0800) - IP + # 2054 (0x0806) - ARP + + print("$eth_obj->{src_mac}:$eth_obj->{dest_mac} $eth_obj->{type}\n"); + + my $ip_obj = NetPacket::IP->decode($eth_obj->{data}); + + if($ip_obj->{proto} == 11){ + # TCP = 6 + # UDP = 11 + #my $udp_obj = NetPacket::UDP->decode($ip_obj->{data}); + } + return; } @@ -205,12 +214,13 @@ my $optimize = 1; # optimize flag # dhcp - my $filter = "udp src port 67"; + #my $filter = "udp src port 67"; + my $filter = ""; my ($err, $net, $mask, $filterCompiled); if ( (Net::Pcap::lookupnet($device, \$net, \$mask, \$err) ) == -1 ) { - _log("DEBUG", "$err\n"); + _log("ERROR", "$err\n"); return undef; } |
From: rcolantuoni <rco...@us...> - 2005-06-03 20:27:16
|
Update of /cvsroot/netpass/NetPass/lib/Bundle In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30173/lib/Bundle Modified Files: NetPass2.pm Log Message: added NetPacket module to Bundle Index: NetPass2.pm =================================================================== RCS file: /cvsroot/netpass/NetPass/lib/Bundle/NetPass2.pm,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- NetPass2.pm 26 Apr 2005 15:39:58 -0000 1.10 +++ NetPass2.pm 3 Jun 2005 20:27:02 -0000 1.11 @@ -38,6 +38,8 @@ Net::Ping::External +NetPacket + GD GD::Graph |
From: jeff m. <jef...@us...> - 2005-06-03 19:41:58
|
Update of /cvsroot/netpass/NetPass/www/components/Admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4656/www/components/Admin Added Files: FormAuthLDAP Log Message: auth config gui --- NEW FILE: FormAuthLDAP --- <%doc> Fetch all LDAP servers. Display them. Allow for add/del and edit. </%doc> <%args> $prefix => ''; </%args> <%perl> my $rs_ = $np->cfg->getLDAP(); my $rs = (ref($rs_) eq "ARRAY") ? $rs_ : []; my $WH = "----------------"; my $ml = length($WH); foreach my $server (@$rs) { $ml = ($ml > length($server)) ? $ml : length($server); } $ml = int($ml * 1.5); $WH = "-" x $ml; </%perl> <table border=0> <tr><th>LDAP Servers</th><th>Options</th></tr> <tr><td><%$q->scrolling_list(-id => $prefix.'ldapServer', -name => $prefix.'ldapServer', -size => 4, -values => [ $WH, @$rs ])%></td> <td><input size=16 id='<%$prefix%>ldapBase'> <input size=16 id='<%$prefix%>ldapFilter'> <input size=16 id='<%$prefix%>ldapPasswordField'> </td> </tr> </table> |
From: jeff m. <jef...@us...> - 2005-06-03 19:41:31
|
Update of /cvsroot/netpass/NetPass/www/htdocs/Admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4343/www/htdocs/Admin Modified Files: auth.mhtml Log Message: auth config gui Index: auth.mhtml =================================================================== RCS file: /cvsroot/netpass/NetPass/www/htdocs/Admin/auth.mhtml,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- auth.mhtml 3 Jun 2005 16:59:55 -0000 1.3 +++ auth.mhtml 3 Jun 2005 19:41:22 -0000 1.4 @@ -3,6 +3,19 @@ <%args> $auth_method => ''; $admin_auth_method => ''; + $radiusServer => ''; + $radiusSecret => ''; + $admin_radiusServer => ''; + $admin_radiusSecret => ''; + $submitButton => ''; + $ldapServer => ''; + $admin_ldapServer => ''; + $ldapBase => ''; + $admin_ldapBase => ''; + $ldapFilter => ''; + $admin_ldapFilter => ''; + $ldapPasswordField => ''; + $admin_ldapPasswordField => ''; </%args> <%perl> my ($isRoot, $junk) = $m->comp('/Admin/MemberOf', 'acl' => [ 'Admin' ], 'group' => 'default'); @@ -10,9 +23,21 @@ print qq{<p class='error'>Sorry, you don't have access to this form.</P>}; return; } + +my @err; my $WH = "----------------------"; my $aa = $np->cfg->policy(-key => 'ADMIN_AUTH_METHOD'); my $ca = $np->cfg->policy(-key => 'AUTH_METHOD'); + +$m->comp('/Admin/LockConfig', 'enableWhenLocked' => [ 'submitButton' ], 'init' => 0); +my $lstat = $np->db->isConfigLocked(); + +if ($submitButton eq "Commit Changes") { + # set global policy AUTH_METHOD + # set global policy ADMIN_AUTH_METHOD + # if radiusServer && secret == "" then remove $radiusServer + # if radiusServer && secret then set secret +} </%perl> <script language='JavaScript'><!-- @@ -20,6 +45,8 @@ setWhereAmI('Authentication > Methods'); --></script> +<input type='submit' name='submitButton' id='submitButton' value='Commit Changes'><P> + <TABLE WIDTH=800 ID="authMethods" CELLSPACING=2 CELLPADDING=2> <THEAD> <TR><TH COLSPAN=2>Authentication Methods</TH></TR> @@ -35,10 +62,10 @@ 'NetPass::Auth::LDAP', 'NetPass::Auth::Unix' ] )%> </TD></TR> -<TR><TD> -% if ($ca eq "Netpass::Auth::Radius") { +<TR><TD colspan=2 align='right'> +% if ($ca eq "NetPass::Auth::Radius") { % $m->comp('/Admin/FormAuthRadius', %ARGS); -% elsif ($ca eq "Netpass::Auth::LDAP") { +% } elsif ($ca eq "NetPass::Auth::LDAP") { % $m->comp('/Admin/FormAuthLDAP', %ARGS); % } </tD></TR> @@ -52,11 +79,35 @@ 'NetPass::Auth::LDAP', 'NetPass::Auth::Unix' ] )%> </TD></TR> -<TR><TD> -% if ($aa eq "Netpass::Auth::Radius") { +<TR><TD colspan=2 align='right'> +% if ($aa eq "NetPass::Auth::Radius") { % $m->comp('/Admin/FormAuthRadius', 'prefix' => 'admin_', %ARGS); -% elsif ($aa eq "Netpass::Auth::LDAP") { +% } elsif ($aa eq "NetPass::Auth::LDAP") { % $m->comp('/Admin/FormAuthLDAP', 'prefix' => 'admin_', %ARGS); % } </tD></TR> </table> + + +<%perl> + + +if (ref($lstat) eq "HASH") { + # the config is locked + if ($lstat->{'user'} eq $m->session->{'username'}) { + # by us, so show the unlock button + print qq{<script>lockConfig_results("OK lock");lockConfig_enableElements();</script>}; + } else { + # but not by us, show the force unlock button + print qq{<script>lockConfig_results("NOK lock $lstat->{'user'}");lockConfig_disableElements();</script>}; + } +} +elsif ($lstat) { + # there was a problem +} +else { + # the config is not locked, show the lock button + print qq{<script>lockConfig_results("OK unlock");lockConfig_disableElements();</script>}; +} + +</%perl> |
From: jeff m. <jef...@us...> - 2005-06-03 19:41:31
|
Update of /cvsroot/netpass/NetPass/www/components/Admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4343/www/components/Admin Added Files: FormAuthRadius Log Message: auth config gui --- NEW FILE: FormAuthRadius --- <%doc> Fetch all radius servers. Display them. Allow for add/del and edit. </%doc> <%args> $prefix => ''; </%args> <%perl> my $rs_ = $np->cfg->getRadius(); my $rs = (ref($rs_) eq "ARRAY") ? $rs_ : []; my $WH = "----------------"; my $ml = length($WH); foreach my $server (@$rs) { $ml = ($ml > length($server)) ? $ml : length($server); } $ml = int($ml * 1.5); $WH = "-" x $ml; </%perl> <table border=0> <tr><th>Radius Servers</th><th>Secret</th></tr> <tr><td><%$q->scrolling_list(-id => $prefix.'radiusServer', -name => $prefix.'radiusServer', -size => 4, -values => [ $WH, @$rs ])%></td> <td><input size=16 id='<%$prefix%>radiusSecret'></td> </tr> </table> |
From: jeff m. <jef...@us...> - 2005-06-03 19:41:30
|
Update of /cvsroot/netpass/NetPass In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4343 Modified Files: MANIFEST Log Message: auth config gui Index: MANIFEST =================================================================== RCS file: /cvsroot/netpass/NetPass/MANIFEST,v retrieving revision 1.44 retrieving revision 1.45 diff -u -d -r1.44 -r1.45 --- MANIFEST 3 Jun 2005 16:59:54 -0000 1.44 +++ MANIFEST 3 Jun 2005 19:41:21 -0000 1.45 @@ -142,7 +142,9 @@ lib/RUNONCE.pm www/components/Admin/Login www/components/Admin/MemberOf +www/components/Admin/FormAuthLDAP www/components/Admin/LockConfig +www/components/Admin/FormAuthRadius www/components/Admin/TableEditPolicy www/components/Client/BeginScan www/components/Client/GetInfo @@ -162,7 +164,6 @@ www/components/CookieDetect www/components/Audit www/components/OSDetect -www/components/FormAuthRadius www/htdocs/Admin/Editor/edit.mhtml www/htdocs/Admin/Editor/index.mhtml www/htdocs/Admin/Editor/view.mhtml |
From: jeff m. <jef...@us...> - 2005-06-03 19:41:30
|
Update of /cvsroot/netpass/NetPass/lib/NetPass In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4343/lib/NetPass Modified Files: Config.pm Log Message: auth config gui Index: Config.pm =================================================================== RCS file: /cvsroot/netpass/NetPass/lib/NetPass/Config.pm,v retrieving revision 1.45 retrieving revision 1.46 diff -u -d -r1.45 -r1.46 --- Config.pm 3 Jun 2005 16:59:55 -0000 1.45 +++ Config.pm 3 Jun 2005 19:41:22 -0000 1.46 @@ -2336,6 +2336,160 @@ return undef; } +=head2 getLDAP($server) + +If server is "" it returns an array ref of all configured +LDAP servers (in hostname[:port] notation). If server is +formatted as "hostname[:port]" it will return a hashref containing +the keys: + + base the search base + filter the filter to use + passwordField the name of the password field + +RETURNS + arrayref on success + hashref on success + undef on failure or no-such-server + +=cut + +sub getLDAP { + my $self = shift; + my $s = shift; + $s ||= ""; + if (recur_exists($self->{'cfg'}, "ldap", $s)) { + return { 'base' => $self->{'cfg'}->obj('radius')->obj($s)->value('base'), + 'filter' => $self->{'cfg'}->obj('radius')->obj($s)->value('filter'), + 'passwordField' => $self->{'cfg'}->obj('radius')->obj($s)->value('passwordField'), + }; + } + elsif (recur_exists($self->{'cfg'}, "ldap")) { + return [ $self->{'cfg'}->keys('ldap') ]; + } + return undef; +} + + +=head2 setLDAP(-server => '', -base => '', -filter => '', -passwordField => ''); + +If all params (except server) are '' then the server is deleted. +Server can be either a hostname, ip address or either of those +followed by ":port". + +RETURNS + 0 on success + "invalid parameters" routine called improperly + +=cut + +sub setLDAP { + my $self = shift; + + my $parms = parse_parms({ + -parms => \@_, + -legal => [qw(-server -base -filter -passwordField)], + -required => [qw(-server)], + -defaults => { -server => '', + -filter => '', + -base => '', + -passwordField => '' } + } + ); + + if (!defined($parms)) { + return "invalid parameters ".Carp::longmess(Class::ParmList->error); + } + + my ($server, $base, $filter, $pfield) = + $parms->get('-server', '-base', '-filter', '-passwordField'); + + if (!recur_exists($self->{'cfg'}, 'ldap', $server)) { + $self->{'cfg'}->obj('ldap')->$server({}); + } + if ($base.$filter.$pfield ne "") { + $self->{'cfg'}->obj('ldap')->obj($server)->base($base); + $self->{'cfg'}->obj('ldap')->obj($server)->filter($filter); + $self->{'cfg'}->obj('ldap')->obj($server)->passwordField($pfield); + } + else { + $self->{'cfg'}->obj('ldap')->delete($server); + } + return 0; +} + +=head2 getRadius($server) + +If server is "" it returns an array ref of all configured +radius servers (in hostname:port notation). If server is +formatted as "hostname:port" it will return a hashref containing +the keys: + + secret the secret to use + +RETURNS + arrayref on success + hashref on success + undef on failure or no-such-server + +=cut + +sub getRadius { + my $self = shift; + my $s = shift; + $s ||= ""; + if (recur_exists($self->{'cfg'}, "radius", $s)) { + return { 'secret', + $self->{'cfg'}->obj('radius')->obj($s)->value('secret') + }; + } + elsif (recur_exists($self->{'cfg'}, "radius")) { + return [ $self->{'cfg'}->keys('radius') ]; + } + return undef; +} + +=head2 setRadius(-server => '', -secret => ''); + +If secret is '' then the server is deleted. Server can be either a +hostname, ip address or either of those followed by ":port". + +RETURNS + 0 on success + "invalid parameters" routine called improperly + +=cut + +sub setRadius { + my $self = shift; + + my $parms = parse_parms({ + -parms => \@_, + -legal => [qw(-server -secret)], + -required => [qw(-server)], + -defaults => { -server => '', -secret => '' } + } + ); + + if (!defined($parms)) { + return "invalid parameters ".Carp::longmess(Class::ParmList->error); + } + + my ($server, $secret) = $parms->get('-server', '-secret'); + + if (!recur_exists($self->{'cfg'}, 'radius', $server)) { + $self->{'cfg'}->obj('radius')->$server({}); + } + if ($secret ne "") { + $self->{'cfg'}->obj('radius')->obj($server)->secret($secret); + } + else { + $self->{'cfg'}->obj('radius')->delete($server); + } + return 0; +} + + =head2 B<recur_exists> This is a routine, not a method. Useful for checking if a deep configuration |
From: jeff m. <jef...@us...> - 2005-06-03 19:41:30
|
Update of /cvsroot/netpass/NetPass/www/components In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4343/www/components Removed Files: FormAuthRadius Log Message: auth config gui --- FormAuthRadius DELETED --- |
From: Matt <mt...@us...> - 2005-06-03 19:07:17
|
Update of /cvsroot/netpass/NetPass/lib/NetPass In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15783 Modified Files: API.pm Log Message: Index: API.pm =================================================================== RCS file: /cvsroot/netpass/NetPass/lib/NetPass/API.pm,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- API.pm 3 Jun 2005 15:32:11 -0000 1.19 +++ API.pm 3 Jun 2005 19:06:59 -0000 1.20 @@ -114,6 +114,37 @@ return $np->cfg->snortEnabled($nw); } +=head2 my $networks = snortEnabledNetworks($secret) + +Get all the networks snort is enabled on. Returns an ARRAY ref of +all the snort enabled networks on success, C<undef> on failure. + +=cut + +sub snortEnabledNetworks { + my $self = shift; + my $secret = shift; + my $np = $::np; + + my $nws = (); + my @snortnws; + + return undef unless ($self->$check_soap_auth($secret)); + $nws = $np->cfg->getNetworks(); + + if (!defined($nws) || ref($nws) ne 'ARRAY') { + _log("ERROR", "Unable to retrieve list of networks"); + return undef; + } + + foreach my $net (@$nws) { + push(@snortnws, $net) if ($np->cfg->snortEnabled($net) =~ /^(enabled|not_really)$/); + } + + return \@snortnws; +} + + =head2 my $results = quarantineByIP(-secret => $secret, -ip => $ip, -id => $id, -type => $type) Arguments to this function include a secret key, ip address to be |
From: jeff m. <jef...@us...> - 2005-06-03 17:00:35
|
Update of /cvsroot/netpass/NetPass/www/components In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16515/www/components Added Files: FormAuthRadius Log Message: switch config gui --- NEW FILE: FormAuthRadius --- <%doc> Fetch all radius servers. Display them. Allow for add/del and edit. </%doc> <%args> $prefix => ''; </%args> <%perl> </%perl> |