berninger/ 0040755 0000000 0000001 00000000000 06646460737 0013220 5 ustar 00root other 0000040 0000000 berninger/code/ 0040755 0000000 0000001 00000000000 06646460752 0014127 5 ustar 00root other 0000040 0000000 berninger/code/FILELIST 0100644 0000000 0000001 00000001147 06646460742 0015264 0 ustar 00root other 0000040 0000000 Contents of directory:
FILELIST This file.
SAMAG.txt The article text in left-justified flat ASCII format.
bio.txt Brief personal biography
get-fqdn.pl Ancillary Perl script for subnet scanner.
get-namesvrs.pl Ancillary Perl script for DNS query interface.
namemap.tcl Tcl control file for DNS query interface.
sysmon.tcl Master Tcl control file for the tool.
pingtest.tcl Tcl control file for subnet scanner.
subnet-scan.pl Ancillary Perl script for subnet scanner.
tclIndex Tcl index file generated by Tcl's "auto_mkindex"
command - should be regenerated regularly.
berninger/code/pingtest.tcl 0100644 0000000 0000001 00000013716 06646460746 0016500 0 ustar 00root other 0000040 0000000 proc start_ping_test {} {
toplevel .ping_net
wm title .ping_net "Subnet name entry"
set quad1 0
set quad2 0
set quad3 0
message .ping_net.subnetping -text "Please enter the subnet you wish to ping:" -width 20c
entry .ping_net.pingent1 -width 4 -relief sunken -bd 2 -textvariable quad1
entry .ping_net.pingent2 -width 4 -relief sunken -bd 2 -textvariable quad2
entry .ping_net.pingent3 -width 4 -relief sunken -bd 2 -textvariable quad3
button .ping_net.go -text "Start scan" -command "ping_scan"
button .ping_net.done -text "Exit" -command "destroy .ping_net"
frame .ping_net.body
frame .ping_net.footer
pack .ping_net.body .ping_net.footer -in .ping_net -side top -expand 1
pack .ping_net.subnetping .ping_net.pingent1 .ping_net.pingent2 .ping_net.pingent3 -in .ping_net.body -side left -expand 1 -padx 2 -pady 2
pack .ping_net.go .ping_net.done -in .ping_net.footer -side left -expand 1 -padx 2 -pady 2
raise .ping_net.subnetping
raise .ping_net.pingent1
raise .ping_net.pingent2
raise .ping_net.pingent3
raise .ping_net.go
raise .ping_net.done
}
proc ping_scan { } {
global quad1
global quad2
global quad3
if { $quad1 < 0 } {
do_ping_error
return
}
if { $quad1 > 255 } {
do_ping_error
return
}
if { $quad2 < 0 } {
do_ping_error
return
}
if { $quad2 > 255 } {
do_ping_error
return
}
if { $quad3 < 0 } {
do_ping_error
return
}
if { $quad3 > 255 } {
do_ping_error
return
}
do_ping_scan $quad1 $quad2 $quad3
}
proc do_ping_scan { quad1 quad2 quad3 } {
set win "${quad1}-${quad2}-${quad3}"
toplevel .${win}
wm title .${win} "Subnet scan"
frame .${win}.header
frame .${win}.body
frame .${win}.control
frame .${win}.footer
pack .${win}.header .${win}.body .${win}.control .${win}.footer -in .${win} -side top -expand 1
message .${win}.msg -text "Subnet: ${quad1}.${quad2}.${quad3}" -width 20c
pack .${win}.msg -in .${win}.header
button .${win}.update -text "Start Update" -command "update_display $quad1 $quad2 $quad3"
button .${win}.done -text "Close Subnet" -command "destroy .${win}"
pack .${win}.update .${win}.done -in .${win}.control -side top -expand 1
message .${win}.msg1 -text "Welcome to Your Network!" -width 30c
pack .${win}.msg1 -in .${win}.footer -side top -expand 1
for { set i 0 } { $i <= 15 } { incr i } {
frame .${win}.$i
pack .${win}.$i -in .${win}.body -side left -padx 2 -pady 2
}
for { set msb 0 } { $msb <= 15 } { incr msb } {
for { set lsb 0 } { $lsb <= 15 } { incr lsb } {
set host [ expr ${msb} * 16 + ${lsb} ]
button .${win}.host${host} -relief raised -text $host -command "get_host_info $quad1 $quad2 $quad3 $host"
pack .${win}.host${host} -in .${win}.${lsb} -side top -fill both -expand 1 -padx 1 -pady 1
raise .${win}.host${host}
}
}
after 10 [ list update_display $quad1 $quad2 $quad3 ]
}
proc update_display { quad1 quad2 quad3 } {
set win "${quad1}-${quad2}-${quad3}"
.${win}.msg configure -fg blue
update
if [ expr ! [ file exists /sysadmin/PING.${win} ] ] {
# Following command Solaris specific. Please check your man pages.
system /etc/mknod /sysadmin/PING.${win} p
}
eval system /export/home/jberning/perl/uxctl/subnet-scan.pl ${quad1} ${quad2} ${quad3} &
set FIFO [ open /sysadmin/PING.${quad1}-${quad2}-${quad3} r ]
while { [ expr ! [ eof $FIFO ] ] } {
gets $FIFO host_info
set status [ lindex $host_info 1 ]
set hostid [ lindex $host_info 0 ]
if { [ string compare $hostid "" ] != 0 } {
if { $status == 0 } {
catch { .${win}.host${hostid} configure -fg red -activeforeground red }
} else {
catch { .${win}.host${hostid} configure -fg green -activeforeground green }
}
update
}
}
update
.${win}.msg configure -fg black
update
after 300000 [ list update_display $quad1 $quad2 $quad3 ]
}
proc do_ping_error { } {
toplevel .win
frame .win.frm1
frame .win.frm2
label .win.bitmap -bitmap error
message .win.errortext -text "ERROR: Malformed subnet specification." -width 10c
button .win.ok -text OK -command "destroy .win"
pack .win.frm1 .win.frm2 -in .win -side top -expand 1 -padx 2 -pady 2
pack .win.bitmap .win.errortext -in .win.frm1 -side left -expand 1
pack .win.ok -in .win.frm2 -side top -expand 1
raise .win.bitmap
raise .win.errortext
raise .win.ok
tkwait visibility .win.ok
grab set -global .win.ok
}
proc get_host_info { quad1 quad2 quad3 quad4 } {
set host "${quad1}-${quad2}-${quad3}-${quad4}-hinfo"
toplevel .${host}
wm title .$host "Host query"
set host_ip_addr "${quad1}.${quad2}.${quad3}.${quad4}"
set host_fqdn [ exec /export/home/jberning/perl/uxctl/get-fqdn.pl $host_ip_addr ]
if [ expr [ string compare $host_fqdn "NOHOST" ] == 0 ] {
set host_short_name "NOHOST"
set host_domain_name "NODOMAIN"
} else {
set host_short_name [ lindex [ split $host_fqdn "." ] 0 ]
set host_domain_name [ join [ lrange [ split $host_fqdn "." ] 1 end ] "." ]
}
button .${host}.ok -text "OK" -command "destroy .${host}"
frame .${host}.body
frame .${host}.footer
pack .${host}.body .${host}.footer -in .${host} -expand 1 -padx 1 -pady 1
message .${host}.ipinfo -text "Host IP address: ${host_ip_addr}" -width 20c
message .${host}.fqdn -text "Fully qualified domain name: ${host_fqdn}" -width 30c
message .${host}.sname -text "Short name alias: ${host_short_name}" -width 20c
message .${host}.domain -text "Home domain: [ string toupper ${host_domain_name} ]" -width 20c
pack .${host}.ipinfo .${host}.fqdn .${host}.sname .${host}.domain -in .${host}.body -side top -expand 1 -fill both -padx 1 -pady 1
pack .${host}.ok -in .${host}.footer -side top -expand 1
raise .${host}.ok
}
berninger/code/namemap.tcl 0100644 0000000 0000001 00000007611 06646460750 0016251 0 ustar 00root other 0000040 0000000 proc start_name_map { } {
set win "name_map"
toplevel .${win}
wm title .${win} "Name lookup mapping"
set nameservers [ exec /export/home/jberning/perl/uxctl/get-namesvrs.pl ]
set numservers [ llength $nameservers ]
frame .${win}.header
frame .${win}.body
frame .${win}.control
pack .${win}.header .${win}.body .${win}.control -in .${win} -side top -padx 1 -pady 1 -expand 1
for { set i 0 } { $i < $numservers } { incr i } {
button .${win}.server$i -text "[ lindex $nameservers $i ]" -command "setup_search [ lindex $nameservers $i ]"
pack .${win}.server$i -in .${win}.body -side left -expand 1 -padx 1 -pady 1
raise .${win}.server$i
}
message .${win}.servermsg -text "DNS Nameserver lookup" -width 20c
message .${win}.servermsg2 -text "Nameserver selection" -width 20c
pack .${win}.servermsg .${win}.servermsg2 -in .${win}.header -side top -padx 1 -pady 1 -expand 1
raise .${win}.servermsg
raise .${win}.servermsg2
button .${win}.ok -text DONE -command "destroy .${win}"
pack .${win}.ok -in .${win}.control -side top -expand 1
}
proc setup_search { ns } {
set base [ join [ split $ns "." ] "-" ]
set win "${base}-nameserver-window"
toplevel .${win}
wm title .${win} "Nameserver lookup"
frame .${win}.header
frame .${win}.body
frame .${win}.footer
pack .${win}.header .${win}.body .${win}.footer -in .${win} -side top -expand 1 -padx 1 -pady 1
message .${win}.hdrmsg1 -text "DNS Name lookup services" -width 20c
message .${win}.hdrmsg2 -text "Default server: $ns" -width 20c
pack .${win}.hdrmsg1 .${win}.hdrmsg2 -in .${win}.header -side top -expand 1
button .${win}.done -text DONE -command "destroy .${win}"
pack .${win}.done -in .${win}.footer -side top -expand 1 -padx 1 -pady 1
frame .${win}.entry -relief raised
frame .${win}.result -relief raised
pack .${win}.entry .${win}.result -in .${win}.body -side left -expand 1
text .${win}.lookupresults -bd 2 -yscrollcommand ".${win}.scrollresult set"
scrollbar .${win}.scrollresult -command ".${win}.lookupresults yview"
pack .${win}.scrollresult -side right -fill y -in .${win}.result
pack .${win}.lookupresults -side left -in .${win}.result
frame .${win}.entrytop
frame .${win}.entrybot
pack .${win}.entrytop .${win}.entrybot -in .${win}.entry -side top -expand 1 -fill y -pady 3
set lookuparg ""
message .${win}.lookuplbl -text "Hostname or IP address to look up:" -width 20c
entry .${win}.lookupent -relief sunken -bd 2 -textvariable lookuparg
pack .${win}.lookuplbl .${win}.lookupent -in .${win}.entrytop -side top -expand 1
frame .${win}.recordl
frame .${win}.recordr
pack .${win}.recordl .${win}.recordr -in .${win}.entrybot -side left -expand 1 -fill x -anchor n
foreach recordtype [ split "A MX NS CNAME PTR HINFO SOA TXT WKS" " " ] {
button .${win}.record${recordtype} -text "${recordtype} record" -command "do_lookup ${recordtype} ${ns}"
}
foreach rectype [ split "A NS PTR SOA WKS" " "] {
pack .${win}.record${rectype} -in .${win}.recordl -side top -padx 2 -pady 2 -expand 1 -fill x
raise .${win}.record${rectype}
}
foreach rectype [ split "MX CNAME HINFO TXT" " " ] {
pack .${win}.record${rectype} -in .${win}.recordr -side top -padx 2 -pady 2 -expand 1 -fill x
raise .${win}.record${rectype}
}
}
proc do_lookup { rectype server } {
set base [ join [ split $server "." ] "-" ]
set win "${base}-nameserver-window"
global lookuparg
# Following command possibly Solaris dependent. Be sure to check your man pages for the nslookup command.
catch { exec nslookup -type=${rectype} $lookuparg $server } result
.${win}.lookupresults insert end $result
.${win}.lookupresults insert end "\n---------------------------------\n"
}
berninger/code/subnet-scan.pl 0100644 0000000 0000001 00000002335 06646460750 0016704 0 ustar 00root other 0000040 0000000 #!/usr/local/bin/perl
# Check arguments
if ( $#ARGV != 2 ) {
printf "Wrong # args.\n";
exit;
}
# Set network number and name of pipe special file
$quad1 = $ARGV[0];
$quad2 = $ARGV[1];
$quad3 = $ARGV[2];
$win = ${quad1}."-".${quad2}."-".${quad3};
$pipename = "/sysadmin/PING.".${win};
# Create named pipe if it doesn't exist.
unless (-p $pipename) {
unlink $pipename;
system ('/etc/mknod', $pipename, 'p') || die "Can't mknod $pipename: $!";
}
# Open the pipe for writing, set to nonblocking I/O
open ( FIFOPIPE, "> ".$pipename );
select((select(FIFOPIPE), $| = 1)[0]);
# Loop through the subnet in 16 groups of 16 hosts, querying each machine.
# Send the last quad of the IP address and a '1' through the pipe if the host responded,
# last quad and a '0' if it did not.
for ( $mask = 0; $mask < 16; $mask += 1 ) {
if ($pid = fork) {
} elsif (defined $pid) {
for ( $hostid = 0; $hostid < 16; $hostid += 1 ) {
$quad4 = $mask * 16 + $hostid;
$ipaddr = join '.', $quad1, $quad2, $quad3, $quad4;
$result = `/usr/sbin/ping $ipaddr 1`;
if ( $result =~ /alive/ ) {
printf FIFOPIPE "$quad4 1\n";
} else {
printf FIFOPIPE "$quad4 0\n";
}
}
exit;
}
}
berninger/code/get-namesvrs.pl 0100644 0000000 0000001 00000001011 06646460750 0017063 0 ustar 00root other 0000040 0000000 #!/usr/local/bin/perl
# Open the input stream from a system call
open ( SERVERS, "cat /etc/resolv.conf | grep nameserver | cut -f 2 -d ' ' |");
# For each nameserver line found in the resolv.conf file, put the name of the
# machine onto the stack.
while ( $line =
Creating and installing User Certificates requires you to perform a
number of steps in the correct order.
Install Le Reseau's CA certificate
Create and install user certificates
Security Certificate Management
These steps are listen below, please perform each of these carefully.
After installing a user certificate, you should test them with the option
given at the end of the installation.
This step is only needed once on each browser
You need to do this for each user that will be using the browser
Please enter the requested information below. All fields are required.
donkl4.txt 0100644 0000000 0000001 00000002546 06646460753 0013203 0 ustar 00root other 0000040 0000000 Listing 4. Perl program for signing client certificate #!/usr/local/bin/perl $SECURITYPASSWD="Geheim"; $CAROOT="demoCA"; %certdata; sub passwderr { print <Click here to install your certificate.
Click here to test your certificate.