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.216
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 : LWPsearch.pl
#!/usr/bin/perl -w use open OUT => ':utf8'; use LWP::UserAgent; use MIME::Base64; use Getopt::Long; # option variables my $user = ''; my $password = ''; my $format = ''; # get options my $result = GetOptions('u|user=s' => \$user, 'p|password=s' => \$password, 'f|format=s' => \$format); # die on errors on the command line die "Usage: LWPsearch [<options>] <LDAP-URL>\n" . " where <options> are:\n" . " -f --format {dsml|html|json|ldif} output format\n" . " -u --user <username> user name (DN) to logon to LDAP server\n" . " -p --password <password> password to logon to LDAP server\n" if (!$result || scalar(@ARGV) != 1 || ($format && $format !~ /^(dsml|json|ldif|html)$/)); # create a user agent object my $ua = LWP::UserAgent->new; $ua->agent("LWPsearch"); # add headers as requested my %headers = (); $headers{Accept} = "text/$format" if ($format); $headers{Authorization} = 'Basic '.encode_base64("$user:$password") if ($user); # pass GET request to the user agent and get a response back my $res = $ua->get($ARGV[0], %headers); # check the outcome of the response if ($res->is_success) { print $res->content; } else { print $res->status_line, ($res->content) ? ' ('.$res->content.')' : '', "\n"; } =head1 NAME LWPsearch.pl -- perform LDAP search using LWP mechanisms =head1 SYNOPSIS B<LWPsearch.pl> [B<-f|--format> {C<dsml>|C<html>|C<json>|C<ldif>}] [B<-u|--user> I<user>] [B<-p|--password> I<password>] B<LDAP-URL> =head1 DESCRIPTION LWPsearch.pl parses the LDAP URL given on the command line using the methods provided by C<LWP::Protocol::ldap> message, connects to the LDAP server given in the URL, and performs the search described in the URL. If user and password are given, they are used to do a simple bind before the search. The output depends on the option B<-f|--format>. =head1 OPTIONS =over 4 =item B<-f|--format> {C<dsml>|C<html>|C<json>|C<ldif>} Specifies the the output format to use. For the format C<json> to work, the Perl module C<JSON> needs to be installed. =item B<-u|--user> I<user> Specifies the user to log on to the LDAP server. The I<user> must be a DN. =item B<-p|--password> I<password> Specifies the password with which the I<user> logs on to the LDAP server. =back =head1 ARGUMENTS LWPsearch.pl only takes one argument. B<LDAP-URL>, an LDAP URL as described in L<RFC 4516|http://tools.ietf.org/html/rfc4516>. =head1 AUTHOR Peter Marschall <peter@adpm.de> =head1 COPYRIGHT & LICENSE Copyright (c) 2012 Peter Marschall All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =cut
Close