Dre4m Shell
Server IP : 85.214.239.14  /  Your IP : 3.145.166.223
Web Server : Apache/2.4.62 (Debian)
System : Linux h2886529.stratoserver.net 4.9.0 #1 SMP Tue Jan 9 19:45:01 MSK 2024 x86_64
User : www-data ( 33)
PHP Version : 7.4.18
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
MySQL : OFF  |  cURL : OFF  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : OFF
Directory :  /proc/3/root/proc/3/task/3/cwd/proc/2/task/2/cwd/usr/share/doc/exim4-base/examples/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : /proc/3/root/proc/3/task/3/cwd/proc/2/task/2/cwd/usr/share/doc/exim4-base/examples/cramtest.pl
#!/usr/bin/perl

# This script is contributed by Vadim Vygonets to aid in debugging CRAM-MD5
# authentication.

# A patch was contributed by Jon Warbrick to upgrade it to use the Digest::MD5
# module instead of the deprecated MD5 module.

# The script prompts for three data values: a user name, a password, and the
# challenge as sent out by an SMTP server. The challenge is a base-64 string.
# It should be copied (cut-and-pasted) literally as the third data item. The
# output of the program is the base-64 string that is to be returned as the
# response to the challenge. Using the example in RFC 2195:
#
# User: tim
# Password: tanstaaftanstaaf
# Challenge: PDE4OTYuNjk3MTcwOTUyQHBvc3RvZmZpY2UucmVzdG9uLm1jaS5uZXQ+
# dGltIGI5MTNhNjAyYzdlZGE3YTQ5NWI0ZTZlNzMzNGQzODkw
#
# The last line is what you you would send back to the server.


# Copyright (c) 2002
#       Vadim Vygonets <vadik-exim@vygo.net>.  All rights reserved.
# Public domain is OK with me.

BEGIN { pop @INC if $INC[-1] eq '.' };

use MIME::Base64;
use Digest::MD5;

print "User: ";
chop($user = <>);
print "Password: ";
chop($passwd = <>);
print "Challenge: ";
chop($chal = <>);
$chal =~ s/^334 //;

$context = new Digest::MD5;
if (length($passwd) > 64) {
        $context->add($passwd);
        $passwd = $context->digest();
        $context->reset();
}

@passwd = unpack("C*", pack("a64", $passwd));
for ($i = 0; $i < 64; $i++) {
        $pass_ipad[$i] = $passwd[$i] ^ 0x36;
        $pass_opad[$i] = $passwd[$i] ^ 0x5C;
}
$context->add(pack("C64", @pass_ipad), decode_base64($chal));
$digest = $context->digest();
$context->reset();
$context->add(pack("C64", @pass_opad), $digest);
$digest = $context->digest();

print encode_base64($user . " " . unpack("H*", $digest));

# End

Anon7 - 2022
AnonSec Team