MMCT TEAM
Server IP : 111.118.215.189  /  Your IP : 3.136.20.207
Web Server : Apache
System : Linux md-in-83.webhostbox.net 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64
User : a1673wkz ( 2475)
PHP Version : 8.2.25
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0755) :  /usr/share/emacs/24.3/lisp/net/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : //usr/share/emacs/24.3/lisp/net/ntlm.elc
;ELC
;;; Compiled by mockbuild@buildfarm06-new.corp.cloudlinux.com on Fri Oct 11 10:10:34 2024
;;; from file /builddir/build/BUILD/emacs-24.3/lisp/net/ntlm.el
;;; in Emacs version 24.3.1
;;; with all optimizations.

;;; This file uses dynamic docstrings, first added in Emacs 19.29.

;;; This file does not contain utf-8 non-ASCII characters,
;;; and so can be loaded in Emacs versions earlier than 23.

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


(require 'md4)
#@281 Return the NTLM authentication request string for USER and DOMAIN.
USER is a string representing a user name to be authenticated and
DOMAIN is a NT domain.  USER can include a NT domain part as in
user@domain where the string after @ is used as the domain if DOMAIN
is not given.
(defalias 'ntlm-build-auth-request #[(user &optional domain) "\306\307\310\311\"P\307\310\211\"\307\312\311\"P\307\310\313\"\307\310\314\"\307\315\311\"Q\316\211\211\211\317\320\"\203F\204>\311\224T\316O\311\211\224OGG\321\211\\
\f\322!\322!\323\311B!\322\n!\322\n!\323\311	B!\260.\207" [off-u off-d ld lu request-flags request-msgType "NTLMSSP" make-string 1 0 3 7 178 2 nil string-match "@" 32 md4-pack-int16 md4-pack-int32 request-ident user domain] 12 (#$ . 567) nil])
#@331 Return the response string to a challenge string CHALLENGE given by
the NTLM based server for the user USER and the password hash list
PASSWORD-HASHES.  NTLM uses two hash values which are represented
by PASSWORD-HASHES.  PASSWORD-HASHES should be a return value of
 (list (ntlm-smb-passwd-hash password) (ntlm-md4hash password))
(defalias 'ntlm-build-auth-response #[(challenge user password-hashes) "\306!\211\307\310O	\310\311O	\311\312O\313\211 \313\211!\"\313\211#$\313\211%&\313\211'(\313\211)*\313+\314\n\315\316O!\317\n\320\321O! \322 A A
\\O
\316\245\"#\323\324,\"\203r,\315\224T\313O#,\315\211\224O,\325-@\f\"!\325-\211.A@)\f\"\",G$#G%\326&\327'\330(\331\326\332%\316_#)\331\326\332%$\\\316_#*\331\326\332\331%$\211#\316_#+\333\334\335!\336\311!\336\311!\334\315&B!\336\311!\336\311!\334\315'B!\336%\316_!\336%\316_!\334\315(B!\336$\316_!\336$\316_!\334\315)B!\336$\316_!\336$\316_!\334\315*B!\336\315!\336\315!\334\315+&ZB!!\"\337#\211G\"\337,\211G\"\337,\211G\"\260.\207" [challenge rchallenge uDomain flags challengeData uDomain-len string-as-unibyte 12 20 24 32 nil md4-unpack-int16 0 2 md4-unpack-int32 4 8 ntlm-unicode2ascii string-match "@" ntlm-smb-owf-encrypt 64 88 112 + 48 "NTLMSSP" md4-pack-int32 (0 . 3) md4-pack-int16 ntlm-ascii2unicode uDomain-offs lmRespData ntRespData domain lu ld off-lm off-nt off-d off-u off-w off-s user password-hashes x] 29 (#$ . 1369)])
#@75 Return a pair of SMB hash and NT MD4 hash of the given password PASSWORD.
(defalias 'ntlm-get-password-hashes #[(password) "\301!\302!D\207" [password ntlm-smb-passwd-hash ntlm-md4hash] 3 (#$ . 2835)])
#@81 Convert an ASCII string into a NT Unicode string, which is
little-endian utf16.
(defalias 'ntlm-ascii2unicode #[(str len) "\305\306_\307\"\307\310\nW\2031\311\f\nH\211!\2041\n\306_	I\210\n\306_T\307I\210\nT\211\202\f+\207" [len val i utf str make-string 2 0 nil zerop] 4 (#$ . 3045)])
#@78 Extract 7 bits ASCII part of a little endian utf16 string STR of length LEN.
(defalias 'ntlm-unicode2ascii #[(str len) "\305\306\"\306\211\nW\203#\n\307\f	H\310\"I\210\nT\311	\\\202	+\207" [len j i buf str make-string 0 logand 127 2] 5 (#$ . 3349)])
#@136 Return the SMB password hash string of 16 bytes long for the given password
string PASSWD.  PASSWD is truncated to 14 bytes if longer.
(defalias 'ntlm-smb-passwd-hash #[(passwd) "G\302^\303\226\304	O\305\306	Z\304\"P!)\207" [passwd len 14 ntlm-smb-des-e-p16 0 make-string 15] 5 (#$ . 3617)])
#@192 Return the response string of 24 bytes long for the given password
string PASSWD based on the DES encryption.  PASSWD is of at most 14
bytes long and the challenge string C8 of 8 bytes long.
(defalias 'ntlm-smb-owf-encrypt #[(passwd c8) "G\304^\305\306\nO\307\310\nZ\306\"P\311	\"*\207" [passwd p22 len c8 16 nil 0 make-string 22 ntlm-smb-des-e-p24] 4 (#$ . 3919)])
#@84 Return a 24 bytes hashed string for a 21 bytes string P22 and a 8 bytes
string C8.
(defalias 'ntlm-smb-des-e-p24 #[(p22 c8) "\302	\303#\302	\304\305O\303#\302	\306\305O\303#Q\207" [c8 p22 ntlm-smb-hash t 7 nil 14] 7 (#$ . 4297)])
(defconst ntlm-smb-sp8 [75 71 83 33 64 35 36 37])
#@60 Return a 16 bytes hashed string for a 15 bytes string P15.
(defalias 'ntlm-smb-des-e-p16 #[(p15) "\302	\303#\302	\304\305O\303#P\207" [ntlm-smb-sp8 p15 ntlm-smb-hash t 7 nil] 6 (#$ . 4586)])
#@113 Return the hash string of length 8 for a string IN of length 8 and
a string KEY of length 8.  FORW is t or nil.
(defalias 'ntlm-smb-hash #[(in key forw) "\306\307\310\"\311\306\312\310\"\306\312\310\"\313!\310\311\n\312W\203[\314\315\n\307\245H\316\317\320\n\307\246Z\"\"!\204;
\n\317I\210\314\315\n\307\245H\316\317\320\n\307\246Z\"\"!\204T\f\n\317I\210\nT\211\202\321
\f#\310\211\312W\203\224\314\nH!\204\215\n\307\245H\n\307\245\322	\316\317\320\n\307\246Z\"\"I\210\nT\211\202f.\207" [key aa i key2 keyb inb make-string 8 0 nil 64 ntlm-smb-str-to-key zerop logand lsh 1 7 ntlm-smb-dohash logior outb out in forw] 10 (#$ . 4786)])
#@67 Return a string of length 8 for the given string STR of length 7.
(defalias 'ntlm-smb-str-to-key #[(str) "\303\304\305\"\306\211\305\307\n\305H\310\"I\210	\311\312\307\313\n\305H\311\"\314\"\307\n\311H\315\"\"I\210	\316\312\307\313\n\311H\317\"\320\"\307\n\316H\321\"\"I\210	\317\312\307\313\n\316H\306\"\322\"\307\n\317H\323\"\"I\210	\322\312\307\313\n\317H\324\"\317\"\307\n\322H\325\"\"I\210	\320\312\307\313\n\322H\326\"\316\"\307\n\320H\327\"\"I\210	\314\312\307\313\n\320H\330\"\311\"\307\n\314H\331\"\"I\210	\306\313\n\314H\332\"I\210\305Y\203\260	\307	H\311\"I\210S\211\202\232	*\207" [i key str make-string 8 0 7 lsh -1 1 logior logand 6 -2 2 3 5 -3 4 -4 15 -5 31 -6 63 -7 127] 8 (#$ . 5463)])
(defconst ntlm-smb-perm1 [57 49 41 33 25 17 9 1 58 50 42 34 26 18 10 2 59 51 43 35 27 19 11 3 60 52 44 36 63 55 47 39 31 23 15 7 62 54 46 38 30 22 14 6 61 53 45 37 29 21 13 5 28 20 12 4])
(defconst ntlm-smb-perm2 [14 17 11 24 1 5 3 28 15 6 21 10 23 19 12 4 26 8 16 7 27 20 13 2 41 52 31 37 47 55 30 40 51 45 33 48 44 49 39 56 34 53 46 42 50 36 29 32])
(defconst ntlm-smb-perm3 [58 50 42 34 26 18 10 2 60 52 44 36 28 20 12 4 62 54 46 38 30 22 14 6 64 56 48 40 32 24 16 8 57 49 41 33 25 17 9 1 59 51 43 35 27 19 11 3 61 53 45 37 29 21 13 5 63 55 47 39 31 23 15 7])
(defconst ntlm-smb-perm4 [32 1 2 3 4 5 4 5 6 7 8 9 8 9 10 11 12 13 12 13 14 15 16 17 16 17 18 19 20 21 20 21 22 23 24 25 24 25 26 27 28 29 28 29 30 31 32 1])
(defconst ntlm-smb-perm5 [16 7 20 21 29 12 28 17 1 15 23 26 5 18 31 10 2 8 24 14 32 27 3 9 19 13 30 6 22 11 4 25])
(defconst ntlm-smb-perm6 [40 8 48 16 56 24 64 32 39 7 47 15 55 23 63 31 38 6 46 14 54 22 62 30 37 5 45 13 53 21 61 29 36 4 44 12 52 20 60 28 35 3 43 11 51 19 59 27 34 2 42 10 50 18 58 26 33 1 41 9 49 17 57 25])
(defconst ntlm-smb-sc [1 1 2 2 2 2 2 2 1 2 2 2 2 2 2 1])
(defconst ntlm-smb-sbox [[[14 4 13 1 2 15 11 8 3 10 6 12 5 9 0 7] [0 15 7 4 14 2 13 1 10 6 12 11 9 5 3 8] [4 1 14 8 13 6 2 11 15 12 9 7 3 10 5 0] [15 12 8 2 4 9 1 7 5 11 3 14 10 0 6 13]] [[15 1 8 14 6 11 3 4 9 7 2 13 12 0 5 10] [3 13 4 7 15 2 8 14 12 0 1 10 6 9 11 5] [0 14 7 11 10 4 13 1 5 8 12 6 9 3 2 15] [13 8 10 1 3 15 4 2 11 6 7 12 0 5 14 9]] [[10 0 9 14 6 3 15 5 1 13 12 7 11 4 2 8] [13 7 0 9 3 4 6 10 2 8 5 14 12 11 15 1] [13 6 4 9 8 15 3 0 11 1 2 12 5 10 14 7] [1 10 13 0 6 9 8 7 4 15 14 3 11 5 2 12]] [[7 13 14 3 0 6 9 10 1 2 8 5 11 12 4 15] [13 8 11 5 6 15 0 3 4 7 2 12 1 10 14 9] [10 6 9 0 12 11 7 13 15 1 3 14 5 2 8 4] [3 15 0 6 10 1 13 8 9 4 5 11 12 7 2 14]] [[2 12 4 1 7 10 11 6 8 5 3 15 13 0 14 9] [14 11 2 12 4 7 13 1 5 0 15 10 3 9 8 6] [4 2 1 11 10 13 7 8 15 9 12 5 6 3 0 14] [11 8 12 7 1 14 2 13 6 15 0 9 10 4 5 3]] [[12 1 10 15 9 2 6 8 0 13 3 4 14 7 5 11] [10 15 4 2 7 12 9 5 6 1 13 14 0 11 3 8] [9 14 15 5 2 8 12 3 7 0 4 10 1 13 11 6] [4 3 2 12 9 5 15 10 11 14 1 7 6 0 8 13]] [[4 11 2 14 15 0 8 13 3 12 9 7 5 10 6 1] [13 0 11 7 4 9 1 10 14 3 5 12 2 15 8 6] [1 4 11 13 12 3 7 14 10 15 6 8 0 5 9 2] [6 11 13 8 1 4 10 7 9 5 0 15 14 2 3 12]] [[13 2 8 4 6 15 11 1 10 9 3 14 5 0 12 7] [1 15 13 8 10 3 7 4 12 5 6 11 0 14 9 2] [7 11 4 1 9 12 14 2 0 6 10 13 15 3 5 8] [2 1 14 7 4 10 8 13 15 12 9 0 3 5 6 11]]])
#@130 Return a string of length N for a string IN and a permutation vector
PERM of size N.  The length of IN should be height of PERM.
(defalias 'ntlm-string-permute #[(in perm n) "\305\306\305\"\211W\203	\n\f\nHSHI\210\nT\211\202	*\207" [n out i in perm 0 make-string] 6 (#$ . 8609)])
(put 'ntlm-string-permute 'byte-optimizer 'byte-compile-inline-expand)
#@97 Return a string by circularly shifting a string STR by COUNT to the left.
length of STR is LEN.
(defalias 'ntlm-string-lshift #[(str count len) "	\246\n	O\304\nOP)\207" [count len c str 0] 4 (#$ . 8976)])
(put 'ntlm-string-lshift 'byte-optimizer 'byte-compile-inline-expand)
#@46 Return exclusive-or of sequences in1 and in2
(defalias 'ntlm-string-xor #[(in1 in2 n) "\305\306\"\306	W\203 \n	\307	H\f	H\"I\210	T\211\202\n*\207" [n i w in1 in2 make-string 0 logxor] 7 (#$ . 9261)])
(put 'ntlm-string-xor 'byte-optimizer 'byte-compile-inline-expand)
#@135 Return the hash value for a string IN and a string KEY.
Length of IN and KEY are 64.  FORW non-nil means forward, nil means
backward.
(defalias 'ntlm-smb-dohash #[(in key forw) "\306\211\211\211\307\310\311\"\306\211\211\211\311\211\211 !\"#$\312%&'\311\313%\311\"(\211%W\203P(\n'&\nHSHI\210\nT\211\2026(-\211\"\311\314O!\"\314\312O \311\211\310W\203\377!)\nH\314*+,+*\246!,!*O,\311!OP,! )\nH\314*+,+*\246!,!*O,\311!OP, !\311\314O \311\314OP\n-\315%&'\311\313%\311\"(\211%W\203\363(\n'&\nHSHI\210\nT\211\202\331(-I\210\nT\211\202e'.\316%&'\311\313%\311\"(\211%W\203.(\n'&\nHSHI\210\nT\211\202(-\211\311\317O\317\316O\311\306\211\307\320\311\"\306\211\211\211\211\211\211\211/0%12345678\n\310W\203\f9\315%&'\311\313%\311\"(\211%W\203\230(\n'&\nHSHI\210\nT\211\202~(-\2118:\203\251\n\202\254\321\nZH\315%;<\313%\311\"\311=\n%W\203\332=\n\322<\nH;\nH\"I\210\nT\211\202\276=-7\311\211\320W\203	\323_26	72\211\323\\OI\210	T\211\202\342\311\211\320W\203u6	H0\324\3250\311H\326\"0\327H\"1\324\3250\326H\330\"\3250\331H\331\"\3250\330H\326\"0\332H$%\311>	H1H%H/\332W\203n0\333\334/\325\326\330Z\"\"!\203d\311\202e\326I\210T\211\202I	T\211\202\311\3065	\320W\203\22356	H\311\332OP5	T\211\202{5?\317%&'\311\313%\311\"(\211%W\203\302(\n'&\nHSHI\210\nT\211\202\250(-4
4\317%;<\313%\311\"\311=\n%W\203\367=\n\322<\nH;\nH\"I\210\nT\211\202\333=-3\f3\nT\211\202e.\f
P\211@\316%&'\311\313%\311\"(\211%W\203<(\n'&\nHSHI\210\nT\211\202\"(.\207" [k j i rl r l nil make-vector 16 0 56 make-string 28 48 64 32 8 15 logxor 6 logior lsh 1 5 3 2 4 zerop logand pd1 ki cd d c pk1 key ntlm-smb-perm1 n perm in out ntlm-smb-sc len count str ntlm-smb-perm2 ntlm-smb-perm3 sbox-jmn bj m jj r2 pcb cb b erk er ntlm-smb-perm4 forw in2 in1 w ntlm-smb-sbox ntlm-smb-perm5 ntlm-smb-perm6] 13 (#$ . 9544)])
#@137 Return the 16 bytes MD4 hash of a string PASSWD after converting it
into a Unicode string.  PASSWD is truncated to 128 bytes if longer.
(defalias 'ntlm-md4hash #[(passwd) "\303\211\nG\211\304V\203\304\305\n	\"	\306_\307	\"*\207" [wpwd len passwd nil 128 ntlm-ascii2unicode 2 md4] 4 (#$ . 11590)])
(provide 'ntlm)

MMCT - 2023