Linux web-conference.aiou.edu.pk 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64
Apache/2.4.41 (Ubuntu)
: 172.16.50.247 | : 3.12.165.68
Cant Read [ /etc/named.conf ]
7.4.3-4ubuntu2.28
appadmin
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
BLACK DEFEND!
README
+ Create Folder
+ Create File
/
usr /
share /
doc /
libxml-parser-perl /
examples /
[ HOME SHELL ]
Name
Size
Permission
Action
REC-xml-19980210.xml
155.62
KB
-rw-r--r--
canonical
2.77
KB
-rwxr-xr-x
canontst.xml
510
B
-rw-r--r--
ctest.dtd
71
B
-rw-r--r--
xmlcomments
684
B
-rwxr-xr-x
xmlfilter
6.25
KB
-rwxr-xr-x
xmlstats
3.36
KB
-rwxr-xr-x
Delete
Unzip
Zip
${this.title}
Close
Code Editor : xmlstats
#!/usr/bin/perl -w # # $Revision: 1.1.1.1 $ # # $Date: 2003-07-27 11:07:11 $ package Elinfo; sub new { bless { COUNT => 0, MINLEV => undef, SEEN => 0, CHARS => 0, EMPTY => 1, PTAB => {}, KTAB => {}, ATAB => {} }, shift; } package main; use English; use XML::Parser; my %elements; my $seen = 0; my $root; my $file = shift; my $subform = ' @<<<<<<<<<<<<<<< @>>>>'; die "Can't find file \"$file\"" unless -f $file; my $parser = new XML::Parser( ErrorContext => 2 ); $parser->setHandlers( Start => \&start_handler, Char => \&char_handler ); $parser->parsefile($file); set_minlev( $root, 0 ); my $el; foreach $el ( sort bystruct keys %elements ) { my $ref = $elements{$el}; print "\n================\n$el: ", $ref->{COUNT}, "\n"; print "Had ", $ref->{CHARS}, " bytes of character data\n" if $ref->{CHARS}; print "Always empty\n" if $ref->{EMPTY}; showtab( 'Parents', $ref->{PTAB}, 0 ); showtab( 'Children', $ref->{KTAB}, 1 ); showtab( 'Attributes', $ref->{ATAB}, 0 ); } ################ ## End of main ################ sub start_handler { my $p = shift; my $el = shift; my $elinf = $elements{$el}; if ( not defined($elinf) ) { $elements{$el} = $elinf = new Elinfo; $elinf->{SEEN} = $seen++; } $elinf->{COUNT}++; my $partab = $elinf->{PTAB}; my $parent = $p->current_element; if ( defined($parent) ) { $partab->{$parent}++; my $pinf = $elements{$parent}; # Increment our slot in parent's child table $pinf->{KTAB}->{$el}++; $pinf->{EMPTY} = 0; } else { $root = $el; } # Deal with attributes my $atab = $elinf->{ATAB}; while (@_) { my $att = shift; $atab->{$att}++; shift; # Throw away value } } # End start_handler sub char_handler { my ( $p, $data ) = @_; my $inf = $elements{ $p->current_element }; $inf->{EMPTY} = 0; if ( $data =~ /\S/ ) { $inf->{CHARS} += length($data); } } # End char_handler sub set_minlev { my ( $el, $lev ) = @_; my $elinfo = $elements{$el}; if ( !defined( $elinfo->{MINLEV} ) or $elinfo->{MINLEV} > $lev ) { my $newlev = $lev + 1; $elinfo->{MINLEV} = $lev; foreach ( keys %{ $elinfo->{KTAB} } ) { set_minlev( $_, $newlev ); } } } # End set_minlev sub bystruct { my $refa = $elements{$a}; my $refb = $elements{$b}; $refa->{MINLEV} <=> $refb->{MINLEV} or $refa->{SEEN} <=> $refb->{SEEN}; } # End bystruct sub showtab { my ( $title, $table, $dosum ) = @_; my @list = sort keys %{$table}; if (@list) { print "\n $title:\n"; my $item; my $sum = 0; foreach $item (@list) { my $cnt = $table->{$item}; $sum += $cnt; formline( $subform, $item, $cnt ); print $ACCUMULATOR, "\n"; $ACCUMULATOR = ''; } if ( $dosum and @list > 1 ) { print " =====\n"; formline( $subform, '', $sum ); print $ACCUMULATOR, "\n"; $ACCUMULATOR = ''; } } } # End showtab # Tell Emacs that this is really a perl script # Local Variables: # mode:perl # End:
Close