Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 844853 Details for
Bug 888169
dev-python/ntlm-auth-1.5.0 fails tests (DASH-SYSTEM)
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
build.log
build.log (text/plain), 269.58 KB, created by
Agostino Sarubbo
on 2022-12-24 12:10:45 UTC
(
hide
)
Description:
build.log
Filename:
MIME Type:
Creator:
Agostino Sarubbo
Created:
2022-12-24 12:10:45 UTC
Size:
269.58 KB
patch
obsolete
> * Package: dev-python/ntlm-auth-1.5.0:0 > * Repository: gentoo > * Maintainer: voyageur@gentoo.org python@gentoo.org > * USE: abi_x86_64 amd64 elibc_glibc kernel_linux python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 test userland_GNU > * FEATURES: network-sandbox preserve-libs sandbox test userpriv usersandbox > > >@@@@@ PLEASE PAY ATTENTION HERE!!! @@@@@ >This information may help you to understand if this is a duplicate or if this bug exists after you pushed a fix; >This ebuild was merged at the following commit: >https://github.com/gentoo-mirror/gentoo/commit/b1ab8ecd5543f4a930579f380dc2b42170046ac0 (Sat Dec 24 10:02:19 UTC 2022) >@@@@@ END @@@@@ > > > >################## ># emerge --info: # >################## >Portage 3.0.41 (python 3.10.9-final-0, default/linux/amd64/17.1, gcc-12, glibc-2.36-r6, 5.15.77-gentoo-dist x86_64) >================================================================= >System uname: Linux-5.15.77-gentoo-dist-x86_64-AMD_EPYC_7513_32-Core_Processor-with-glibc2.36 >KiB Mem: 263533016 total, 98272984 free >KiB Swap: 0 total, 0 free >Timestamp of repository gentoo: Sat, 24 Dec 2022 10:02:18 +0000 >sh dash 0.5.12 >ld GNU ld (Gentoo 2.39 p5) 2.39.0 >app-misc/pax-utils: 1.3.5::gentoo >app-shells/bash: 5.2_p15::gentoo >dev-lang/perl: 5.36.0-r1::gentoo >dev-lang/python: 3.8.16::gentoo, 3.9.16::gentoo, 3.10.9::gentoo, 3.11.1::gentoo >dev-lang/rust: 1.66.0::gentoo >dev-util/cmake: 3.25.1::gentoo >dev-util/meson: 0.64.1::gentoo >sys-apps/baselayout: 2.9::gentoo >sys-apps/openrc: 0.45.2-r2::gentoo >sys-apps/sandbox: 2.29::gentoo >sys-devel/autoconf: 2.71-r5::gentoo >sys-devel/automake: 1.16.5::gentoo >sys-devel/binutils: 2.39-r4::gentoo >sys-devel/binutils-config: 5.4.1::gentoo >sys-devel/clang: 15.0.6::gentoo >sys-devel/gcc: 12.2.1_p20221210::gentoo >sys-devel/gcc-config: 2.8::gentoo >sys-devel/libtool: 2.4.7-r1::gentoo >sys-devel/llvm: 15.0.6::gentoo >sys-devel/make: 4.4::gentoo >sys-kernel/linux-headers: 6.1::gentoo (virtual/os-headers) >sys-libs/glibc: 2.36-r6::gentoo >Repositories: > >gentoo > location: /usr/portage > sync-type: rsync > sync-uri: rsync://rsync.gentoo.org/gentoo-portage > priority: -1000 > sync-rsync-extra-opts: > sync-rsync-verify-metamanifest: yes > sync-rsync-verify-jobs: 1 > sync-rsync-verify-max-age: 24 > >ACCEPT_KEYWORDS="amd64 ~amd64" >ACCEPT_LICENSE="* MIT" >CBUILD="x86_64-pc-linux-gnu" >CFLAGS="-O2 -pipe -pipe -march=x86-64 -frecord-gcc-switches -fno-diagnostics-color -fmessage-length=0" >CHOST="x86_64-pc-linux-gnu" >CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt" >CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo" >CXXFLAGS="-O2 -pipe -pipe -march=x86-64 -frecord-gcc-switches -fno-diagnostics-color -fmessage-length=0" >DISTDIR="/var/tmp/portage/dev-python/ntlm-auth-1.5.0/distdir" >EMERGE_DEFAULT_OPTS="--with-bdeps=y -1 -k -b" >ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR XDG_STATE_HOME" >FCFLAGS="-O2 -pipe -pipe -march=x86-64 -frecord-gcc-switches -fno-diagnostics-color -fmessage-length=0" >FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance buildpkg buildpkg-live config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms sign split-log strict test unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr" >FFLAGS="-O2 -pipe -pipe -march=x86-64 -frecord-gcc-switches -fno-diagnostics-color -fmessage-length=0" >GENTOO_MIRRORS="http://mirror.leaseweb.com/gentoo/ http://ftp.snt.utwente.nl/pub/os/linux/gentoo/ http://ftp.belnet.be/pub/rsync.gentoo.org/gentoo/ http://distfiles.gentoo.org" >LANG="C.UTF8" >LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--defsym=__gentoo_check_ldflags__=0" >LEX="flex" >MAKEOPTS="-j16" >PKGDIR="/root/tbci/binpkg" >PORTAGE_CONFIGROOT="/" >PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git" >PORTAGE_TMPDIR="/var/tmp" >SHELL="/bin/bash" >USE="acl amd64 bzip2 cli crypt dri elogind fortran gdbm iconv ipv6 jumbo-build libglvnd libtirpc multilib native-symlinks ncurses nls nptl openmp pam pcre readline seccomp split-usr ssl test test-rust unicode xattr zlib" ABI_X86="64" ELIBC="glibc" KERNEL="linux" PYTHON_TARGETS="python3_8 python3_9 python3_10" USERLAND="GNU" >Unset: ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LD, LFLAGS, LIBTOOL, LINGUAS, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS > > > > > >############################## ># emerge history (qlop -mv): # >############################## >2022-12-24T11:12:50 >>> sys-apps/lsb-release-3.2 >2022-12-24T11:12:51 >>> app-eselect/eselect-rust-20210703 >2022-12-24T11:12:51 >>> dev-python/semantic_version-2.10.0 >2022-12-24T11:12:52 >>> dev-python/ply-3.11-r2 >2022-12-24T11:12:56 >>> dev-lang/rust-1.66.0 >2022-12-24T11:12:59 >>> dev-python/pycparser-2.21-r1 >2022-12-24T11:13:14 >>> virtual/rust-1.66.0 >2022-12-24T11:13:16 >>> dev-python/cffi-1.15.1 >2022-12-24T11:13:18 >>> dev-python/setuptools-rust-1.5.2 >2022-12-24T11:13:22 >>> dev-python/cryptography-38.0.4 >2022-12-24T11:13:25 >>> dev-python/ntlm-auth-1.5.0 >2022-12-24T11:13:40 >>> dev-python/iniconfig-1.1.1-r1 >2022-12-24T11:13:40 >>> dev-python/pluggy-1.0.0-r2 >2022-12-24T11:13:41 >>> dev-python/exceptiongroup-1.1.0 >2022-12-24T11:13:42 >>> dev-python/zope-interface-5.5.2 >2022-12-24T11:13:42 >>> dev-python/flit_scm-1.7.0 >2022-12-24T11:13:50 >>> dev-python/attrs-22.2.0 >2022-12-24T11:13:53 >>> dev-python/pytest-7.2.0 > > > > >####################################### ># installed packages (qlist -ICvUSS): # >####################################### >acct-group/audio-0-r1:0 >acct-group/cdrom-0-r1:0 >acct-group/dialout-0-r1:0 >acct-group/disk-0-r1:0 >acct-group/input-0-r1:0 >acct-group/kmem-0-r1:0 >acct-group/kvm-0-r1:0 >acct-group/lp-0-r1:0 >acct-group/man-0-r1:0 >acct-group/messagebus-0-r1:0 >acct-group/polkitd-0-r1:0 >acct-group/portage-0:0 >acct-group/render-0-r1:0 >acct-group/sgx-0:0 >acct-group/sshd-0-r1:0 >acct-group/tape-0-r1:0 >acct-group/tty-0-r1:0 >acct-group/video-0-r1:0 >acct-user/man-1-r1:0 >acct-user/messagebus-0-r1:0 >acct-user/polkitd-0-r1:0 >acct-user/portage-0:0 >acct-user/sshd-0-r1:0 >app-admin/eselect-1.4.20:0 -doc -emacs -vim-syntax >app-admin/perl-cleaner-2.30:0 >app-alternatives/awk-4:0 -busybox gawk -mawk -nawk split-usr >app-alternatives/bc-0:0 -gh gnu >app-alternatives/bzip2-1:0 -lbzip2 -pbzip2 reference split-usr >app-alternatives/gzip-0:0 -pigz reference split-usr >app-alternatives/lex-0-r1:0 flex -reflex >app-alternatives/sh-0:0 -bash dash -ksh -lksh -mksh >app-alternatives/tar-0:0 gnu -libarchive split-usr >app-alternatives/yacc-1-r2:0 bison -byacc -reference >app-arch/bzip2-1.0.8-r4:0/1 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 split-usr -static -static-libs -verify-sig >app-arch/gzip-1.12-r3:0 -pic -static -verify-sig >app-arch/libarchive-3.6.1-r1:0/13 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 acl -blake2 bzip2 e2fsprogs -expat iconv -lz4 lzma -lzo -nettle -static-libs -verify-sig xattr -zstd >app-arch/tar-1.34-r2:0 acl -minimal nls -selinux -verify-sig xattr >app-arch/unzip-6.0_p27-r1:0 bzip2 -natspec unicode >app-arch/xz-utils-5.4.0:0 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 extra-filters nls split-usr -static-libs -verify-sig >app-arch/zstd-1.5.2-r3:0/1 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 -lz4 split-usr -static-libs >app-crypt/gnupg-2.4.0:0 bzip2 -doc -ldap nls readline -selinux smartcard ssl -test tofu -tools -tpm -usb -user-socket -verify-sig -wks-server >app-crypt/gpgme-1.18.0-r2:1/11.6.15.1 -common-lisp cxx -python python_targets_python3_10 -python_targets_python3_11 python_targets_python3_8 python_targets_python3_9 -qt5 -static-libs -test -verify-sig >app-crypt/libb2-0.98.1-r3:0 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 -native-cflags openmp -static-libs >app-crypt/pinentry-1.2.1-r1:0 -caps -efl -emacs -gnome-keyring -gtk ncurses -qt5 -verify-sig >app-crypt/rhash-1.4.3:0 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 -debug nls ssl -static-libs >app-editors/nano-7.1:0 -debug -justify -magic -minimal ncurses nls spell -static unicode >app-eselect/eselect-fontconfig-20220403:0 >app-eselect/eselect-iptables-20220320:0 >app-eselect/eselect-lib-bin-symlink-0.1.1-r1:0 >app-eselect/eselect-pinentry-0.7.2:0 >app-eselect/eselect-rust-20210703:0 >app-i18n/man-pages-ja-20180315-r1:0 >app-i18n/man-pages-l10n-4.14.0-r1:0 l10n_cs l10n_da l10n_de l10n_el l10n_es l10n_fi l10n_fr l10n_hu l10n_id l10n_it l10n_mk l10n_nb l10n_nl l10n_pl l10n_pt-BR l10n_ro l10n_sr l10n_sv l10n_uk l10n_vi >app-i18n/man-pages-ru-5.03.2390.2390.20191017-r1:0 >app-i18n/man-pages-zh_CN-1.6.3.6:0 >app-misc/c_rehash-1.7-r1:0 >app-misc/ca-certificates-20211016.3.86:0 -cacert >app-misc/editor-wrapper-4-r1:0 >app-misc/mime-types-2.1.53:0 -nginx >app-misc/pax-utils-1.3.5:0 -caps man -python python_single_target_python3_10 -python_single_target_python3_11 -python_single_target_python3_8 -python_single_target_python3_9 seccomp -test >app-misc/tmux-3.3a-r1:0 -debug -selinux -systemd -utempter -vim-syntax >app-portage/eix-0.36.5:0 -debug -doc nls -sqlite >app-portage/elt-patches-20221210:0 >app-portage/gemato-17.0:0 gpg -pretty-log python_targets_pypy3 python_targets_python3_10 -python_targets_python3_11 python_targets_python3_8 python_targets_python3_9 -test -tools >app-portage/gentoolkit-0.6.1-r3:0 python_targets_pypy3 python_targets_python3_10 -python_targets_python3_11 python_targets_python3_8 python_targets_python3_9 -test >app-portage/portage-utils-0.94.4:0 openmp qmanifest qtegrity -static >app-shells/bash-5.2_p15:0 -afs -bashlogger -examples -mem-scramble net nls -pgo -plugins readline -verify-sig >app-shells/bash-completion-2.11:0 eselect -test >app-shells/dash-0.5.12:0 -libedit -static >app-shells/gentoo-bashcomp-20190211-r1:0 >app-shells/push-3.4:0 >app-shells/quoter-4.2:0 >app-text/ansifilter-2.18:0 -qt5 >app-text/build-docbook-catalog-2.3-r1:0 >app-text/docbook-xml-dtd-4.5-r2:4.5 >app-text/docbook-xml-dtd-4.4-r3:4.4 >app-text/docbook-xml-dtd-4.2-r3:4.2 >app-text/docbook-xml-dtd-4.1.2-r7:4.1.2 >app-text/docbook-xsl-stylesheets-1.79.1-r3:0 -ruby >app-text/manpager-1:0 >app-text/opensp-1.5.2-r9:0 -doc nls -static-libs -test >app-text/po4a-0.68:0 -test -test >app-text/sgml-common-0.6.3-r7:0 >app-text/xmlto-0.0.28-r10:0 -latex text >dev-db/sqlite-3.40.0:3 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 -debug -doc -icu readline -secure-delete -static-libs -tcl -test -tools >dev-lang/duktape-2.7.0-r3:0/2.7.0 >dev-lang/perl-5.36.0-r1:0/5.36 -berkdb -debug -doc gdbm ithreads -minimal -quadmath >dev-lang/python-3.11.1:3.11 -bluetooth -build ensurepip -examples gdbm -hardened -libedit -lto ncurses -pgo readline sqlite ssl -test -tk -valgrind -verify-sig >dev-lang/python-3.10.9:3.10 -bluetooth -build ensurepip -examples gdbm -hardened -libedit -lto ncurses -pgo readline sqlite ssl -test -tk -valgrind -verify-sig xml >dev-lang/python-3.9.16:3.9 -bluetooth -build ensurepip -examples gdbm -hardened -lto ncurses -pgo readline sqlite ssl -test -tk -valgrind -verify-sig xml >dev-lang/python-3.8.16:3.8 -bluetooth -build ensurepip -examples gdbm -hardened -lto ncurses -pgo readline sqlite ssl -test -tk -valgrind -verify-sig -wininst xml >dev-lang/python-exec-2.4.10:2 native-symlinks python_targets_pypy3 python_targets_python3_10 python_targets_python3_11 python_targets_python3_8 python_targets_python3_9 -test >dev-lang/python-exec-conf-2.4.6:2 python_targets_pypy3 python_targets_python3_10 -python_targets_python3_11 python_targets_python3_8 python_targets_python3_9 >dev-lang/rust-1.66.0:stable/1.66 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 -clippy cpu_flags_x86_sse2 -debug -dist -doc -llvm-libunwind -llvm_targets_AArch64 -llvm_targets_AMDGPU -llvm_targets_ARM -llvm_targets_AVR -llvm_targets_BPF -llvm_targets_Hexagon -llvm_targets_Lanai -llvm_targets_MSP430 -llvm_targets_Mips -llvm_targets_NVPTX -llvm_targets_PowerPC -llvm_targets_RISCV -llvm_targets_Sparc -llvm_targets_SystemZ -llvm_targets_WebAssembly llvm_targets_X86 -llvm_targets_XCore -miri -nightly -parallel-compiler -profiler -rust-analyzer -rust-src -rustfmt -system-bootstrap -system-llvm -test -verify-sig -wasm >dev-lang/tcl-8.6.13:0/8.6 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 -debug threads >dev-libs/boehm-gc-8.2.2-r1:0 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 -cxx large -static-libs threads >dev-libs/elfutils-0.188:0 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 bzip2 -lzma nls -static-libs -test utils -valgrind -verify-sig -zstd >dev-libs/expat-2.5.0:0 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 -examples -static-libs unicode >dev-libs/glib-2.74.4:2 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 -dbus -debug elf -gtk-doc mime -selinux -static-libs -sysprof -systemtap -test -utils xattr >dev-libs/gmp-6.2.1-r5:0/10.4 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 asm cpudetection cxx -doc -pic -static-libs >dev-libs/gobject-introspection-1.74.0:0 -doctool -gtk-doc python_single_target_python3_10 -python_single_target_python3_11 -python_single_target_python3_8 -python_single_target_python3_9 -test >dev-libs/gobject-introspection-common-1.74.0:0 >dev-libs/isl-0.24-r2:0/23 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 -static-libs >dev-libs/jsoncpp-1.9.5:0/25 -doc -test >dev-libs/libassuan-2.5.5:0 >dev-libs/libatomic_ops-7.6.14:0 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 >dev-libs/libevent-2.1.12:0/2.1-7 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 clock-gettime -debug -malloc-replacement ssl -static-libs -test threads -verbose-debug >dev-libs/libffi-3.4.4:0/8 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 -debug -exec-static-trampoline -pax-kernel -static-libs -test >dev-libs/libgcrypt-1.10.1-r3:0/20 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 asm -cpu_flags_arm_aes -cpu_flags_arm_neon -cpu_flags_arm_sha1 -cpu_flags_arm_sha2 -cpu_flags_ppc_altivec -cpu_flags_ppc_vsx2 -cpu_flags_ppc_vsx3 cpu_flags_x86_aes cpu_flags_x86_avx cpu_flags_x86_avx2 -cpu_flags_x86_padlock -cpu_flags_x86_sha cpu_flags_x86_sse4_1 -doc getentropy -static-libs -verify-sig >dev-libs/libgpg-error-1.46-r1:0 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 -common-lisp nls -static-libs -test -verify-sig >dev-libs/libksba-1.6.3:0 -static-libs -verify-sig >dev-libs/libltdl-2.4.7:0 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 -static-libs >dev-libs/libpcre2-10.42:0/3 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 bzip2 jit -libedit pcre16 pcre32 readline split-usr -static-libs unicode -verify-sig zlib >dev-libs/libpipeline-1.5.7:0 -test >dev-libs/libtasn1-4.19.0:0/6 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 -static-libs -test -valgrind -verify-sig >dev-libs/libunistring-1.1-r1:0/5 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 -doc -static-libs >dev-libs/libuv-1.44.2-r1:0/1 >dev-libs/libxml2-2.10.3-r1:2 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 -debug -examples ftp -icu -lzma python python_targets_python3_10 -python_targets_python3_11 python_targets_python3_8 python_targets_python3_9 readline -static-libs -test >dev-libs/libxslt-1.1.37-r1:0 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 crypt -debug -examples -python python_targets_python3_10 -python_targets_python3_11 python_targets_python3_8 python_targets_python3_9 -static-libs >dev-libs/lzo-2.10:2 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 -examples split-usr -static-libs >dev-libs/mpc-1.3.1:0/3 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 -static-libs >dev-libs/mpfr-4.1.1_p1:0/6 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 -static-libs >dev-libs/nettle-3.8.1:0/8-6 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 asm -cpu_flags_arm_aes -cpu_flags_arm_neon -cpu_flags_arm_sha1 -cpu_flags_arm_sha2 -cpu_flags_ppc_altivec cpu_flags_x86_aes cpu_flags_x86_pclmul -cpu_flags_x86_sha -doc gmp -static-libs -verify-sig >dev-libs/npth-1.6-r1:0 -test >dev-libs/openssl-3.0.7-r2:0/3 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 asm cpu_flags_x86_sse2 -fips -ktls -rfc3779 -sctp -static-libs -test -tls-compression -vanilla -verify-sig -verify-sig -weak-ssl-ciphers >dev-libs/popt-1.19:0 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 nls -static-libs >dev-perl/Clone-0.460.0:0 -test >dev-perl/Devel-CheckLib-1.160.0:0 -test >dev-perl/Encode-EUCJPASCII-0.30.0-r1:0 -test >dev-perl/Encode-HanExtra-0.230.0-r3:0 >dev-perl/Encode-Locale-1.50.0-r1:0 -test >dev-perl/ExtUtils-CChecker-0.110.0:0 -test >dev-perl/File-BaseDir-0.90.0:0 -test >dev-perl/File-DesktopEntry-0.220.0-r1:0 -test >dev-perl/File-Listing-6.150.0:0 -test -test >dev-perl/File-MimeInfo-0.300.0:0 -test >dev-perl/HTML-Parser-3.760.0:0 -test >dev-perl/HTML-Tagset-3.200.0-r2:0 >dev-perl/HTTP-Cookies-6.100.0:0 -test >dev-perl/HTTP-Date-6.50.0:0 >dev-perl/HTTP-Message-6.440.0:0 -test -test >dev-perl/HTTP-Negotiate-6.10.0-r2:0 -test >dev-perl/IO-HTML-1.4.0:0 -test >dev-perl/IO-Socket-INET6-2.720.0-r2:0 -test >dev-perl/IO-Socket-SSL-2.78.0:0 -examples -idn -test >dev-perl/IPC-System-Simple-1.300.0:0 -test >dev-perl/libwww-perl-6.600.0-r1:0 ssl -test >dev-perl/Locale-gettext-1.70.0-r1:0 -test >dev-perl/LWP-MediaTypes-6.40.0:0 -test >dev-perl/LWP-Protocol-https-6.100.0:0 -test >dev-perl/MIME-Charset-1.12.2-r1:0 l10n_ja l10n_zh -test >dev-perl/Module-Build-0.423.100:0 -test >dev-perl/Mozilla-CA-20999999-r1:0 -test >dev-perl/Net-HTTP-6.210.0:0 -minimal -test >dev-perl/Net-SSLeay-1.920.0:0 -examples -examples -minimal -test >dev-perl/Pod-Parser-1.630.0-r1:0 -test >dev-perl/SGMLSpm-1.1-r2:0 -test >dev-perl/Socket6-0.290.0:0 -test >dev-perl/Sub-Name-0.260.0:0 -suggested -test >dev-perl/Syntax-Keyword-Try-0.270.0:0 -test >dev-perl/TermReadKey-2.380.0-r1:0 -examples -test >dev-perl/Text-CharWidth-0.40.0-r2:0 -test >dev-perl/Text-WrapI18N-0.60.0-r2:0 -test >dev-perl/TimeDate-2.330.0-r1:0 -test >dev-perl/Try-Tiny-0.310.0:0 -minimal -test >dev-perl/Unicode-LineBreak-2019.1.0:0 >dev-perl/URI-5.110.0:0 -test >dev-perl/WWW-RobotRules-6.20.0-r2:0 -test >dev-perl/XML-Parser-2.460.0-r2:0 >dev-perl/XS-Parse-Keyword-0.250.0:0 -test >dev-perl/YAML-Tiny-1.730.0-r1:0 -minimal -test >dev-python/appdirs-1.4.4-r2:0 python_targets_pypy3 python_targets_python3_10 -python_targets_python3_11 python_targets_python3_8 python_targets_python3_9 >dev-python/attrs-22.2.0:0 python_targets_pypy3 python_targets_python3_10 -python_targets_python3_11 python_targets_python3_8 python_targets_python3_9 -test >dev-python/autocommand-2.2.2:0 python_targets_pypy3 python_targets_python3_10 -python_targets_python3_11 python_targets_python3_8 python_targets_python3_9 -test >dev-python/certifi-3021.3.16-r3:0 python_targets_pypy3 python_targets_python3_10 -python_targets_python3_11 python_targets_python3_8 python_targets_python3_9 -test >dev-python/cffi-1.15.1:0/1.15.1 -doc python_targets_python3_10 -python_targets_python3_11 python_targets_python3_8 python_targets_python3_9 -test >dev-python/charset_normalizer-3.0.1:0 python_targets_pypy3 python_targets_python3_10 -python_targets_python3_11 python_targets_python3_8 python_targets_python3_9 -test >dev-python/cryptography-38.0.4:0 -debug python_targets_pypy3 python_targets_python3_10 -python_targets_python3_11 python_targets_python3_8 python_targets_python3_9 -test >dev-python/cython-0.29.32:0 -doc -emacs python_targets_pypy3 python_targets_python3_10 -python_targets_python3_11 python_targets_python3_8 python_targets_python3_9 -test >dev-python/ensurepip-pip-22.3.1:0 >dev-python/ensurepip-setuptools-65.6.3:0 >dev-python/ensurepip-wheels-100:0 >dev-python/exceptiongroup-1.1.0:0 python_targets_pypy3 python_targets_python3_10 -python_targets_python3_11 python_targets_python3_8 python_targets_python3_9 -test >dev-python/flit_core-3.8.0:0 python_targets_pypy3 python_targets_python3_10 -python_targets_python3_11 python_targets_python3_8 python_targets_python3_9 -test >dev-python/flit_scm-1.7.0:0 python_targets_pypy3 python_targets_python3_10 -python_targets_python3_11 python_targets_python3_8 python_targets_python3_9 >dev-python/gpep517-13:0 python_targets_pypy3 python_targets_python3_10 -python_targets_python3_11 python_targets_python3_8 python_targets_python3_9 -test >dev-python/idna-3.4:0 python_targets_pypy3 python_targets_python3_10 -python_targets_python3_11 python_targets_python3_8 python_targets_python3_9 -test >dev-python/importlib_metadata-5.2.0:0 python_targets_pypy3 python_targets_python3_10 -python_targets_python3_11 python_targets_python3_8 python_targets_python3_9 -test >dev-python/importlib_resources-5.10.1:0 python_targets_pypy3 python_targets_python3_8 -test >dev-python/inflect-6.0.2:0 python_targets_pypy3 python_targets_python3_10 -python_targets_python3_11 python_targets_python3_8 python_targets_python3_9 -test >dev-python/iniconfig-1.1.1-r1:0 python_targets_pypy3 python_targets_python3_10 -python_targets_python3_11 python_targets_python3_8 python_targets_python3_9 -test >dev-python/installer-0.6.0:0 python_targets_pypy3 python_targets_python3_10 -python_targets_python3_11 python_targets_python3_8 python_targets_python3_9 -test >dev-python/jaraco-context-4.2.0:0 python_targets_pypy3 python_targets_python3_10 -python_targets_python3_11 python_targets_python3_8 python_targets_python3_9 -test >dev-python/jaraco-functools-3.5.2:0 python_targets_pypy3 python_targets_python3_10 -python_targets_python3_11 python_targets_python3_8 python_targets_python3_9 -test >dev-python/jaraco-text-3.11.0:0 python_targets_pypy3 python_targets_python3_10 -python_targets_python3_11 python_targets_python3_8 python_targets_python3_9 -test >dev-python/jinja-3.1.2:0 -doc -examples python_targets_pypy3 python_targets_python3_10 -python_targets_python3_11 python_targets_python3_8 python_targets_python3_9 -test >dev-python/markupsafe-2.1.1:0 python_targets_pypy3 python_targets_python3_10 -python_targets_python3_11 python_targets_python3_8 python_targets_python3_9 -test >dev-python/more-itertools-9.0.0:0 -doc python_targets_pypy3 python_targets_python3_10 -python_targets_python3_11 python_targets_python3_8 python_targets_python3_9 -test >dev-python/nspektr-0.4.0:0 python_targets_pypy3 python_targets_python3_10 -python_targets_python3_11 python_targets_python3_8 python_targets_python3_9 -test >dev-python/ntlm-auth-1.5.0:0 python_targets_python3_10 -python_targets_python3_11 python_targets_python3_8 python_targets_python3_9 -test >dev-python/ordered-set-4.1.0:0 python_targets_pypy3 python_targets_python3_10 -python_targets_python3_11 python_targets_python3_8 python_targets_python3_9 -test >dev-python/packaging-21.3-r2:0 python_targets_pypy3 python_targets_python3_10 -python_targets_python3_11 python_targets_python3_8 python_targets_python3_9 -test >dev-python/pluggy-1.0.0-r2:0 python_targets_pypy3 python_targets_python3_10 -python_targets_python3_11 python_targets_python3_8 python_targets_python3_9 -test >dev-python/ply-3.11-r2:0/3.11 -examples python_targets_pypy3 python_targets_python3_10 -python_targets_python3_11 python_targets_python3_8 python_targets_python3_9 >dev-python/pycparser-2.21-r1:0 python_targets_pypy3 python_targets_python3_10 -python_targets_python3_11 python_targets_python3_8 python_targets_python3_9 -test >dev-python/pydantic-1.10.2:0 native-extensions python_targets_pypy3 python_targets_python3_10 -python_targets_python3_11 python_targets_python3_8 python_targets_python3_9 -test >dev-python/pyparsing-3.0.9:0 -examples python_targets_pypy3 python_targets_python3_10 -python_targets_python3_11 python_targets_python3_8 python_targets_python3_9 -test >dev-python/pypy3-7.3.10_p1:0/pypy39-pp73-336 ensurepip gdbm jit ncurses sqlite -tk >dev-python/pypy3-exe-bin-7.3.10:3.9-7.3.10 >dev-python/PySocks-1.7.1-r2:0 python_targets_pypy3 python_targets_python3_10 -python_targets_python3_11 python_targets_python3_8 python_targets_python3_9 >dev-python/pytest-7.2.0:0 python_targets_pypy3 python_targets_python3_10 -python_targets_python3_11 python_targets_python3_8 python_targets_python3_9 -test >dev-python/requests-2.28.1-r1:0 python_targets_pypy3 python_targets_python3_10 -python_targets_python3_11 python_targets_python3_8 python_targets_python3_9 -socks5 -test test-rust >dev-python/semantic_version-2.10.0:0 -doc python_targets_pypy3 python_targets_python3_10 -python_targets_python3_11 python_targets_python3_8 python_targets_python3_9 -test >dev-python/setuptools-65.6.3:0 python_targets_pypy3 python_targets_python3_10 -python_targets_python3_11 python_targets_python3_8 python_targets_python3_9 -test >dev-python/setuptools-rust-1.5.2:0 -debug python_targets_pypy3 python_targets_python3_10 -python_targets_python3_11 python_targets_python3_8 python_targets_python3_9 -test >dev-python/setuptools_scm-7.1.0:0 python_targets_pypy3 python_targets_python3_10 -python_targets_python3_11 python_targets_python3_8 python_targets_python3_9 -test >dev-python/six-1.16.0-r1:0 -doc python_targets_pypy3 python_targets_python3_10 -python_targets_python3_11 python_targets_python3_8 python_targets_python3_9 -test >dev-python/tomli-2.0.1-r1:0 python_targets_pypy3 python_targets_python3_10 -python_targets_python3_11 python_targets_python3_8 python_targets_python3_9 -test >dev-python/typing-extensions-4.3.0:0 python_targets_pypy3 python_targets_python3_10 -python_targets_python3_11 python_targets_python3_8 python_targets_python3_9 >dev-python/urllib3-1.26.13:0 -brotli python_targets_pypy3 python_targets_python3_10 -python_targets_python3_11 python_targets_python3_8 python_targets_python3_9 -test >dev-python/wheel-0.38.4:0 python_targets_pypy3 python_targets_python3_10 -python_targets_python3_11 python_targets_python3_8 python_targets_python3_9 -test >dev-python/zipp-3.11.0:0 python_targets_pypy3 python_targets_python3_10 -python_targets_python3_11 python_targets_python3_8 python_targets_python3_9 -test >dev-python/zope-interface-5.5.2:0 python_targets_pypy3 python_targets_python3_10 -python_targets_python3_11 python_targets_python3_8 python_targets_python3_9 -test >dev-util/checkbashisms-2.22.2:0 >dev-util/cmake-3.25.1:0 -doc -emacs ncurses -qt5 -test -test -verify-sig >dev-util/desktop-file-utils-0.26-r2:0 -emacs >dev-util/glib-utils-2.74.4:0 python_single_target_python3_10 -python_single_target_python3_11 -python_single_target_python3_8 -python_single_target_python3_9 >dev-util/gperf-3.1-r1:0 >dev-util/gtk-doc-am-1.33.2:0 >dev-util/intltool-0.51.0-r3:0 >dev-util/meson-0.64.1:0 python_targets_python3_10 -python_targets_python3_11 python_targets_python3_8 python_targets_python3_9 -test >dev-util/meson-format-array-0:0 python_targets_python3_10 -python_targets_python3_11 python_targets_python3_8 python_targets_python3_9 >dev-util/ninja-1.11.1-r2:0 -doc -emacs -test >dev-util/pkgconf-1.8.0-r1:0/3 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 -test >dev-util/re2c-2.2:0 -debug -test >dev-vcs/git-2.39.0:0 blksha1 -cgi curl -cvs -doc -gnome-keyring gpg -highlight iconv -mediawiki -mediawiki-experimental nls pcre -perforce -perl python_single_target_python3_10 -python_single_target_python3_11 -python_single_target_python3_8 -python_single_target_python3_9 safe-directory -selinux -subversion -test -tk webdav -xinetd >media-fonts/liberation-fonts-2.1.5:0 -X -X -fontforge >media-gfx/graphite2-1.3.14_p20210810-r2:0 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 -perl -test >media-libs/fontconfig-2.14.1-r1:1.0 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 -doc nls -test >media-libs/freetype-2.12.1-r2:2 -X -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 adobe-cff -brotli bzip2 cleartype-hinting -debug -doc -fontforge harfbuzz -infinality png -static-libs -svg -utils >media-libs/harfbuzz-6.0.0:0/6.0.0 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 cairo -debug -doc -experimental glib graphite -icu introspection -test truetype >media-libs/libpng-1.6.39:0/16 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 -apng -cpu_flags_arm_neon cpu_flags_x86_sse -static-libs >net-dns/c-ares-1.18.1:0/2 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 -static-libs -test >net-dns/libidn2-2.3.4:0/2 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 nls -static-libs -verify-sig >net-firewall/iptables-1.8.8-r5:0/1.8.3 -conntrack -netlink -nftables -pcap split-usr -static-libs >net-libs/gnutls-3.7.8:0/30.30 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 -brotli cxx -dane -doc -examples -guile idn nls openssl -pkcs11 seccomp -sslv2 -sslv3 -static-libs -test -test-full tls-heartbeat -tools -valgrind -verify-sig zlib -zstd >net-libs/libmnl-1.0.5:0/0.2.0 -examples -verify-sig >net-libs/libnsl-2.0.0-r1:0/3 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 -static-libs >net-libs/libtirpc-1.3.3:0/3 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 -kerberos split-usr -static-libs >net-libs/nghttp2-1.51.0:0/1.14 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 -cxx -debug -hpack-tools -jemalloc -static-libs -test -utils -xml >net-misc/curl-7.87.0:0 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 adns -alt-svc -brotli -curl_ssl_gnutls -curl_ssl_mbedtls -curl_ssl_nss curl_ssl_openssl -curl_ssl_rustls ftp -gnutls -gopher -hsts http2 -idn imap ipv6 -kerberos -ldap -mbedtls -nghttp3 -nss openssl pop3 progress-meter -quiche -rtmp -rustls -samba smtp -ssh ssl -sslv3 -static-libs -telnet -test tftp -verify-sig -websockets -zstd >net-misc/dhcpcd-9.4.1:0 -debug embedded ipv6 -privsep udev >net-misc/iputils-20221126:0 arping -caps -clockdiff -doc filecaps -idn nls -test -tracepath >net-misc/netifrc-0.7.3-r1:0 dhcp >net-misc/openssh-9.1_p1-r1:0 -X -X509 -abi_mips_n32 -audit -debug -hpn -kerberos -ldns -libedit -livecd pam pie -sctp -security-key -selinux ssl -static -test -verify-sig -xmss >net-misc/rsync-3.2.7-r1:0 acl -examples iconv -lz4 python_single_target_python3_10 -python_single_target_python3_8 -python_single_target_python3_9 -rrsync ssl -stunnel -system-zlib -verify-sig xattr -xxhash -zstd >net-misc/wget-1.21.3-r1:0 -cookie-check -debug -gnutls -idn ipv6 -metalink nls -ntlm pcre ssl -static -test -uuid -verify-sig zlib >perl-core/Compress-Raw-Zlib-2.202.0:0 >perl-core/File-Temp-0.231.100:0 >sec-keys/openpgp-keys-gentoo-release-20220101:0 -test >sys-apps/acl-2.3.1-r1:0 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 nls split-usr -static-libs >sys-apps/attr-2.5.1-r2:0 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 -debug nls split-usr -static-libs >sys-apps/baselayout-2.9:0 -build split-usr >sys-apps/coreutils-9.1-r2:0 acl -caps -gmp -hostname -kill -multicall nls openssl -selinux split-usr -static -test -vanilla -verify-sig xattr >sys-apps/dbus-1.15.2:0 -X -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 -debug -doc elogind -selinux -static-libs -systemd -test -test >sys-apps/debianutils-5.7:0 installkernel -static >sys-apps/diffutils-3.8:0 nls -static -verify-sig >sys-apps/file-5.43-r1:0 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 bzip2 -lzma -python python_targets_python3_10 -python_targets_python3_11 python_targets_python3_8 python_targets_python3_9 -seccomp -static-libs -verify-sig zlib >sys-apps/findutils-4.9.0-r2:0 nls -selinux -static -test -verify-sig >sys-apps/gawk-5.2.1:0 -mpfr nls -pma readline -verify-sig >sys-apps/gentoo-functions-0.17:0 >sys-apps/grep-3.8-r1:0 egrep-fgrep nls pcre -static -verify-sig >sys-apps/groff-1.22.4:0 -X -examples -uchardet >sys-apps/help2man-1.49.3:0 nls >sys-apps/install-xattr-0.8:0 >sys-apps/iproute2-6.1.0:0 -atm -berkdb -bpf -caps -elf iptables -libbsd -minimal -nfs -selinux split-usr >sys-apps/kbd-2.5.1:0 nls pam -test >sys-apps/kmod-30:0 -debug -doc lzma -pkcs7 -python python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -static-libs tools zlib zstd >sys-apps/less-608-r1:0 pcre unicode >sys-apps/lsb-release-3.2:0 >sys-apps/man-db-2.11.1:0 manpager nls seccomp -selinux -static-libs zlib >sys-apps/man-pages-6.02:0 l10n_cs l10n_da l10n_de l10n_el l10n_es l10n_fi l10n_fr l10n_hu l10n_id l10n_it l10n_ja l10n_mk l10n_nb l10n_nl l10n_pl l10n_pt-BR l10n_ro l10n_ru l10n_sr l10n_sv l10n_uk l10n_vi l10n_zh-CN >sys-apps/miscfiles-1.5-r4:0 -minimal >sys-apps/net-tools-2.10:0 arp hostname ipv6 -nis nls -plipconfig -selinux -slattach -static >sys-apps/openrc-0.45.2-r2:0 -audit -bash -debug ncurses netifrc -newnet pam -selinux -sysv-utils unicode >sys-apps/portage-3.0.41:0 -apidoc -build -doc -gentoo-dev ipc native-extensions python_targets_pypy3 python_targets_python3_10 -python_targets_python3_11 python_targets_python3_8 python_targets_python3_9 rsync-verify -selinux -test xattr >sys-apps/sandbox-2.29:0 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 abi_x86_32 abi_x86_64 -abi_x86_x32 nnp >sys-apps/sed-4.9:0 acl nls -selinux -static -verify-sig >sys-apps/shadow-4.13-r1:0/4 acl -audit -bcrypt -cracklib nls pam -selinux -skey split-usr -su -verify-sig xattr >sys-apps/systemd-utils-251.10:0 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 acl -boot kmod -selinux split-usr -split-usr -sysusers -test tmpfiles udev >sys-apps/sysvinit-3.06:0 -ibm nls -selinux -static -verify-sig >sys-apps/texinfo-7.0.1:0 nls standalone -static >sys-apps/util-linux-2.38.1:0 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 -audit -build -caps cramfs -cryptsetup -fdformat hardlink -kill logger -magic ncurses nls pam -python python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 readline -rtas -selinux -slang split-usr -static-libs su suid -systemd -test -tty-helpers -udev unicode -verify-sig >sys-apps/which-2.21:0 >sys-auth/elogind-246.10-r2:0 acl -audit cgroup-hybrid -debug -doc pam policykit -selinux -test >sys-auth/pambase-20220214:0 -caps -debug elogind -gnome-keyring -homed -minimal -mktemp nullok -pam_krb5 -pam_ssh passwdqc -pwhistory -pwquality -securetty -selinux sha512 -systemd -yescrypt >sys-auth/passwdqc-2.0.2-r1:0 >sys-auth/polkit-122:0 daemon duktape -examples -gtk introspection -kde pam -selinux -systemd -test >sys-devel/autoconf-2.71-r5:2.71 -emacs >sys-devel/autoconf-archive-2022.09.03:0 >sys-devel/autoconf-wrapper-20221207:0 >sys-devel/automake-1.16.5:1.16 -test >sys-devel/automake-wrapper-11-r1:0 >sys-devel/bc-1.07.1-r6:0 -libedit readline -static >sys-devel/binutils-2.39-r4:2.39 -cet -default-gold -doc -gold -gprofng -multitarget nls -pgo plugins -static-libs -test -vanilla >sys-devel/binutils-config-5.4.1:0 native-symlinks >sys-devel/bison-3.8.2-r2:0 -examples nls -static -test -verify-sig >sys-devel/clang-15.0.6:15/15 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 -debug -doc -doc extra llvm_targets_AArch64 llvm_targets_AMDGPU -llvm_targets_ARC llvm_targets_ARM llvm_targets_AVR llvm_targets_BPF -llvm_targets_CSKY -llvm_targets_DirectX llvm_targets_Hexagon llvm_targets_Lanai -llvm_targets_LoongArch -llvm_targets_M68k llvm_targets_MSP430 llvm_targets_Mips llvm_targets_NVPTX llvm_targets_PowerPC llvm_targets_RISCV -llvm_targets_SPIRV llvm_targets_Sparc llvm_targets_SystemZ llvm_targets_VE llvm_targets_WebAssembly llvm_targets_X86 llvm_targets_XCore pie python_single_target_python3_10 -python_single_target_python3_11 -python_single_target_python3_8 -python_single_target_python3_9 static-analyzer -test -test -verify-sig -xml >sys-devel/clang-common-15.0.6:0 -default-compiler-rt -default-libcxx -default-lld -llvm-libunwind -stricter -verify-sig >sys-devel/clang-runtime-15.0.6:15.0.6 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 abi_x86_32 abi_x86_64 -abi_x86_x32 compiler-rt -libcxx openmp sanitize >sys-devel/clang-toolchain-symlinks-15-r2:15 -gcc-symlinks -multilib-symlinks native-symlinks >sys-devel/flex-2.6.4-r5:0 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 nls -static -test >sys-devel/gcc-12.2.1_p20221210:12 -ada -cet -custom-cflags cxx -d -debug -default-stack-clash-protection -default-znow -doc -fixed-point fortran -go graphite -hardened -ieee-long-double -jit -libssp lto multilib nls nptl -objc -objc++ -objc-gc openmp -pch -pgo pie sanitize ssp -systemtap -test -valgrind -vanilla -vtv -zstd >sys-devel/gcc-config-2.8:0 cc-wrappers native-symlinks >sys-devel/gettext-0.21.1:0 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 acl -cvs cxx -doc -emacs -git -java -java ncurses nls openmp -static-libs -verify-sig >sys-devel/gnuconfig-20221007:0 >sys-devel/libtool-2.4.7-r1:2 -vanilla >sys-devel/llvm-15.0.6:15/15 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 binutils-plugin -debug -doc -doc -exegesis -libedit libffi llvm_targets_AArch64 llvm_targets_AMDGPU -llvm_targets_ARC llvm_targets_ARM llvm_targets_AVR llvm_targets_BPF -llvm_targets_CSKY -llvm_targets_DirectX llvm_targets_Hexagon llvm_targets_Lanai -llvm_targets_LoongArch -llvm_targets_M68k llvm_targets_MSP430 llvm_targets_Mips llvm_targets_NVPTX llvm_targets_PowerPC llvm_targets_RISCV -llvm_targets_SPIRV llvm_targets_Sparc llvm_targets_SystemZ llvm_targets_VE llvm_targets_WebAssembly llvm_targets_X86 llvm_targets_XCore ncurses -test -verify-sig -xar -xml -z3 -zstd >sys-devel/llvm-common-15.0.6:0 -verify-sig >sys-devel/llvm-toolchain-symlinks-15-r1:15 -multilib-symlinks native-symlinks >sys-devel/llvmgold-15:0 >sys-devel/m4-1.4.19:0 -examples nls -verify-sig >sys-devel/make-4.4:0 -guile nls -static -verify-sig >sys-devel/patch-2.7.6-r5:0 -static -test -verify-sig xattr >sys-fs/e2fsprogs-1.46.5-r4:0 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 -cron -fuse -lto nls split-usr -static-libs -test tools >sys-fs/udev-init-scripts-35:0 >sys-kernel/installkernel-gentoo-6:0 -grub >sys-kernel/linux-headers-6.1:0 -headers-only >sys-libs/binutils-libs-2.39-r4:0/2.39 -64-bit-bfd -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 -cet -multitarget nls -static-libs >sys-libs/compiler-rt-15.0.6:15.0.6 abi_x86_32 abi_x86_64 clang -debug -test -verify-sig >sys-libs/compiler-rt-sanitizers-15.0.6:15.0.6 abi_x86_32 abi_x86_64 asan cfi clang -debug dfsan gwp-asan hwasan libfuzzer lsan memprof msan orc profile safestack scudo -shadowcallstack -test -test tsan ubsan -verify-sig xray >sys-libs/gdbm-1.23:0/6 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 berkdb nls readline -static-libs -test -verify-sig >sys-libs/glibc-2.36-r6:2.2 -audit -caps -cet -compile-locales -crypt -custom-cflags -doc -gd -hash-sysv-compat -headers-only multiarch multilib -multilib-bootstrap -nscd -profile -selinux ssp stack-realign static-libs -suid -systemd -systemtap -test -vanilla >sys-libs/libcap-2.66:0 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 pam split-usr -static-libs -tools >sys-libs/libomp-15.0.6:0/15 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 abi_x86_32 abi_x86_64 -abi_x86_x32 -debug -hwloc -llvm_targets_AMDGPU -llvm_targets_NVPTX -offload -ompt -test -verify-sig >sys-libs/libseccomp-2.5.4:0 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 -experimental-loong -python python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -static-libs -test >sys-libs/libxcrypt-4.4.33:0/1 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 abi_x86_32 abi_x86_64 -abi_x86_x32 compat -headers-only split-usr -static-libs system -test >sys-libs/ncurses-6.3_p20221203:0/6 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 -ada cxx -debug -doc -gpm -minimal -profile split-usr -split-usr stack-realign -static-libs -test tinfo -trace -verify-sig >sys-libs/pam-1.5.2-r3:0 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 -audit -berkdb -debug filecaps -nis -selinux split-usr >sys-libs/readline-8.2_p1:0/8 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 split-usr -static-libs unicode -utils -verify-sig >sys-libs/timezone-data-2022g:0 -leaps-timezone nls -zic-slim >sys-libs/zlib-1.2.13-r1:0/1 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 minizip split-usr -static-libs -verify-sig >sys-process/procps-3.3.17-r1:0/8 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 elogind kill -modern-top ncurses nls -selinux split-usr -static-libs -systemd -test unicode >sys-process/psmisc-23.6:0 -X -apparmor nls -selinux -test >virtual/acl-0-r2:0 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 -static-libs >virtual/dev-manager-0-r2:0 >virtual/editor-0-r4:0 >virtual/libc-1-r1:0 >virtual/libcrypt-2-r1:0/2 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 abi_x86_32 abi_x86_64 -abi_x86_x32 -static-libs >virtual/libelf-3-r1:0/1 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 >virtual/libiconv-0-r2:0 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 >virtual/libintl-0-r2:0 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 >virtual/libudev-232-r7:0/1 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 -systemd >virtual/man-0-r4:0 >virtual/os-headers-0-r2:0 >virtual/package-manager-1:0 >virtual/pager-0-r1:0 >virtual/perl-Carp-1.520.0-r2:0 >virtual/perl-Compress-Raw-Bzip2-2.103.0-r3:0 >virtual/perl-Compress-Raw-Zlib-2.202.0:0 >virtual/perl-CPAN-2.330.0:0 >virtual/perl-CPAN-Meta-2.150.10-r6:0 >virtual/perl-CPAN-Meta-Requirements-2.140.0-r8:0 >virtual/perl-CPAN-Meta-YAML-0.18.0-r8:0 >virtual/perl-Data-Dumper-2.184.0:0 >virtual/perl-Digest-MD5-2.580.0-r1:0 >virtual/perl-Encode-3.170.0:0 >virtual/perl-Exporter-5.770.0:0 >virtual/perl-ExtUtils-CBuilder-0.280.236-r1:0 >virtual/perl-ExtUtils-Install-2.200.0-r1:0 >virtual/perl-ExtUtils-MakeMaker-7.640.0:0 >virtual/perl-ExtUtils-Manifest-1.730.0-r1:0 >virtual/perl-ExtUtils-ParseXS-3.450.0:0 >virtual/perl-File-Path-2.180.0-r1:0 >virtual/perl-File-Spec-3.840.0:0 >virtual/perl-File-Temp-0.231.100:0 >virtual/perl-Getopt-Long-2.520.0-r1:0 >virtual/perl-IO-1.500.0:0 >virtual/perl-IO-Compress-2.106.0:0 >virtual/perl-IO-Socket-IP-0.410.0-r1:0 >virtual/perl-JSON-PP-4.70.0:0 >virtual/perl-libnet-3.140.0:0 ssl >virtual/perl-MIME-Base64-3.160.0-r1:0 >virtual/perl-Module-Metadata-1.0.37-r2:0 >virtual/perl-parent-0.238.0-r2:0 >virtual/perl-Parse-CPAN-Meta-2.150.10-r6:0 >virtual/perl-Perl-OSType-1.10.0-r6:0 >virtual/perl-podlators-4.140.0-r3:0 >virtual/perl-Scalar-List-Utils-1.620.0:0 >virtual/perl-Test-Harness-3.440.0:0 >virtual/perl-Text-ParseWords-3.310.0:0 >virtual/perl-Time-Local-1.300.0-r1:0 >virtual/perl-version-0.992.900:0 >virtual/perl-XSLoader-0.310.0:0 >virtual/pkgconfig-2-r1:0 >virtual/rust-1.66.0:0/llvm-15 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 -rustfmt >virtual/service-manager-1-r1:0 >virtual/ssh-0-r1:0 -minimal >virtual/tmpfiles-0-r3:0 >virtual/ttf-fonts-1-r2:0 >virtual/udev-217-r5:0 >virtual/w3m-1:0 >www-client/pybugz-0.13-r2:0 python_targets_python3_10 -python_targets_python3_11 python_targets_python3_8 python_targets_python3_9 >www-client/w3m-0.5.3_p20220429-r1:0 -X -fbcon -gdk-pixbuf -gpm -imlib l10n_ja -lynxkeymap nls -nntp ssl unicode -xface >x11-apps/xprop-1.2.6:0 >x11-apps/xset-1.2.5:0 >x11-base/xcb-proto-1.15.2:0 python_targets_python3_10 -python_targets_python3_11 python_targets_python3_8 python_targets_python3_9 >x11-base/xorg-proto-2022.2:0 -test >x11-libs/cairo-1.17.6:0 -X -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 -aqua -debug -gles2-only -gles3 glib -gtk-doc -opengl -test >x11-libs/libICE-1.1.1-r1:0 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 >x11-libs/libSM-1.2.4:0 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 -doc uuid >x11-libs/libX11-1.8.3:0 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 -doc -test >x11-libs/libXau-1.0.11:0 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 -doc >x11-libs/libxcb-1.15-r1:0/1.12 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 -doc -doc -selinux -test xkb >x11-libs/libXdmcp-1.1.4-r2:0 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 -doc >x11-libs/libXext-1.3.5:0 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 -doc >x11-libs/libXmu-1.1.4:0 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 -doc >x11-libs/libXt-1.2.1:0 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 -doc -test >x11-libs/pixman-0.42.2:0 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 -cpu_flags_arm_iwmmxt -cpu_flags_arm_iwmmxt2 -cpu_flags_arm_neon -cpu_flags_ppc_altivec cpu_flags_x86_mmxext cpu_flags_x86_sse2 cpu_flags_x86_ssse3 -loongson2f -static-libs -test >x11-libs/xtrans-1.4.0:0 -doc >x11-misc/compose-tables-1.8.3:0 >x11-misc/shared-mime-info-2.2:0 -test >x11-misc/xdg-utils-1.1.3_p20210805-r1:0 -dbus -doc -gnome > > >####################### ># build.log # >####################### > >>>> Unpacking source... >>>> Unpacking ntlm-auth-1.5.0.tar.gz to /var/tmp/portage/dev-python/ntlm-auth-1.5.0/work >>>> Source unpacked in /var/tmp/portage/dev-python/ntlm-auth-1.5.0/work >>>> Preparing source in /var/tmp/portage/dev-python/ntlm-auth-1.5.0/work/ntlm-auth-1.5.0 ... > * Build system packages: > * dev-python/setuptools : 65.6.3 >>>> Source prepared. >>>> Configuring source in /var/tmp/portage/dev-python/ntlm-auth-1.5.0/work/ntlm-auth-1.5.0 ... >>>> Source configured. >>>> Compiling source in /var/tmp/portage/dev-python/ntlm-auth-1.5.0/work/ntlm-auth-1.5.0 ... > * python3_8: running distutils-r1_run_phase distutils-r1_python_compile >python3.8 setup.py build -j 16 >running build >running build_py >creating /var/tmp/portage/dev-python/ntlm-auth-1.5.0/work/ntlm-auth-1.5.0-python3_8/lib/ntlm_auth >copying ntlm_auth/session_security.py -> /var/tmp/portage/dev-python/ntlm-auth-1.5.0/work/ntlm-auth-1.5.0-python3_8/lib/ntlm_auth >copying ntlm_auth/rc4.py -> /var/tmp/portage/dev-python/ntlm-auth-1.5.0/work/ntlm-auth-1.5.0-python3_8/lib/ntlm_auth >copying ntlm_auth/ntlm.py -> /var/tmp/portage/dev-python/ntlm-auth-1.5.0/work/ntlm-auth-1.5.0-python3_8/lib/ntlm_auth >copying ntlm_auth/messages.py -> /var/tmp/portage/dev-python/ntlm-auth-1.5.0/work/ntlm-auth-1.5.0-python3_8/lib/ntlm_auth >copying ntlm_auth/gss_channel_bindings.py -> /var/tmp/portage/dev-python/ntlm-auth-1.5.0/work/ntlm-auth-1.5.0-python3_8/lib/ntlm_auth >copying ntlm_auth/exceptions.py -> /var/tmp/portage/dev-python/ntlm-auth-1.5.0/work/ntlm-auth-1.5.0-python3_8/lib/ntlm_auth >copying ntlm_auth/des.py -> /var/tmp/portage/dev-python/ntlm-auth-1.5.0/work/ntlm-auth-1.5.0-python3_8/lib/ntlm_auth >copying ntlm_auth/constants.py -> /var/tmp/portage/dev-python/ntlm-auth-1.5.0/work/ntlm-auth-1.5.0-python3_8/lib/ntlm_auth >copying ntlm_auth/compute_response.py -> /var/tmp/portage/dev-python/ntlm-auth-1.5.0/work/ntlm-auth-1.5.0-python3_8/lib/ntlm_auth >copying ntlm_auth/compute_keys.py -> /var/tmp/portage/dev-python/ntlm-auth-1.5.0/work/ntlm-auth-1.5.0-python3_8/lib/ntlm_auth >copying ntlm_auth/compute_hash.py -> /var/tmp/portage/dev-python/ntlm-auth-1.5.0/work/ntlm-auth-1.5.0-python3_8/lib/ntlm_auth >copying ntlm_auth/__init__.py -> /var/tmp/portage/dev-python/ntlm-auth-1.5.0/work/ntlm-auth-1.5.0-python3_8/lib/ntlm_auth >/usr/lib/python3.8/site-packages/setuptools/config/setupcfg.py:508: SetuptoolsDeprecationWarning: The license_file parameter is deprecated, use license_files instead. > warnings.warn(msg, warning_class) >warning: build_py: byte-compiling is disabled, skipping. > > * python3_9: running distutils-r1_run_phase distutils-r1_python_compile >python3.9 setup.py build -j 16 >/usr/lib/python3.9/site-packages/setuptools/config/setupcfg.py:508: SetuptoolsDeprecationWarning: The license_file parameter is deprecated, use license_files instead. > warnings.warn(msg, warning_class) >running build >running build_py >creating /var/tmp/portage/dev-python/ntlm-auth-1.5.0/work/ntlm-auth-1.5.0-python3_9/lib/ntlm_auth >copying ntlm_auth/session_security.py -> /var/tmp/portage/dev-python/ntlm-auth-1.5.0/work/ntlm-auth-1.5.0-python3_9/lib/ntlm_auth >copying ntlm_auth/rc4.py -> /var/tmp/portage/dev-python/ntlm-auth-1.5.0/work/ntlm-auth-1.5.0-python3_9/lib/ntlm_auth >copying ntlm_auth/ntlm.py -> /var/tmp/portage/dev-python/ntlm-auth-1.5.0/work/ntlm-auth-1.5.0-python3_9/lib/ntlm_auth >copying ntlm_auth/messages.py -> /var/tmp/portage/dev-python/ntlm-auth-1.5.0/work/ntlm-auth-1.5.0-python3_9/lib/ntlm_auth >copying ntlm_auth/gss_channel_bindings.py -> /var/tmp/portage/dev-python/ntlm-auth-1.5.0/work/ntlm-auth-1.5.0-python3_9/lib/ntlm_auth >copying ntlm_auth/exceptions.py -> /var/tmp/portage/dev-python/ntlm-auth-1.5.0/work/ntlm-auth-1.5.0-python3_9/lib/ntlm_auth >copying ntlm_auth/des.py -> /var/tmp/portage/dev-python/ntlm-auth-1.5.0/work/ntlm-auth-1.5.0-python3_9/lib/ntlm_auth >copying ntlm_auth/constants.py -> /var/tmp/portage/dev-python/ntlm-auth-1.5.0/work/ntlm-auth-1.5.0-python3_9/lib/ntlm_auth >copying ntlm_auth/compute_response.py -> /var/tmp/portage/dev-python/ntlm-auth-1.5.0/work/ntlm-auth-1.5.0-python3_9/lib/ntlm_auth >copying ntlm_auth/compute_keys.py -> /var/tmp/portage/dev-python/ntlm-auth-1.5.0/work/ntlm-auth-1.5.0-python3_9/lib/ntlm_auth >copying ntlm_auth/compute_hash.py -> /var/tmp/portage/dev-python/ntlm-auth-1.5.0/work/ntlm-auth-1.5.0-python3_9/lib/ntlm_auth >copying ntlm_auth/__init__.py -> /var/tmp/portage/dev-python/ntlm-auth-1.5.0/work/ntlm-auth-1.5.0-python3_9/lib/ntlm_auth >warning: build_py: byte-compiling is disabled, skipping. > > * python3_10: running distutils-r1_run_phase distutils-r1_python_compile >python3.10 setup.py build -j 16 >/usr/lib/python3.10/site-packages/setuptools/config/setupcfg.py:508: SetuptoolsDeprecationWarning: The license_file parameter is deprecated, use license_files instead. > warnings.warn(msg, warning_class) >running build >running build_py >creating /var/tmp/portage/dev-python/ntlm-auth-1.5.0/work/ntlm-auth-1.5.0-python3_10/lib/ntlm_auth >copying ntlm_auth/session_security.py -> /var/tmp/portage/dev-python/ntlm-auth-1.5.0/work/ntlm-auth-1.5.0-python3_10/lib/ntlm_auth >copying ntlm_auth/rc4.py -> /var/tmp/portage/dev-python/ntlm-auth-1.5.0/work/ntlm-auth-1.5.0-python3_10/lib/ntlm_auth >copying ntlm_auth/ntlm.py -> /var/tmp/portage/dev-python/ntlm-auth-1.5.0/work/ntlm-auth-1.5.0-python3_10/lib/ntlm_auth >copying ntlm_auth/messages.py -> /var/tmp/portage/dev-python/ntlm-auth-1.5.0/work/ntlm-auth-1.5.0-python3_10/lib/ntlm_auth >copying ntlm_auth/gss_channel_bindings.py -> /var/tmp/portage/dev-python/ntlm-auth-1.5.0/work/ntlm-auth-1.5.0-python3_10/lib/ntlm_auth >copying ntlm_auth/exceptions.py -> /var/tmp/portage/dev-python/ntlm-auth-1.5.0/work/ntlm-auth-1.5.0-python3_10/lib/ntlm_auth >copying ntlm_auth/des.py -> /var/tmp/portage/dev-python/ntlm-auth-1.5.0/work/ntlm-auth-1.5.0-python3_10/lib/ntlm_auth >copying ntlm_auth/constants.py -> /var/tmp/portage/dev-python/ntlm-auth-1.5.0/work/ntlm-auth-1.5.0-python3_10/lib/ntlm_auth >copying ntlm_auth/compute_response.py -> /var/tmp/portage/dev-python/ntlm-auth-1.5.0/work/ntlm-auth-1.5.0-python3_10/lib/ntlm_auth >copying ntlm_auth/compute_keys.py -> /var/tmp/portage/dev-python/ntlm-auth-1.5.0/work/ntlm-auth-1.5.0-python3_10/lib/ntlm_auth >copying ntlm_auth/compute_hash.py -> /var/tmp/portage/dev-python/ntlm-auth-1.5.0/work/ntlm-auth-1.5.0-python3_10/lib/ntlm_auth >copying ntlm_auth/__init__.py -> /var/tmp/portage/dev-python/ntlm-auth-1.5.0/work/ntlm-auth-1.5.0-python3_10/lib/ntlm_auth >warning: build_py: byte-compiling is disabled, skipping. > >>>> Source compiled. >>>> Test phase: dev-python/ntlm-auth-1.5.0 > * python3_8: running distutils-r1_run_phase python_test >python3.8 -m pytest -vv -ra -l -Wdefault --color=no -o console_output_style=count -p no:cov -p no:flake8 -p no:flakes -p no:pylint -p no:markdown -p no:sugar -p no:xvfb -p no:tavern >============================= test session starts ============================== >platform linux -- Python 3.8.16, pytest-7.2.0, pluggy-1.0.0 -- /usr/bin/python3.8 >cachedir: .pytest_cache >rootdir: /var/tmp/portage/dev-python/ntlm-auth-1.5.0/work/ntlm-auth-1.5.0, configfile: setup.cfg >collecting ... collected 124 items > >tests/test_compute_hash.py::TestComputeHash::test_lmowfv1 PASSED [ 1/124] >tests/test_compute_hash.py::TestComputeHash::test_ntowfv1 FAILED [ 2/124] >tests/test_compute_hash.py::TestComputeHash::test_lmofv1_hash PASSED [ 3/124] >tests/test_compute_hash.py::TestComputeHash::test_ntowfv1_hash PASSED [ 4/124] >tests/test_compute_hash.py::TestComputeHash::test_ntowfv2 FAILED [ 5/124] >tests/test_compute_keys.py::TestComputeKeys::test_get_exchange_key_ntlm_v1_no_keys PASSED [ 6/124] >tests/test_compute_keys.py::TestComputeKeys::test_get_exchange_key_ntlm_v1_non_nt_key PASSED [ 7/124] >tests/test_compute_keys.py::TestComputeKeys::test_get_exchange_key_ntlm_v1_lm_key PASSED [ 8/124] >tests/test_compute_keys.py::TestComputeKeys::test_get_exchange_key_ntlm_v1_extended_session_security PASSED [ 9/124] >tests/test_compute_keys.py::TestComputeKeys::test_get_exchange_key_ntlm_v2 PASSED [ 10/124] >tests/test_compute_keys.py::TestComputeKeys::test_get_sign_key PASSED [ 11/124] >tests/test_compute_keys.py::TestComputeKeys::test_get_seal_key_no_flag PASSED [ 12/124] >tests/test_compute_keys.py::TestComputeKeys::test_get_seal_key_ntlm1_56 PASSED [ 13/124] >tests/test_compute_keys.py::TestComputeKeys::test_get_seal_key_ntlm1_40 PASSED [ 14/124] >tests/test_compute_keys.py::TestComputeKeys::test_get_seal_key_ntlm2_128 PASSED [ 15/124] >tests/test_compute_keys.py::TestComputeKeys::test_get_seal_key_ntlm2_56 PASSED [ 16/124] >tests/test_compute_keys.py::TestComputeKeys::test_get_seal_key_ntlm2_40 PASSED [ 17/124] >tests/test_compute_response.py::TestGeneric::test_get_timestamp_format PASSED [ 18/124] >tests/test_compute_response.py::TestHashResults::test_get_LMv1_response PASSED [ 19/124] >tests/test_compute_response.py::TestHashResults::test_get_LMv2_response FAILED [ 20/124] >tests/test_compute_response.py::TestHashResults::test_get_NTLMv1_response FAILED [ 21/124] >tests/test_compute_response.py::TestHashResults::test_get_NTLM2_response FAILED [ 22/124] >tests/test_compute_response.py::TestHashResults::test_nt_v2_temp_response PASSED [ 23/124] >tests/test_compute_response.py::TestHashResults::test_get_NTLMv2_response FAILED [ 24/124] >tests/test_compute_response.py::TestChallengeResults::test_lm_v1_response PASSED [ 25/124] >tests/test_compute_response.py::TestChallengeResults::test_lm_v1_with_extended_security_response PASSED [ 26/124] >tests/test_compute_response.py::TestChallengeResults::test_lm_v1_with_ntlm_2_response FAILED [ 27/124] >tests/test_compute_response.py::TestChallengeResults::test_lm_v2_response FAILED [ 28/124] >tests/test_compute_response.py::TestChallengeResults::test_lm_v2_response_with_no_target_info_timestamp FAILED [ 29/124] >tests/test_compute_response.py::TestChallengeResults::test_lm_v2_response_with_server_target_info_timestamp FAILED [ 30/124] >tests/test_compute_response.py::TestChallengeResults::test_nt_v1_response FAILED [ 31/124] >tests/test_compute_response.py::TestChallengeResults::test_nt_v1_with_extended_security_response FAILED [ 32/124] >tests/test_compute_response.py::TestChallengeResults::test_nt_v2_response FAILED [ 33/124] >tests/test_compute_response.py::TestChallengeResults::test_nt_v2_response_no_target_info FAILED [ 34/124] >tests/test_compute_response.py::TestChallengeResults::test_nt_v2_response_with_timestamp_av_pair FAILED [ 35/124] >tests/test_des.py::TestDES::test_des_invalid_key_size PASSED [ 36/124] >tests/test_des.py::TestDES::test_expand_56bit_key PASSED [ 37/124] >tests/test_des.py::TestDES::test_encrypt_block PASSED [ 38/124] >tests/test_des.py::TestDES::test_encrypt PASSED [ 39/124] >tests/test_des.py::TestDES::test_encrypt_large_bytes_padding PASSED [ 40/124] >tests/test_des.py::TestDES::test_encrypt_large_bytes_fail_no_padding PASSED [ 41/124] >tests/test_des.py::TestDES::test_decrypt PASSED [ 42/124] >tests/test_des.py::TestDES::test_decrypt_large_bytes_padding PASSED [ 43/124] >tests/test_des.py::TestDES::test_decrypt_fail_invalid_size PASSED [ 44/124] >tests/test_des.py::TestDES::test_encrypt_decrypt_multiple_keys PASSED [ 45/124] >tests/test_gss_channel_bindings.py::TestGssChannelBindingsStruct::test_application_data PASSED [ 46/124] >tests/test_gss_channel_bindings.py::TestGssChannelBindingsStruct::test_full_data PASSED [ 47/124] >tests/test_messages.py::TestGeneric::test_random_session_key PASSED [ 48/124] >tests/test_messages.py::TestTargetInfo::test_del_item PASSED [ 49/124] >tests/test_messages.py::TestTargetInfo::test_add_item PASSED [ 50/124] >tests/test_messages.py::TestTargetInfo::test_get_item PASSED [ 51/124] >tests/test_messages.py::TestNegotiate::test_negotiate_with_all PASSED [ 52/124] >tests/test_messages.py::TestNegotiate::test_negotiate_without_version PASSED [ 53/124] >tests/test_messages.py::TestNegotiate::test_negotiate_without_domain_workstation PASSED [ 54/124] >tests/test_messages.py::TestChallenge::test_challenge_no_version PASSED [ 55/124] >tests/test_messages.py::TestChallenge::test_challenge PASSED [ 56/124] >tests/test_messages.py::TestChallenge::test_challenge_message_with_target_name PASSED [ 57/124] >tests/test_messages.py::TestAuthenticate::test_authenticate_message_ntlm_v1 FAILED [ 58/124] >tests/test_messages.py::TestAuthenticate::test_authenticate_without_domain_workstation FAILED [ 59/124] >tests/test_messages.py::TestAuthenticate::test_authenticate_message_ntlm_v1_non_unicode FAILED [ 60/124] >tests/test_messages.py::TestAuthenticate::test_authenticate_message_ntlm_v1_with_ess FAILED [ 61/124] >tests/test_messages.py::TestAuthenticate::test_authenticate_message_ntlm_v2 FAILED [ 62/124] >tests/test_messages.py::TestAuthenticate::test_authenticate_message_with_cbt FAILED [ 63/124] >tests/test_messages.py::TestAuthenticate::test_authenticate_message_with_mic FAILED [ 64/124] >tests/test_ntlm.py::TestInitialiseNtlm::test_initialise_defaults PASSED [ 65/124] >tests/test_ntlm.py::TestInitialiseNtlm::test_initialise_with_ntlm0 PASSED [ 66/124] >tests/test_ntlm.py::TestInitialiseNtlm::test_initialise_with_ntlm1 PASSED [ 67/124] >tests/test_ntlm.py::TestInitialiseNtlm::test_initialise_with_ntlm2 PASSED [ 68/124] >tests/test_ntlm.py::TestInitialiseNtlm::test_initialise_with_ntlm3 PASSED [ 69/124] >tests/test_ntlm.py::TestInitialiseNtlm::test_initialise_with_ntlm4 PASSED [ 70/124] >tests/test_ntlm.py::TestInitialiseNtlm::test_initialise_with_ntlm5 PASSED [ 71/124] >tests/test_ntlm.py::TestInitialiseNtlm::test_initialise_with_illegal_ntlm_compatibility_high PASSED [ 72/124] >tests/test_ntlm.py::TestInitialiseNtlm::test_initialise_with_illegal_ntlm_compatibility_low PASSED [ 73/124] >tests/test_ntlm.py::TestMessages::test_create_negotiate_message PASSED [ 74/124] >tests/test_ntlm.py::TestMessages::test_create_authenticate_message FAILED [ 75/124] >tests/test_ntlm.py::TestMessages::test_create_authenticate_message_without_security FAILED [ 76/124] >tests/test_ntlm.py::TestNtlmContext::test_ntlm_context FAILED [ 77/124] >tests/test_ntlm.py::TestNtlmContext::test_ntlm_context_with_mic FAILED [ 78/124] >tests/test_ntlm.py::TestNtlmContext::test_fail_wrap_no_context PASSED [ 79/124] >tests/test_ntlm.py::TestNtlmFunctional::test_ntlm_0_http_with_cbt SKIPPED (NTLM_USERNAME, NTLM_PASSWORD, NTLM_SERVER environment variables were not set, integration tests will be skipped) [ 80/124] >tests/test_ntlm.py::TestNtlmFunctional::test_ntlm_0_http_without_cbt SKIPPED (NTLM_USERNAME, NTLM_PASSWORD, NTLM_SERVER environment variables were not set, integration tests will be skipped) [ 81/124] >tests/test_ntlm.py::TestNtlmFunctional::test_ntlm_0_https_with_cbt SKIPPED (NTLM_USERNAME, NTLM_PASSWORD, NTLM_SERVER environment variables were not set, integration tests will be skipped) [ 82/124] >tests/test_ntlm.py::TestNtlmFunctional::test_ntlm_0_https_without_cbt SKIPPED (NTLM_USERNAME, NTLM_PASSWORD, NTLM_SERVER environment variables were not set, integration tests will be skipped) [ 83/124] >tests/test_ntlm.py::TestNtlmFunctional::test_ntlm_1_http_with_cbt SKIPPED (NTLM_USERNAME, NTLM_PASSWORD, NTLM_SERVER environment variables were not set, integration tests will be skipped) [ 84/124] >tests/test_ntlm.py::TestNtlmFunctional::test_ntlm_1_http_without_cbt SKIPPED (NTLM_USERNAME, NTLM_PASSWORD, NTLM_SERVER environment variables were not set, integration tests will be skipped) [ 85/124] >tests/test_ntlm.py::TestNtlmFunctional::test_ntlm_1_https_with_cbt SKIPPED (NTLM_USERNAME, NTLM_PASSWORD, NTLM_SERVER environment variables were not set, integration tests will be skipped) [ 86/124] >tests/test_ntlm.py::TestNtlmFunctional::test_ntlm_1_https_without_cbt SKIPPED (NTLM_USERNAME, NTLM_PASSWORD, NTLM_SERVER environment variables were not set, integration tests will be skipped) [ 87/124] >tests/test_ntlm.py::TestNtlmFunctional::test_ntlm_2_http_with_cbt SKIPPED (NTLM_USERNAME, NTLM_PASSWORD, NTLM_SERVER environment variables were not set, integration tests will be skipped) [ 88/124] >tests/test_ntlm.py::TestNtlmFunctional::test_ntlm_2_http_without_cbt SKIPPED (NTLM_USERNAME, NTLM_PASSWORD, NTLM_SERVER environment variables were not set, integration tests will be skipped) [ 89/124] >tests/test_ntlm.py::TestNtlmFunctional::test_ntlm_2_https_with_cbt SKIPPED (NTLM_USERNAME, NTLM_PASSWORD, NTLM_SERVER environment variables were not set, integration tests will be skipped) [ 90/124] >tests/test_ntlm.py::TestNtlmFunctional::test_ntlm_2_https_without_cbt SKIPPED (NTLM_USERNAME, NTLM_PASSWORD, NTLM_SERVER environment variables were not set, integration tests will be skipped) [ 91/124] >tests/test_ntlm.py::TestNtlmFunctional::test_ntlm_3_http_with_cbt_dep SKIPPED (NTLM_USERNAME, NTLM_PASSWORD, NTLM_SERVER environment variables were not set, integration tests will be skipped) [ 92/124] >tests/test_ntlm.py::TestNtlmFunctional::test_ntlm_3_http_without_cbt_dep SKIPPED (NTLM_USERNAME, NTLM_PASSWORD, NTLM_SERVER environment variables were not set, integration tests will be skipped) [ 93/124] >tests/test_ntlm.py::TestNtlmFunctional::test_ntlm_3_https_with_cbt_dep SKIPPED (NTLM_USERNAME, NTLM_PASSWORD, NTLM_SERVER environment variables were not set, integration tests will be skipped) [ 94/124] >tests/test_ntlm.py::TestNtlmFunctional::test_ntlm_3_https_without_cbt_dep SKIPPED (NTLM_USERNAME, NTLM_PASSWORD, NTLM_SERVER environment variables were not set, integration tests will be skipped) [ 95/124] >tests/test_ntlm.py::TestNtlmFunctional::test_ntlm_3_http_with_cbt SKIPPED (NTLM_USERNAME, NTLM_PASSWORD, NTLM_SERVER environment variables were not set, integration tests will be skipped) [ 96/124] >tests/test_ntlm.py::TestNtlmFunctional::test_ntlm_3_http_without_cbt SKIPPED (NTLM_USERNAME, NTLM_PASSWORD, NTLM_SERVER environment variables were not set, integration tests will be skipped) [ 97/124] >tests/test_ntlm.py::TestNtlmFunctional::test_ntlm_3_https_with_cbt SKIPPED (NTLM_USERNAME, NTLM_PASSWORD, NTLM_SERVER environment variables were not set, integration tests will be skipped) [ 98/124] >tests/test_ntlm.py::TestNtlmFunctional::test_ntlm_3_https_without_cbt SKIPPED (NTLM_USERNAME, NTLM_PASSWORD, NTLM_SERVER environment variables were not set, integration tests will be skipped) [ 99/124] >tests/test_rc4.py::TestARC4::test_encrypt_40bit_key[True] PASSED [100/124] >tests/test_rc4.py::TestARC4::test_encrypt_40bit_key[False] PASSED [101/124] >tests/test_rc4.py::TestARC4::test_decrypt_40bit_key[True] PASSED [102/124] >tests/test_rc4.py::TestARC4::test_decrypt_40bit_key[False] PASSED [103/124] >tests/test_rc4.py::TestARC4::test_encrypt_56bit_key[True] PASSED [104/124] >tests/test_rc4.py::TestARC4::test_encrypt_56bit_key[False] PASSED [105/124] >tests/test_rc4.py::TestARC4::test_decrypt_56bit_key[True] PASSED [106/124] >tests/test_rc4.py::TestARC4::test_decrypt_56bit_key[False] PASSED [107/124] >tests/test_rc4.py::TestARC4::test_encrypt_128bit_key[True] PASSED [108/124] >tests/test_rc4.py::TestARC4::test_encrypt_128bit_key[False] PASSED [109/124] >tests/test_rc4.py::TestARC4::test_decrypt_128bit_key[True] PASSED [110/124] >tests/test_rc4.py::TestARC4::test_decrypt_128bit_key[False] PASSED [111/124] >tests/test_session_security.py::TestSessionSecurity::test_invalid_source_param PASSED [112/124] >tests/test_session_security.py::TestSessionSecurity::test_sign_and_seal_message_ntlmv1 PASSED [113/124] >tests/test_session_security.py::TestSessionSecurity::test_sign_and_seal_message_ntlm2_no_key_exchange PASSED [114/124] >tests/test_session_security.py::TestSessionSecurity::test_sign_and_seal_message_ntlm2_key_exchange PASSED [115/124] >tests/test_session_security.py::TestSessionSecurity::test_unseal_message_ntlm1 PASSED [116/124] >tests/test_session_security.py::TestSessionSecurity::test_unseal_message_ntlm2_no_key_exchange PASSED [117/124] >tests/test_session_security.py::TestSessionSecurity::test_unseal_message_ntlm2_key_exchange PASSED [118/124] >tests/test_session_security.py::TestSessionSecurity::test_unseal_message_incorrect_checksum PASSED [119/124] >tests/test_session_security.py::TestSessionSecurity::test_unseal_message_incorrect_seq_num PASSED [120/124] >tests/test_session_security.py::TestSessionSecurity::test_sign_no_seal_message PASSED [121/124] >tests/test_session_security.py::TestSessionSecurity::test_verify_sign_no_unseal_message PASSED [122/124] >tests/test_session_security.py::TestSessionSecurity::test_nosign_or_seal_message PASSED [123/124] >tests/test_session_security.py::TestSessionSecurity::test_no_verify_or_unseal_message PASSED [124/124] > >=================================== FAILURES =================================== >_________________________ TestComputeHash.test_ntowfv1 _________________________ > >name = 'md4', data = b'P\x00a\x00s\x00s\x00w\x00o\x00r\x00d\x00', kwargs = {} > > def __hash_new(name, data=b'', **kwargs): > """new(name, data=b'') - Return a new hashing object using the named algorithm; > optionally initialized with data (which must be a bytes-like object). > """ > if name in __block_openssl_constructor: > # Prefer our blake2 and sha3 implementation > # OpenSSL 1.1.0 comes with a limited implementation of blake2b/s. > # It does neither support keyed blake2 nor advanced features like > # salt, personal, tree hashing or SSE. > return __get_builtin_constructor(name)(data, **kwargs) > try: >> return _hashlib.new(name, data) >E ValueError: [digital envelope routines] initialization error > >data = b'P\x00a\x00s\x00s\x00w\x00o\x00r\x00d\x00' >kwargs = {} >name = 'md4' > >/usr/lib/python3.8/hashlib.py:157: ValueError > >During handling of the above exception, another exception occurred: > >self = <tests.test_compute_hash.TestComputeHash object at 0x7f0ec84a0640> > > def test_ntowfv1(self): > # 4.2.2.1.2 - NTOWFv1() > expected = b"\xa4\xf4\x9c\x40\x65\x10\xbd\xca" \ > b"\xb6\x82\x4e\xe7\xc3\x0f\xd8\x52" >> actual = compute_hash._ntowfv1("Password") > >expected = b'\xa4\xf4\x9c@e\x10\xbd\xca\xb6\x82N\xe7\xc3\x0f\xd8R' >self = <tests.test_compute_hash.TestComputeHash object at 0x7f0ec84a0640> > >tests/test_compute_hash.py:17: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >ntlm_auth/compute_hash.py:66: in _ntowfv1 > digest = hashlib.new('md4', password.encode('utf-16-le')).digest() > password = 'Password' >/usr/lib/python3.8/hashlib.py:163: in __hash_new > return __get_builtin_constructor(name)(data) > data = b'P\x00a\x00s\x00s\x00w\x00o\x00r\x00d\x00' > kwargs = {} > name = 'md4' >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >name = 'md4' > > def __get_builtin_constructor(name): > cache = __builtin_constructor_cache > constructor = cache.get(name) > if constructor is not None: > return constructor > try: > if name in {'SHA1', 'sha1'}: > import _sha1 > cache['SHA1'] = cache['sha1'] = _sha1.sha1 > elif name in {'MD5', 'md5'}: > import _md5 > cache['MD5'] = cache['md5'] = _md5.md5 > elif name in {'SHA256', 'sha256', 'SHA224', 'sha224'}: > import _sha256 > cache['SHA224'] = cache['sha224'] = _sha256.sha224 > cache['SHA256'] = cache['sha256'] = _sha256.sha256 > elif name in {'SHA512', 'sha512', 'SHA384', 'sha384'}: > import _sha512 > cache['SHA384'] = cache['sha384'] = _sha512.sha384 > cache['SHA512'] = cache['sha512'] = _sha512.sha512 > elif name in {'blake2b', 'blake2s'}: > import _blake2 > cache['blake2b'] = _blake2.blake2b > cache['blake2s'] = _blake2.blake2s > elif name in {'sha3_224', 'sha3_256', 'sha3_384', 'sha3_512'}: > import _sha3 > cache['sha3_224'] = _sha3.sha3_224 > cache['sha3_256'] = _sha3.sha3_256 > cache['sha3_384'] = _sha3.sha3_384 > cache['sha3_512'] = _sha3.sha3_512 > elif name in {'shake_128', 'shake_256'}: > import _sha3 > cache['shake_128'] = _sha3.shake_128 > cache['shake_256'] = _sha3.shake_256 > except ImportError: > pass # no extension module, this hash is unsupported. > > constructor = cache.get(name) > if constructor is not None: > return constructor > >> raise ValueError('unsupported hash type ' + name) >E ValueError: unsupported hash type md4 > >cache = {'blake2b': <class '_blake2.blake2b'>, > 'blake2s': <class '_blake2.blake2s'>, > 'sha3_224': <class '_sha3.sha3_224'>, > 'sha3_256': <class '_sha3.sha3_256'>, > 'sha3_384': <class '_sha3.sha3_384'>, > 'sha3_512': <class '_sha3.sha3_512'>, > 'shake_128': <class '_sha3.shake_128'>, > 'shake_256': <class '_sha3.shake_256'>} >constructor = None >name = 'md4' > >/usr/lib/python3.8/hashlib.py:120: ValueError >_________________________ TestComputeHash.test_ntowfv2 _________________________ > >name = 'md4', data = b'P\x00a\x00s\x00s\x00w\x00o\x00r\x00d\x00', kwargs = {} > > def __hash_new(name, data=b'', **kwargs): > """new(name, data=b'') - Return a new hashing object using the named algorithm; > optionally initialized with data (which must be a bytes-like object). > """ > if name in __block_openssl_constructor: > # Prefer our blake2 and sha3 implementation > # OpenSSL 1.1.0 comes with a limited implementation of blake2b/s. > # It does neither support keyed blake2 nor advanced features like > # salt, personal, tree hashing or SSE. > return __get_builtin_constructor(name)(data, **kwargs) > try: >> return _hashlib.new(name, data) >E ValueError: [digital envelope routines] initialization error > >data = b'P\x00a\x00s\x00s\x00w\x00o\x00r\x00d\x00' >kwargs = {} >name = 'md4' > >/usr/lib/python3.8/hashlib.py:157: ValueError > >During handling of the above exception, another exception occurred: > >self = <tests.test_compute_hash.TestComputeHash object at 0x7f0ec83c3400> > > def test_ntowfv2(self): > # 4.2.4.1.1 - NTOWFv2() and LMOWFv2() > expected = b"\x0c\x86\x8a\x40\x3b\xfd\x7a\x93" \ > b"\xa3\x00\x1e\xf2\x2e\xf0\x2e\x3f" >> actual = compute_hash._ntowfv2("User", "Password", "Domain") > >expected = b'\x0c\x86\x8a@;\xfdz\x93\xa3\x00\x1e\xf2.\xf0.?' >self = <tests.test_compute_hash.TestComputeHash object at 0x7f0ec83c3400> > >tests/test_compute_hash.py:42: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >ntlm_auth/compute_hash.py:87: in _ntowfv2 > digest = _ntowfv1(password) > domain_name = 'Domain' > password = 'Password' > user_name = 'User' >ntlm_auth/compute_hash.py:66: in _ntowfv1 > digest = hashlib.new('md4', password.encode('utf-16-le')).digest() > password = 'Password' >/usr/lib/python3.8/hashlib.py:163: in __hash_new > return __get_builtin_constructor(name)(data) > data = b'P\x00a\x00s\x00s\x00w\x00o\x00r\x00d\x00' > kwargs = {} > name = 'md4' >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >name = 'md4' > > def __get_builtin_constructor(name): > cache = __builtin_constructor_cache > constructor = cache.get(name) > if constructor is not None: > return constructor > try: > if name in {'SHA1', 'sha1'}: > import _sha1 > cache['SHA1'] = cache['sha1'] = _sha1.sha1 > elif name in {'MD5', 'md5'}: > import _md5 > cache['MD5'] = cache['md5'] = _md5.md5 > elif name in {'SHA256', 'sha256', 'SHA224', 'sha224'}: > import _sha256 > cache['SHA224'] = cache['sha224'] = _sha256.sha224 > cache['SHA256'] = cache['sha256'] = _sha256.sha256 > elif name in {'SHA512', 'sha512', 'SHA384', 'sha384'}: > import _sha512 > cache['SHA384'] = cache['sha384'] = _sha512.sha384 > cache['SHA512'] = cache['sha512'] = _sha512.sha512 > elif name in {'blake2b', 'blake2s'}: > import _blake2 > cache['blake2b'] = _blake2.blake2b > cache['blake2s'] = _blake2.blake2s > elif name in {'sha3_224', 'sha3_256', 'sha3_384', 'sha3_512'}: > import _sha3 > cache['sha3_224'] = _sha3.sha3_224 > cache['sha3_256'] = _sha3.sha3_256 > cache['sha3_384'] = _sha3.sha3_384 > cache['sha3_512'] = _sha3.sha3_512 > elif name in {'shake_128', 'shake_256'}: > import _sha3 > cache['shake_128'] = _sha3.shake_128 > cache['shake_256'] = _sha3.shake_256 > except ImportError: > pass # no extension module, this hash is unsupported. > > constructor = cache.get(name) > if constructor is not None: > return constructor > >> raise ValueError('unsupported hash type ' + name) >E ValueError: unsupported hash type md4 > >cache = {'blake2b': <class '_blake2.blake2b'>, > 'blake2s': <class '_blake2.blake2s'>, > 'sha3_224': <class '_sha3.sha3_224'>, > 'sha3_256': <class '_sha3.sha3_256'>, > 'sha3_384': <class '_sha3.sha3_384'>, > 'sha3_512': <class '_sha3.sha3_512'>, > 'shake_128': <class '_sha3.shake_128'>, > 'shake_256': <class '_sha3.shake_256'>} >constructor = None >name = 'md4' > >/usr/lib/python3.8/hashlib.py:120: ValueError >____________________ TestHashResults.test_get_LMv2_response ____________________ > >name = 'md4', data = b'P\x00a\x00s\x00s\x00w\x00o\x00r\x00d\x00', kwargs = {} > > def __hash_new(name, data=b'', **kwargs): > """new(name, data=b'') - Return a new hashing object using the named algorithm; > optionally initialized with data (which must be a bytes-like object). > """ > if name in __block_openssl_constructor: > # Prefer our blake2 and sha3 implementation > # OpenSSL 1.1.0 comes with a limited implementation of blake2b/s. > # It does neither support keyed blake2 nor advanced features like > # salt, personal, tree hashing or SSE. > return __get_builtin_constructor(name)(data, **kwargs) > try: >> return _hashlib.new(name, data) >E ValueError: [digital envelope routines] initialization error > >data = b'P\x00a\x00s\x00s\x00w\x00o\x00r\x00d\x00' >kwargs = {} >name = 'md4' > >/usr/lib/python3.8/hashlib.py:157: ValueError > >During handling of the above exception, another exception occurred: > >self = <tests.test_compute_response.TestHashResults object at 0x7f0ec830d370> > > def test_get_LMv2_response(self): > # 4.2.4.2.1 - LMv2 Response > server_challenge = b"\x01\x23\x45\x67\x89\xab\xcd\xef" > client_challenge = b"\xaa" * 8 > expected = b"\x86\xc3\x50\x97\xac\x9c\xec\x10" \ > b"\x25\x54\x76\x4a\x57\xcc\xcc\x19" \ > b"\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" >> actual = ComputeResponse._get_LMv2_response("User", "Password", > "Domain", server_challenge, > client_challenge) > >client_challenge = b'\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa' >expected = (b'\x86\xc3P\x97\xac\x9c\xec\x10%TvJW\xcc\xcc\x19\xaa\xaa\xaa\xaa' > b'\xaa\xaa\xaa\xaa') >self = <tests.test_compute_response.TestHashResults object at 0x7f0ec830d370> >server_challenge = b'\x01#Eg\x89\xab\xcd\xef' > >tests/test_compute_response.py:37: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >ntlm_auth/compute_response.py:272: in _get_LMv2_response > nt_hash = comphash._ntowfv2(user_name, password, domain_name) > client_challenge = b'\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa' > domain_name = 'Domain' > password = 'Password' > server_challenge = b'\x01#Eg\x89\xab\xcd\xef' > user_name = 'User' >ntlm_auth/compute_hash.py:87: in _ntowfv2 > digest = _ntowfv1(password) > domain_name = 'Domain' > password = 'Password' > user_name = 'User' >ntlm_auth/compute_hash.py:66: in _ntowfv1 > digest = hashlib.new('md4', password.encode('utf-16-le')).digest() > password = 'Password' >/usr/lib/python3.8/hashlib.py:163: in __hash_new > return __get_builtin_constructor(name)(data) > data = b'P\x00a\x00s\x00s\x00w\x00o\x00r\x00d\x00' > kwargs = {} > name = 'md4' >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >name = 'md4' > > def __get_builtin_constructor(name): > cache = __builtin_constructor_cache > constructor = cache.get(name) > if constructor is not None: > return constructor > try: > if name in {'SHA1', 'sha1'}: > import _sha1 > cache['SHA1'] = cache['sha1'] = _sha1.sha1 > elif name in {'MD5', 'md5'}: > import _md5 > cache['MD5'] = cache['md5'] = _md5.md5 > elif name in {'SHA256', 'sha256', 'SHA224', 'sha224'}: > import _sha256 > cache['SHA224'] = cache['sha224'] = _sha256.sha224 > cache['SHA256'] = cache['sha256'] = _sha256.sha256 > elif name in {'SHA512', 'sha512', 'SHA384', 'sha384'}: > import _sha512 > cache['SHA384'] = cache['sha384'] = _sha512.sha384 > cache['SHA512'] = cache['sha512'] = _sha512.sha512 > elif name in {'blake2b', 'blake2s'}: > import _blake2 > cache['blake2b'] = _blake2.blake2b > cache['blake2s'] = _blake2.blake2s > elif name in {'sha3_224', 'sha3_256', 'sha3_384', 'sha3_512'}: > import _sha3 > cache['sha3_224'] = _sha3.sha3_224 > cache['sha3_256'] = _sha3.sha3_256 > cache['sha3_384'] = _sha3.sha3_384 > cache['sha3_512'] = _sha3.sha3_512 > elif name in {'shake_128', 'shake_256'}: > import _sha3 > cache['shake_128'] = _sha3.shake_128 > cache['shake_256'] = _sha3.shake_256 > except ImportError: > pass # no extension module, this hash is unsupported. > > constructor = cache.get(name) > if constructor is not None: > return constructor > >> raise ValueError('unsupported hash type ' + name) >E ValueError: unsupported hash type md4 > >cache = {'blake2b': <class '_blake2.blake2b'>, > 'blake2s': <class '_blake2.blake2s'>, > 'sha3_224': <class '_sha3.sha3_224'>, > 'sha3_256': <class '_sha3.sha3_256'>, > 'sha3_384': <class '_sha3.sha3_384'>, > 'sha3_512': <class '_sha3.sha3_512'>, > 'shake_128': <class '_sha3.shake_128'>, > 'shake_256': <class '_sha3.shake_256'>} >constructor = None >name = 'md4' > >/usr/lib/python3.8/hashlib.py:120: ValueError >___________________ TestHashResults.test_get_NTLMv1_response ___________________ > >name = 'md4', data = b'P\x00a\x00s\x00s\x00w\x00o\x00r\x00d\x00', kwargs = {} > > def __hash_new(name, data=b'', **kwargs): > """new(name, data=b'') - Return a new hashing object using the named algorithm; > optionally initialized with data (which must be a bytes-like object). > """ > if name in __block_openssl_constructor: > # Prefer our blake2 and sha3 implementation > # OpenSSL 1.1.0 comes with a limited implementation of blake2b/s. > # It does neither support keyed blake2 nor advanced features like > # salt, personal, tree hashing or SSE. > return __get_builtin_constructor(name)(data, **kwargs) > try: >> return _hashlib.new(name, data) >E ValueError: [digital envelope routines] initialization error > >data = b'P\x00a\x00s\x00s\x00w\x00o\x00r\x00d\x00' >kwargs = {} >name = 'md4' > >/usr/lib/python3.8/hashlib.py:157: ValueError > >During handling of the above exception, another exception occurred: > >self = <tests.test_compute_response.TestHashResults object at 0x7f0ec830d7f0> > > def test_get_NTLMv1_response(self): > # 4.2.2.2.1 - NTLMv1 Response > server_challenge = b"\x01\x23\x45\x67\x89\xab\xcd\xef" > expected_response = b"\x67\xc4\x30\x11\xf3\x02\x98\xa2" \ > b"\xad\x35\xec\xe6\x4f\x16\x33\x1c" \ > b"\x44\xbd\xbe\xd9\x27\x84\x1f\x94" > expected_key = b"\xd8\x72\x62\xb0\xcd\xe4\xb1\xcb" \ > b"\x74\x99\xbe\xcc\xcd\xf1\x07\x84" > actual_response, actual_key = \ >> ComputeResponse._get_NTLMv1_response("Password", server_challenge) > >expected_key = b'\xd8rb\xb0\xcd\xe4\xb1\xcbt\x99\xbe\xcc\xcd\xf1\x07\x84' >expected_response = b"g\xc40\x11\xf3\x02\x98\xa2\xad5\xec\xe6O\x163\x1cD\xbd\xbe\xd9'\x84\x1f\x94" >self = <tests.test_compute_response.TestHashResults object at 0x7f0ec830d7f0> >server_challenge = b'\x01#Eg\x89\xab\xcd\xef' > >tests/test_compute_response.py:51: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >ntlm_auth/compute_response.py:297: in _get_NTLMv1_response > ntlm_hash = comphash._ntowfv1(password) > password = 'Password' > server_challenge = b'\x01#Eg\x89\xab\xcd\xef' >ntlm_auth/compute_hash.py:66: in _ntowfv1 > digest = hashlib.new('md4', password.encode('utf-16-le')).digest() > password = 'Password' >/usr/lib/python3.8/hashlib.py:163: in __hash_new > return __get_builtin_constructor(name)(data) > data = b'P\x00a\x00s\x00s\x00w\x00o\x00r\x00d\x00' > kwargs = {} > name = 'md4' >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >name = 'md4' > > def __get_builtin_constructor(name): > cache = __builtin_constructor_cache > constructor = cache.get(name) > if constructor is not None: > return constructor > try: > if name in {'SHA1', 'sha1'}: > import _sha1 > cache['SHA1'] = cache['sha1'] = _sha1.sha1 > elif name in {'MD5', 'md5'}: > import _md5 > cache['MD5'] = cache['md5'] = _md5.md5 > elif name in {'SHA256', 'sha256', 'SHA224', 'sha224'}: > import _sha256 > cache['SHA224'] = cache['sha224'] = _sha256.sha224 > cache['SHA256'] = cache['sha256'] = _sha256.sha256 > elif name in {'SHA512', 'sha512', 'SHA384', 'sha384'}: > import _sha512 > cache['SHA384'] = cache['sha384'] = _sha512.sha384 > cache['SHA512'] = cache['sha512'] = _sha512.sha512 > elif name in {'blake2b', 'blake2s'}: > import _blake2 > cache['blake2b'] = _blake2.blake2b > cache['blake2s'] = _blake2.blake2s > elif name in {'sha3_224', 'sha3_256', 'sha3_384', 'sha3_512'}: > import _sha3 > cache['sha3_224'] = _sha3.sha3_224 > cache['sha3_256'] = _sha3.sha3_256 > cache['sha3_384'] = _sha3.sha3_384 > cache['sha3_512'] = _sha3.sha3_512 > elif name in {'shake_128', 'shake_256'}: > import _sha3 > cache['shake_128'] = _sha3.shake_128 > cache['shake_256'] = _sha3.shake_256 > except ImportError: > pass # no extension module, this hash is unsupported. > > constructor = cache.get(name) > if constructor is not None: > return constructor > >> raise ValueError('unsupported hash type ' + name) >E ValueError: unsupported hash type md4 > >cache = {'blake2b': <class '_blake2.blake2b'>, > 'blake2s': <class '_blake2.blake2s'>, > 'sha3_224': <class '_sha3.sha3_224'>, > 'sha3_256': <class '_sha3.sha3_256'>, > 'sha3_384': <class '_sha3.sha3_384'>, > 'sha3_512': <class '_sha3.sha3_512'>, > 'shake_128': <class '_sha3.shake_128'>, > 'shake_256': <class '_sha3.shake_256'>} >constructor = None >name = 'md4' > >/usr/lib/python3.8/hashlib.py:120: ValueError >___________________ TestHashResults.test_get_NTLM2_response ____________________ > >name = 'md4', data = b'P\x00a\x00s\x00s\x00w\x00o\x00r\x00d\x00', kwargs = {} > > def __hash_new(name, data=b'', **kwargs): > """new(name, data=b'') - Return a new hashing object using the named algorithm; > optionally initialized with data (which must be a bytes-like object). > """ > if name in __block_openssl_constructor: > # Prefer our blake2 and sha3 implementation > # OpenSSL 1.1.0 comes with a limited implementation of blake2b/s. > # It does neither support keyed blake2 nor advanced features like > # salt, personal, tree hashing or SSE. > return __get_builtin_constructor(name)(data, **kwargs) > try: >> return _hashlib.new(name, data) >E ValueError: [digital envelope routines] initialization error > >data = b'P\x00a\x00s\x00s\x00w\x00o\x00r\x00d\x00' >kwargs = {} >name = 'md4' > >/usr/lib/python3.8/hashlib.py:157: ValueError > >During handling of the above exception, another exception occurred: > >self = <tests.test_compute_response.TestHashResults object at 0x7f0ec830da90> > > def test_get_NTLM2_response(self): > # 4.2.3.2.2 - NTLMv1 Response > server_challenge = b"\x01\x23\x45\x67\x89\xab\xcd\xef" > client_challenge = b"\xaa" * 8 > expected_response = b"\x75\x37\xf8\x03\xae\x36\x71\x28" \ > b"\xca\x45\x82\x04\xbd\xe7\xca\xf8" \ > b"\x1e\x97\xed\x26\x83\x26\x72\x32" > expected_key = b"\xd8\x72\x62\xb0\xcd\xe4\xb1\xcb" \ > b"\x74\x99\xbe\xcc\xcd\xf1\x07\x84" > > actual_response, actual_key = \ >> ComputeResponse._get_NTLM2_response("Password", server_challenge, > client_challenge) > >client_challenge = b'\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa' >expected_key = b'\xd8rb\xb0\xcd\xe4\xb1\xcbt\x99\xbe\xcc\xcd\xf1\x07\x84' >expected_response = b'u7\xf8\x03\xae6q(\xcaE\x82\x04\xbd\xe7\xca\xf8\x1e\x97\xed&\x83&r2' >self = <tests.test_compute_response.TestHashResults object at 0x7f0ec830da90> >server_challenge = b'\x01#Eg\x89\xab\xcd\xef' > >tests/test_compute_response.py:66: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >ntlm_auth/compute_response.py:326: in _get_NTLM2_response > ntlm_hash = comphash._ntowfv1(password) > client_challenge = b'\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa' > password = 'Password' > server_challenge = b'\x01#Eg\x89\xab\xcd\xef' >ntlm_auth/compute_hash.py:66: in _ntowfv1 > digest = hashlib.new('md4', password.encode('utf-16-le')).digest() > password = 'Password' >/usr/lib/python3.8/hashlib.py:163: in __hash_new > return __get_builtin_constructor(name)(data) > data = b'P\x00a\x00s\x00s\x00w\x00o\x00r\x00d\x00' > kwargs = {} > name = 'md4' >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >name = 'md4' > > def __get_builtin_constructor(name): > cache = __builtin_constructor_cache > constructor = cache.get(name) > if constructor is not None: > return constructor > try: > if name in {'SHA1', 'sha1'}: > import _sha1 > cache['SHA1'] = cache['sha1'] = _sha1.sha1 > elif name in {'MD5', 'md5'}: > import _md5 > cache['MD5'] = cache['md5'] = _md5.md5 > elif name in {'SHA256', 'sha256', 'SHA224', 'sha224'}: > import _sha256 > cache['SHA224'] = cache['sha224'] = _sha256.sha224 > cache['SHA256'] = cache['sha256'] = _sha256.sha256 > elif name in {'SHA512', 'sha512', 'SHA384', 'sha384'}: > import _sha512 > cache['SHA384'] = cache['sha384'] = _sha512.sha384 > cache['SHA512'] = cache['sha512'] = _sha512.sha512 > elif name in {'blake2b', 'blake2s'}: > import _blake2 > cache['blake2b'] = _blake2.blake2b > cache['blake2s'] = _blake2.blake2s > elif name in {'sha3_224', 'sha3_256', 'sha3_384', 'sha3_512'}: > import _sha3 > cache['sha3_224'] = _sha3.sha3_224 > cache['sha3_256'] = _sha3.sha3_256 > cache['sha3_384'] = _sha3.sha3_384 > cache['sha3_512'] = _sha3.sha3_512 > elif name in {'shake_128', 'shake_256'}: > import _sha3 > cache['shake_128'] = _sha3.shake_128 > cache['shake_256'] = _sha3.shake_256 > except ImportError: > pass # no extension module, this hash is unsupported. > > constructor = cache.get(name) > if constructor is not None: > return constructor > >> raise ValueError('unsupported hash type ' + name) >E ValueError: unsupported hash type md4 > >cache = {'blake2b': <class '_blake2.blake2b'>, > 'blake2s': <class '_blake2.blake2s'>, > 'sha3_224': <class '_sha3.sha3_224'>, > 'sha3_256': <class '_sha3.sha3_256'>, > 'sha3_384': <class '_sha3.sha3_384'>, > 'sha3_512': <class '_sha3.sha3_512'>, > 'shake_128': <class '_sha3.shake_128'>, > 'shake_256': <class '_sha3.shake_256'>} >constructor = None >name = 'md4' > >/usr/lib/python3.8/hashlib.py:120: ValueError >___________________ TestHashResults.test_get_NTLMv2_response ___________________ > >name = 'md4', data = b'P\x00a\x00s\x00s\x00w\x00o\x00r\x00d\x00', kwargs = {} > > def __hash_new(name, data=b'', **kwargs): > """new(name, data=b'') - Return a new hashing object using the named algorithm; > optionally initialized with data (which must be a bytes-like object). > """ > if name in __block_openssl_constructor: > # Prefer our blake2 and sha3 implementation > # OpenSSL 1.1.0 comes with a limited implementation of blake2b/s. > # It does neither support keyed blake2 nor advanced features like > # salt, personal, tree hashing or SSE. > return __get_builtin_constructor(name)(data, **kwargs) > try: >> return _hashlib.new(name, data) >E ValueError: [digital envelope routines] initialization error > >data = b'P\x00a\x00s\x00s\x00w\x00o\x00r\x00d\x00' >kwargs = {} >name = 'md4' > >/usr/lib/python3.8/hashlib.py:157: ValueError > >During handling of the above exception, another exception occurred: > >self = <tests.test_compute_response.TestHashResults object at 0x7f0ec82f9190> > > def test_get_NTLMv2_response(self): > # 4.2.4.2.2 - NTLMv2 Response > server_challenge = b"\x01\x23\x45\x67\x89\xab\xcd\xef" > client_challenge = b"\xaa" * 8 > test_target_info = TargetInfo() > test_target_info[AvId.MSV_AV_NB_DOMAIN_NAME] = \ > b"\x44\x00\x6f\x00\x6d\x00\x61\x00\x69\x00\x6e\x00" > test_target_info[AvId.MSV_AV_NB_COMPUTER_NAME] = \ > b"\x53\x00\x65\x00\x72\x00\x76\x00\x65\x00\x72\x00" > > expected_response = b"\x68\xcd\x0a\xb8\x51\xe5\x1c\x96" \ > b"\xaa\xbc\x92\x7b\xeb\xef\x6a\x1c" \ > b"\x01\x01\x00\x00\x00\x00\x00\x00" \ > b"\x00\x00\x00\x00\x00\x00\x00\x00" \ > b"\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" \ > b"\x00\x00\x00\x00\x02\x00\x0c\x00" \ > b"\x44\x00\x6f\x00\x6d\x00\x61\x00" \ > b"\x69\x00\x6e\x00\x01\x00\x0c\x00" \ > b"\x53\x00\x65\x00\x72\x00\x76\x00" \ > b"\x65\x00\x72\x00\x00\x00\x00\x00" \ > b"\x00\x00\x00\x00" > expected_key = b"\x8d\xe4\x0c\xca\xdb\xc1\x4a\x82" \ > b"\xf1\x5c\xb0\xad\x0d\xe9\x5c\xa3" > > actual_response, actual_key = \ >> ComputeResponse._get_NTLMv2_response("User", "Password", "Domain", > server_challenge, > client_challenge, b"\x00" * 8, > test_target_info) > >client_challenge = b'\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa' >expected_key = b'\x8d\xe4\x0c\xca\xdb\xc1J\x82\xf1\\\xb0\xad\r\xe9\\\xa3' >expected_response = (b'h\xcd\n\xb8Q\xe5\x1c\x96\xaa\xbc\x92{\xeb\xefj\x1c\x01\x01\x00\x00' > b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xaa\xaa\xaa\xaa' > b'\xaa\xaa\xaa\xaa\x00\x00\x00\x00\x02\x00\x0c\x00D\x00o\x00m\x00a\x00' > b'i\x00n\x00\x01\x00\x0c\x00S\x00e\x00r\x00v\x00e\x00r\x00\x00\x00\x00\x00' > b'\x00\x00\x00\x00') >self = <tests.test_compute_response.TestHashResults object at 0x7f0ec82f9190> >server_challenge = b'\x01#Eg\x89\xab\xcd\xef' >test_target_info = <ntlm_auth.messages.TargetInfo object at 0x7f0ec7fa85e0> > >tests/test_compute_response.py:118: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >ntlm_auth/compute_response.py:368: in _get_NTLMv2_response > nt_hash = comphash._ntowfv2(user_name, password, domain_name) > client_challenge = b'\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa' > domain_name = 'Domain' > password = 'Password' > server_challenge = b'\x01#Eg\x89\xab\xcd\xef' > target_info = <ntlm_auth.messages.TargetInfo object at 0x7f0ec7fa85e0> > timestamp = b'\x00\x00\x00\x00\x00\x00\x00\x00' > user_name = 'User' >ntlm_auth/compute_hash.py:87: in _ntowfv2 > digest = _ntowfv1(password) > domain_name = 'Domain' > password = 'Password' > user_name = 'User' >ntlm_auth/compute_hash.py:66: in _ntowfv1 > digest = hashlib.new('md4', password.encode('utf-16-le')).digest() > password = 'Password' >/usr/lib/python3.8/hashlib.py:163: in __hash_new > return __get_builtin_constructor(name)(data) > data = b'P\x00a\x00s\x00s\x00w\x00o\x00r\x00d\x00' > kwargs = {} > name = 'md4' >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >name = 'md4' > > def __get_builtin_constructor(name): > cache = __builtin_constructor_cache > constructor = cache.get(name) > if constructor is not None: > return constructor > try: > if name in {'SHA1', 'sha1'}: > import _sha1 > cache['SHA1'] = cache['sha1'] = _sha1.sha1 > elif name in {'MD5', 'md5'}: > import _md5 > cache['MD5'] = cache['md5'] = _md5.md5 > elif name in {'SHA256', 'sha256', 'SHA224', 'sha224'}: > import _sha256 > cache['SHA224'] = cache['sha224'] = _sha256.sha224 > cache['SHA256'] = cache['sha256'] = _sha256.sha256 > elif name in {'SHA512', 'sha512', 'SHA384', 'sha384'}: > import _sha512 > cache['SHA384'] = cache['sha384'] = _sha512.sha384 > cache['SHA512'] = cache['sha512'] = _sha512.sha512 > elif name in {'blake2b', 'blake2s'}: > import _blake2 > cache['blake2b'] = _blake2.blake2b > cache['blake2s'] = _blake2.blake2s > elif name in {'sha3_224', 'sha3_256', 'sha3_384', 'sha3_512'}: > import _sha3 > cache['sha3_224'] = _sha3.sha3_224 > cache['sha3_256'] = _sha3.sha3_256 > cache['sha3_384'] = _sha3.sha3_384 > cache['sha3_512'] = _sha3.sha3_512 > elif name in {'shake_128', 'shake_256'}: > import _sha3 > cache['shake_128'] = _sha3.shake_128 > cache['shake_256'] = _sha3.shake_256 > except ImportError: > pass # no extension module, this hash is unsupported. > > constructor = cache.get(name) > if constructor is not None: > return constructor > >> raise ValueError('unsupported hash type ' + name) >E ValueError: unsupported hash type md4 > >cache = {'blake2b': <class '_blake2.blake2b'>, > 'blake2s': <class '_blake2.blake2s'>, > 'sha3_224': <class '_sha3.sha3_224'>, > 'sha3_256': <class '_sha3.sha3_256'>, > 'sha3_384': <class '_sha3.sha3_384'>, > 'sha3_512': <class '_sha3.sha3_512'>, > 'shake_128': <class '_sha3.shake_128'>, > 'shake_256': <class '_sha3.shake_256'>} >constructor = None >name = 'md4' > >/usr/lib/python3.8/hashlib.py:120: ValueError >_____________ TestChallengeResults.test_lm_v1_with_ntlm_2_response _____________ > >name = 'md4', data = b'P\x00a\x00s\x00s\x00w\x00o\x00r\x00d\x00', kwargs = {} > > def __hash_new(name, data=b'', **kwargs): > """new(name, data=b'') - Return a new hashing object using the named algorithm; > optionally initialized with data (which must be a bytes-like object). > """ > if name in __block_openssl_constructor: > # Prefer our blake2 and sha3 implementation > # OpenSSL 1.1.0 comes with a limited implementation of blake2b/s. > # It does neither support keyed blake2 nor advanced features like > # salt, personal, tree hashing or SSE. > return __get_builtin_constructor(name)(data, **kwargs) > try: >> return _hashlib.new(name, data) >E ValueError: [digital envelope routines] initialization error > >data = b'P\x00a\x00s\x00s\x00w\x00o\x00r\x00d\x00' >kwargs = {} >name = 'md4' > >/usr/lib/python3.8/hashlib.py:157: ValueError > >During handling of the above exception, another exception occurred: > >self = <tests.test_compute_response.TestChallengeResults object at 0x7f0ec82f92b0> > > def test_lm_v1_with_ntlm_2_response(self): > test_challenge_message = ChallengeMessage( > b"\x4e\x54\x4c\x4d\x53\x53\x50\x00" > b"\x02\x00\x00\x00\x0c\x00\x0c\x00" > b"\x38\x00\x00\x00\x33\x82\x02\xe2" > b"\x01\x23\x45\x67\x89\xab\xcd\xef" > b"\x06\x00\x70\x17\x00\x00\x00\x0f" > b"\x53\x00\x65\x00\x72\x00\x76\x00" > b"\x65\x00\x72\x00" > ) > > # Not explicitly in the example shown but it does expect the same > # response that we already have set > expected = b"\x67\xc4\x30\x11\xf3\x02\x98\xa2" \ > b"\xad\x35\xec\xe6\x4f\x16\x33\x1c" \ > b"\x44\xbd\xbe\xd9\x27\x84\x1f\x94" >> actual = ComputeResponse("User", "Password", "Domain", > test_challenge_message, > 2).get_lm_challenge_response() > >expected = b"g\xc40\x11\xf3\x02\x98\xa2\xad5\xec\xe6O\x163\x1cD\xbd\xbe\xd9'\x84\x1f\x94" >self = <tests.test_compute_response.TestChallengeResults object at 0x7f0ec82f92b0> >test_challenge_message = <ntlm_auth.messages.ChallengeMessage object at 0x7f0ec7f09af0> > >tests/test_compute_response.py:185: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >ntlm_auth/compute_response.py:80: in get_lm_challenge_response > self._get_NTLMv1_response(self._password, > self = <ntlm_auth.compute_response.ComputeResponse object at 0x7f0ec7f09730> >ntlm_auth/compute_response.py:297: in _get_NTLMv1_response > ntlm_hash = comphash._ntowfv1(password) > password = 'Password' > server_challenge = b'\x01#Eg\x89\xab\xcd\xef' >ntlm_auth/compute_hash.py:66: in _ntowfv1 > digest = hashlib.new('md4', password.encode('utf-16-le')).digest() > password = 'Password' >/usr/lib/python3.8/hashlib.py:163: in __hash_new > return __get_builtin_constructor(name)(data) > data = b'P\x00a\x00s\x00s\x00w\x00o\x00r\x00d\x00' > kwargs = {} > name = 'md4' >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >name = 'md4' > > def __get_builtin_constructor(name): > cache = __builtin_constructor_cache > constructor = cache.get(name) > if constructor is not None: > return constructor > try: > if name in {'SHA1', 'sha1'}: > import _sha1 > cache['SHA1'] = cache['sha1'] = _sha1.sha1 > elif name in {'MD5', 'md5'}: > import _md5 > cache['MD5'] = cache['md5'] = _md5.md5 > elif name in {'SHA256', 'sha256', 'SHA224', 'sha224'}: > import _sha256 > cache['SHA224'] = cache['sha224'] = _sha256.sha224 > cache['SHA256'] = cache['sha256'] = _sha256.sha256 > elif name in {'SHA512', 'sha512', 'SHA384', 'sha384'}: > import _sha512 > cache['SHA384'] = cache['sha384'] = _sha512.sha384 > cache['SHA512'] = cache['sha512'] = _sha512.sha512 > elif name in {'blake2b', 'blake2s'}: > import _blake2 > cache['blake2b'] = _blake2.blake2b > cache['blake2s'] = _blake2.blake2s > elif name in {'sha3_224', 'sha3_256', 'sha3_384', 'sha3_512'}: > import _sha3 > cache['sha3_224'] = _sha3.sha3_224 > cache['sha3_256'] = _sha3.sha3_256 > cache['sha3_384'] = _sha3.sha3_384 > cache['sha3_512'] = _sha3.sha3_512 > elif name in {'shake_128', 'shake_256'}: > import _sha3 > cache['shake_128'] = _sha3.shake_128 > cache['shake_256'] = _sha3.shake_256 > except ImportError: > pass # no extension module, this hash is unsupported. > > constructor = cache.get(name) > if constructor is not None: > return constructor > >> raise ValueError('unsupported hash type ' + name) >E ValueError: unsupported hash type md4 > >cache = {'blake2b': <class '_blake2.blake2b'>, > 'blake2s': <class '_blake2.blake2s'>, > 'sha3_224': <class '_sha3.sha3_224'>, > 'sha3_256': <class '_sha3.sha3_256'>, > 'sha3_384': <class '_sha3.sha3_384'>, > 'sha3_512': <class '_sha3.sha3_512'>, > 'shake_128': <class '_sha3.shake_128'>, > 'shake_256': <class '_sha3.shake_256'>} >constructor = None >name = 'md4' > >/usr/lib/python3.8/hashlib.py:120: ValueError >___________________ TestChallengeResults.test_lm_v2_response ___________________ > >name = 'md4', data = b'P\x00a\x00s\x00s\x00w\x00o\x00r\x00d\x00', kwargs = {} > > def __hash_new(name, data=b'', **kwargs): > """new(name, data=b'') - Return a new hashing object using the named algorithm; > optionally initialized with data (which must be a bytes-like object). > """ > if name in __block_openssl_constructor: > # Prefer our blake2 and sha3 implementation > # OpenSSL 1.1.0 comes with a limited implementation of blake2b/s. > # It does neither support keyed blake2 nor advanced features like > # salt, personal, tree hashing or SSE. > return __get_builtin_constructor(name)(data, **kwargs) > try: >> return _hashlib.new(name, data) >E ValueError: [digital envelope routines] initialization error > >data = b'P\x00a\x00s\x00s\x00w\x00o\x00r\x00d\x00' >kwargs = {} >name = 'md4' > >/usr/lib/python3.8/hashlib.py:157: ValueError > >During handling of the above exception, another exception occurred: > >self = <tests.test_compute_response.TestChallengeResults object at 0x7f0ec82f9580> >monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f0ec7f2c700> > > def test_lm_v2_response(self, monkeypatch): > monkeypatch.setattr('os.urandom', lambda s: b"\xaa" * 8) > > test_challenge_message = ChallengeMessage( > b"\x4e\x54\x4c\x4d\x53\x53\x50\x00" > b"\x02\x00\x00\x00\x03\x00\x0c\x00" > b"\x38\x00\x00\x00\x33\x82\x8a\xe2" > b"\x01\x23\x45\x67\x89\xab\xcd\xef" > b"\x00\x00\x00\x00\x00\x00\x00\x00" > b"\x24\x00\x24\x00\x44\x00\x00\x00" > b"\x06\x00\x70\x17\x00\x00\x00\x0f" > b"\x53\x00\x65\x00\x72\x00\x76\x00" > b"\x65\x00\x72\x00\x02\x00\x0c\x00" > b"\x44\x00\x6f\x00\x6d\x00\x61\x00" > b"\x69\x00\x6e\x00\x01\x00\x0c\x00" > b"\x53\x00\x65\x00\x72\x00\x76\x00" > b"\x65\x00\x72\x00\x00\x00\x00\x00" > ) > > expected = b"\x86\xc3\x50\x97\xac\x9c\xec\x10" \ > b"\x25\x54\x76\x4a\x57\xcc\xcc\x19" \ > b"\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" >> actual = ComputeResponse("User", "Password", "Domain", > test_challenge_message, > 3).get_lm_challenge_response() > >expected = (b'\x86\xc3P\x97\xac\x9c\xec\x10%TvJW\xcc\xcc\x19\xaa\xaa\xaa\xaa' > b'\xaa\xaa\xaa\xaa') >monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f0ec7f2c700> >self = <tests.test_compute_response.TestChallengeResults object at 0x7f0ec82f9580> >test_challenge_message = <ntlm_auth.messages.ChallengeMessage object at 0x7f0ec7f2c820> > >tests/test_compute_response.py:212: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >ntlm_auth/compute_response.py:91: in get_lm_challenge_response > response = self._get_LMv2_response(self._user_name, self._password, > self = <ntlm_auth.compute_response.ComputeResponse object at 0x7f0ec7f2c580> >ntlm_auth/compute_response.py:272: in _get_LMv2_response > nt_hash = comphash._ntowfv2(user_name, password, domain_name) > client_challenge = b'\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa' > domain_name = 'Domain' > password = 'Password' > server_challenge = b'\x01#Eg\x89\xab\xcd\xef' > user_name = 'User' >ntlm_auth/compute_hash.py:87: in _ntowfv2 > digest = _ntowfv1(password) > domain_name = 'Domain' > password = 'Password' > user_name = 'User' >ntlm_auth/compute_hash.py:66: in _ntowfv1 > digest = hashlib.new('md4', password.encode('utf-16-le')).digest() > password = 'Password' >/usr/lib/python3.8/hashlib.py:163: in __hash_new > return __get_builtin_constructor(name)(data) > data = b'P\x00a\x00s\x00s\x00w\x00o\x00r\x00d\x00' > kwargs = {} > name = 'md4' >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >name = 'md4' > > def __get_builtin_constructor(name): > cache = __builtin_constructor_cache > constructor = cache.get(name) > if constructor is not None: > return constructor > try: > if name in {'SHA1', 'sha1'}: > import _sha1 > cache['SHA1'] = cache['sha1'] = _sha1.sha1 > elif name in {'MD5', 'md5'}: > import _md5 > cache['MD5'] = cache['md5'] = _md5.md5 > elif name in {'SHA256', 'sha256', 'SHA224', 'sha224'}: > import _sha256 > cache['SHA224'] = cache['sha224'] = _sha256.sha224 > cache['SHA256'] = cache['sha256'] = _sha256.sha256 > elif name in {'SHA512', 'sha512', 'SHA384', 'sha384'}: > import _sha512 > cache['SHA384'] = cache['sha384'] = _sha512.sha384 > cache['SHA512'] = cache['sha512'] = _sha512.sha512 > elif name in {'blake2b', 'blake2s'}: > import _blake2 > cache['blake2b'] = _blake2.blake2b > cache['blake2s'] = _blake2.blake2s > elif name in {'sha3_224', 'sha3_256', 'sha3_384', 'sha3_512'}: > import _sha3 > cache['sha3_224'] = _sha3.sha3_224 > cache['sha3_256'] = _sha3.sha3_256 > cache['sha3_384'] = _sha3.sha3_384 > cache['sha3_512'] = _sha3.sha3_512 > elif name in {'shake_128', 'shake_256'}: > import _sha3 > cache['shake_128'] = _sha3.shake_128 > cache['shake_256'] = _sha3.shake_256 > except ImportError: > pass # no extension module, this hash is unsupported. > > constructor = cache.get(name) > if constructor is not None: > return constructor > >> raise ValueError('unsupported hash type ' + name) >E ValueError: unsupported hash type md4 > >cache = {'blake2b': <class '_blake2.blake2b'>, > 'blake2s': <class '_blake2.blake2s'>, > 'sha3_224': <class '_sha3.sha3_224'>, > 'sha3_256': <class '_sha3.sha3_256'>, > 'sha3_384': <class '_sha3.sha3_384'>, > 'sha3_512': <class '_sha3.sha3_512'>, > 'shake_128': <class '_sha3.shake_128'>, > 'shake_256': <class '_sha3.shake_256'>} >constructor = None >name = 'md4' > >/usr/lib/python3.8/hashlib.py:120: ValueError >____ TestChallengeResults.test_lm_v2_response_with_no_target_info_timestamp ____ > >name = 'md4', data = b'P\x00a\x00s\x00s\x00w\x00o\x00r\x00d\x00', kwargs = {} > > def __hash_new(name, data=b'', **kwargs): > """new(name, data=b'') - Return a new hashing object using the named algorithm; > optionally initialized with data (which must be a bytes-like object). > """ > if name in __block_openssl_constructor: > # Prefer our blake2 and sha3 implementation > # OpenSSL 1.1.0 comes with a limited implementation of blake2b/s. > # It does neither support keyed blake2 nor advanced features like > # salt, personal, tree hashing or SSE. > return __get_builtin_constructor(name)(data, **kwargs) > try: >> return _hashlib.new(name, data) >E ValueError: [digital envelope routines] initialization error > >data = b'P\x00a\x00s\x00s\x00w\x00o\x00r\x00d\x00' >kwargs = {} >name = 'md4' > >/usr/lib/python3.8/hashlib.py:157: ValueError > >During handling of the above exception, another exception occurred: > >self = <tests.test_compute_response.TestChallengeResults object at 0x7f0ec82f99d0> >monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f0ec7f666a0> > > def test_lm_v2_response_with_no_target_info_timestamp(self, monkeypatch): > monkeypatch.setattr('os.urandom', lambda s: b"\xaa" * 8) > > test_target_info = TargetInfo() > test_target_info[AvId.MSV_AV_NB_DOMAIN_NAME] = \ > b"\x44\x00\x6f\x00\x6d\x00\x61\x00\x69\x00\x6e\x00" > test_target_info[AvId.MSV_AV_NB_COMPUTER_NAME] = \ > b"\x53\x00\x65\x00\x72\x00\x76\x00\x65\x00\x72\x00" > > test_challenge_message = ChallengeMessage( > b"\x4e\x54\x4c\x4d\x53\x53\x50\x00" > b"\x02\x00\x00\x00\x03\x00\x0c\x00" > b"\x38\x00\x00\x00\x33\x82\x8a\xe2" > b"\x01\x23\x45\x67\x89\xab\xcd\xef" > b"\x00\x00\x00\x00\x00\x00\x00\x00" > b"\x24\x00\x24\x00\x44\x00\x00\x00" > b"\x06\x00\x70\x17\x00\x00\x00\x0f" > b"\x53\x00\x65\x00\x72\x00\x76\x00" > b"\x65\x00\x72\x00\x02\x00\x0c\x00" > b"\x44\x00\x6f\x00\x6d\x00\x61\x00" > b"\x69\x00\x6e\x00\x01\x00\x0c\x00" > b"\x53\x00\x65\x00\x72\x00\x76\x00" > b"\x65\x00\x72\x00\x00\x00\x00\x00" > ) > test_challenge_message.target_info = test_target_info > > expected = b"\x86\xc3\x50\x97\xac\x9c\xec\x10" \ > b"\x25\x54\x76\x4a\x57\xcc\xcc\x19" \ > b"\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" >> actual = ComputeResponse("User", "Password", "Domain", > test_challenge_message, > 3).get_lm_challenge_response() > >expected = (b'\x86\xc3P\x97\xac\x9c\xec\x10%TvJW\xcc\xcc\x19\xaa\xaa\xaa\xaa' > b'\xaa\xaa\xaa\xaa') >monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f0ec7f666a0> >self = <tests.test_compute_response.TestChallengeResults object at 0x7f0ec82f99d0> >test_challenge_message = <ntlm_auth.messages.ChallengeMessage object at 0x7f0ec7f667f0> >test_target_info = <ntlm_auth.messages.TargetInfo object at 0x7f0ec7f66760> > >tests/test_compute_response.py:246: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >ntlm_auth/compute_response.py:91: in get_lm_challenge_response > response = self._get_LMv2_response(self._user_name, self._password, > self = <ntlm_auth.compute_response.ComputeResponse object at 0x7f0ec7f66b20> >ntlm_auth/compute_response.py:272: in _get_LMv2_response > nt_hash = comphash._ntowfv2(user_name, password, domain_name) > client_challenge = b'\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa' > domain_name = 'Domain' > password = 'Password' > server_challenge = b'\x01#Eg\x89\xab\xcd\xef' > user_name = 'User' >ntlm_auth/compute_hash.py:87: in _ntowfv2 > digest = _ntowfv1(password) > domain_name = 'Domain' > password = 'Password' > user_name = 'User' >ntlm_auth/compute_hash.py:66: in _ntowfv1 > digest = hashlib.new('md4', password.encode('utf-16-le')).digest() > password = 'Password' >/usr/lib/python3.8/hashlib.py:163: in __hash_new > return __get_builtin_constructor(name)(data) > data = b'P\x00a\x00s\x00s\x00w\x00o\x00r\x00d\x00' > kwargs = {} > name = 'md4' >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >name = 'md4' > > def __get_builtin_constructor(name): > cache = __builtin_constructor_cache > constructor = cache.get(name) > if constructor is not None: > return constructor > try: > if name in {'SHA1', 'sha1'}: > import _sha1 > cache['SHA1'] = cache['sha1'] = _sha1.sha1 > elif name in {'MD5', 'md5'}: > import _md5 > cache['MD5'] = cache['md5'] = _md5.md5 > elif name in {'SHA256', 'sha256', 'SHA224', 'sha224'}: > import _sha256 > cache['SHA224'] = cache['sha224'] = _sha256.sha224 > cache['SHA256'] = cache['sha256'] = _sha256.sha256 > elif name in {'SHA512', 'sha512', 'SHA384', 'sha384'}: > import _sha512 > cache['SHA384'] = cache['sha384'] = _sha512.sha384 > cache['SHA512'] = cache['sha512'] = _sha512.sha512 > elif name in {'blake2b', 'blake2s'}: > import _blake2 > cache['blake2b'] = _blake2.blake2b > cache['blake2s'] = _blake2.blake2s > elif name in {'sha3_224', 'sha3_256', 'sha3_384', 'sha3_512'}: > import _sha3 > cache['sha3_224'] = _sha3.sha3_224 > cache['sha3_256'] = _sha3.sha3_256 > cache['sha3_384'] = _sha3.sha3_384 > cache['sha3_512'] = _sha3.sha3_512 > elif name in {'shake_128', 'shake_256'}: > import _sha3 > cache['shake_128'] = _sha3.shake_128 > cache['shake_256'] = _sha3.shake_256 > except ImportError: > pass # no extension module, this hash is unsupported. > > constructor = cache.get(name) > if constructor is not None: > return constructor > >> raise ValueError('unsupported hash type ' + name) >E ValueError: unsupported hash type md4 > >cache = {'blake2b': <class '_blake2.blake2b'>, > 'blake2s': <class '_blake2.blake2s'>, > 'sha3_224': <class '_sha3.sha3_224'>, > 'sha3_256': <class '_sha3.sha3_256'>, > 'sha3_384': <class '_sha3.sha3_384'>, > 'sha3_512': <class '_sha3.sha3_512'>, > 'shake_128': <class '_sha3.shake_128'>, > 'shake_256': <class '_sha3.shake_256'>} >constructor = None >name = 'md4' > >/usr/lib/python3.8/hashlib.py:120: ValueError >__ TestChallengeResults.test_lm_v2_response_with_server_target_info_timestamp __ > >name = 'md4', data = b'P\x00a\x00s\x00s\x00w\x00o\x00r\x00d\x00', kwargs = {} > > def __hash_new(name, data=b'', **kwargs): > """new(name, data=b'') - Return a new hashing object using the named algorithm; > optionally initialized with data (which must be a bytes-like object). > """ > if name in __block_openssl_constructor: > # Prefer our blake2 and sha3 implementation > # OpenSSL 1.1.0 comes with a limited implementation of blake2b/s. > # It does neither support keyed blake2 nor advanced features like > # salt, personal, tree hashing or SSE. > return __get_builtin_constructor(name)(data, **kwargs) > try: >> return _hashlib.new(name, data) >E ValueError: [digital envelope routines] initialization error > >data = b'P\x00a\x00s\x00s\x00w\x00o\x00r\x00d\x00' >kwargs = {} >name = 'md4' > >/usr/lib/python3.8/hashlib.py:157: ValueError > >During handling of the above exception, another exception occurred: > >self = <tests.test_compute_response.TestChallengeResults object at 0x7f0ec82f9a90> > > def test_lm_v2_response_with_server_target_info_timestamp(self): > test_target_info = TargetInfo() > test_target_info[AvId.MSV_AV_NB_DOMAIN_NAME] = \ > b"\x44\x00\x6f\x00\x6d\x00\x61\x00\x69\x00\x6e\x00" > test_target_info[AvId.MSV_AV_NB_COMPUTER_NAME] = \ > b"\x53\x00\x65\x00\x72\x00\x76\x00\x65\x00\x72\x00" > test_target_info[AvId.MSV_AV_TIMESTAMP] = b"\x00" * 8 > > test_challenge_message = ChallengeMessage( > b"\x4e\x54\x4c\x4d\x53\x53\x50\x00" > b"\x02\x00\x00\x00\x03\x00\x0c\x00" > b"\x38\x00\x00\x00\x33\x82\x8a\xe2" > b"\x01\x23\x45\x67\x89\xab\xcd\xef" > b"\x00\x00\x00\x00\x00\x00\x00\x00" > b"\x24\x00\x24\x00\x44\x00\x00\x00" > b"\x06\x00\x70\x17\x00\x00\x00\x0f" > b"\x53\x00\x65\x00\x72\x00\x76\x00" > b"\x65\x00\x72\x00\x02\x00\x0c\x00" > b"\x44\x00\x6f\x00\x6d\x00\x61\x00" > b"\x69\x00\x6e\x00\x01\x00\x0c\x00" > b"\x53\x00\x65\x00\x72\x00\x76\x00" > b"\x65\x00\x72\x00\x00\x00\x00\x00" > ) > test_challenge_message.target_info = test_target_info > > # Not in MS-NLMP, using expected value > expected = b"\x00" * 24 >> actual = ComputeResponse("User", "Password", "Domain", > test_challenge_message, > 3).get_lm_challenge_response() > >expected = (b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' > b'\x00\x00\x00\x00\x00\x00\x00\x00') >self = <tests.test_compute_response.TestChallengeResults object at 0x7f0ec82f9a90> >test_challenge_message = <ntlm_auth.messages.ChallengeMessage object at 0x7f0ec7f28400> >test_target_info = <ntlm_auth.messages.TargetInfo object at 0x7f0ec7f28790> > >tests/test_compute_response.py:278: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >ntlm_auth/compute_response.py:91: in get_lm_challenge_response > response = self._get_LMv2_response(self._user_name, self._password, > self = <ntlm_auth.compute_response.ComputeResponse object at 0x7f0ec7f283d0> >ntlm_auth/compute_response.py:272: in _get_LMv2_response > nt_hash = comphash._ntowfv2(user_name, password, domain_name) > client_challenge = b'Q\xf9\x1f\xab\xd9\xd1\x17\xa0' > domain_name = 'Domain' > password = 'Password' > server_challenge = b'\x01#Eg\x89\xab\xcd\xef' > user_name = 'User' >ntlm_auth/compute_hash.py:87: in _ntowfv2 > digest = _ntowfv1(password) > domain_name = 'Domain' > password = 'Password' > user_name = 'User' >ntlm_auth/compute_hash.py:66: in _ntowfv1 > digest = hashlib.new('md4', password.encode('utf-16-le')).digest() > password = 'Password' >/usr/lib/python3.8/hashlib.py:163: in __hash_new > return __get_builtin_constructor(name)(data) > data = b'P\x00a\x00s\x00s\x00w\x00o\x00r\x00d\x00' > kwargs = {} > name = 'md4' >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >name = 'md4' > > def __get_builtin_constructor(name): > cache = __builtin_constructor_cache > constructor = cache.get(name) > if constructor is not None: > return constructor > try: > if name in {'SHA1', 'sha1'}: > import _sha1 > cache['SHA1'] = cache['sha1'] = _sha1.sha1 > elif name in {'MD5', 'md5'}: > import _md5 > cache['MD5'] = cache['md5'] = _md5.md5 > elif name in {'SHA256', 'sha256', 'SHA224', 'sha224'}: > import _sha256 > cache['SHA224'] = cache['sha224'] = _sha256.sha224 > cache['SHA256'] = cache['sha256'] = _sha256.sha256 > elif name in {'SHA512', 'sha512', 'SHA384', 'sha384'}: > import _sha512 > cache['SHA384'] = cache['sha384'] = _sha512.sha384 > cache['SHA512'] = cache['sha512'] = _sha512.sha512 > elif name in {'blake2b', 'blake2s'}: > import _blake2 > cache['blake2b'] = _blake2.blake2b > cache['blake2s'] = _blake2.blake2s > elif name in {'sha3_224', 'sha3_256', 'sha3_384', 'sha3_512'}: > import _sha3 > cache['sha3_224'] = _sha3.sha3_224 > cache['sha3_256'] = _sha3.sha3_256 > cache['sha3_384'] = _sha3.sha3_384 > cache['sha3_512'] = _sha3.sha3_512 > elif name in {'shake_128', 'shake_256'}: > import _sha3 > cache['shake_128'] = _sha3.shake_128 > cache['shake_256'] = _sha3.shake_256 > except ImportError: > pass # no extension module, this hash is unsupported. > > constructor = cache.get(name) > if constructor is not None: > return constructor > >> raise ValueError('unsupported hash type ' + name) >E ValueError: unsupported hash type md4 > >cache = {'blake2b': <class '_blake2.blake2b'>, > 'blake2s': <class '_blake2.blake2s'>, > 'sha3_224': <class '_sha3.sha3_224'>, > 'sha3_256': <class '_sha3.sha3_256'>, > 'sha3_384': <class '_sha3.sha3_384'>, > 'sha3_512': <class '_sha3.sha3_512'>, > 'shake_128': <class '_sha3.shake_128'>, > 'shake_256': <class '_sha3.shake_256'>} >constructor = None >name = 'md4' > >/usr/lib/python3.8/hashlib.py:120: ValueError >___________________ TestChallengeResults.test_nt_v1_response ___________________ > >name = 'md4', data = b'P\x00a\x00s\x00s\x00w\x00o\x00r\x00d\x00', kwargs = {} > > def __hash_new(name, data=b'', **kwargs): > """new(name, data=b'') - Return a new hashing object using the named algorithm; > optionally initialized with data (which must be a bytes-like object). > """ > if name in __block_openssl_constructor: > # Prefer our blake2 and sha3 implementation > # OpenSSL 1.1.0 comes with a limited implementation of blake2b/s. > # It does neither support keyed blake2 nor advanced features like > # salt, personal, tree hashing or SSE. > return __get_builtin_constructor(name)(data, **kwargs) > try: >> return _hashlib.new(name, data) >E ValueError: [digital envelope routines] initialization error > >data = b'P\x00a\x00s\x00s\x00w\x00o\x00r\x00d\x00' >kwargs = {} >name = 'md4' > >/usr/lib/python3.8/hashlib.py:157: ValueError > >During handling of the above exception, another exception occurred: > >self = <tests.test_compute_response.TestChallengeResults object at 0x7f0ec82f98b0> > > def test_nt_v1_response(self): > test_challenge_message = ChallengeMessage( > b"\x4e\x54\x4c\x4d\x53\x53\x50\x00" > b"\x02\x00\x00\x00\x0c\x00\x0c\x00" > b"\x38\x00\x00\x00\x33\x82\x02\xe2" > b"\x01\x23\x45\x67\x89\xab\xcd\xef" > b"\x06\x00\x70\x17\x00\x00\x00\x0f" > b"\x53\x00\x65\x00\x72\x00\x76\x00" > b"\x65\x00\x72\x00" > ) > test_lmv1_response = b"\x98\xde\xf7\xb8\x7f\x88\xaa\x5d" \ > b"\xaf\xe2\xdf\x77\x96\x88\xa1\x72" \ > b"\xde\xf1\x1c\x7d\x5c\xcd\xef\x13" > > expected_response = b"\x67\xc4\x30\x11\xf3\x02\x98\xa2" \ > b"\xad\x35\xec\xe6\x4f\x16\x33\x1c" \ > b"\x44\xbd\xbe\xd9\x27\x84\x1f\x94" > expected_exchange_key = b"\xd8\x72\x62\xb0\xcd\xe4\xb1\xcb" \ > b"\x74\x99\xbe\xcc\xcd\xf1\x07\x84" > expected_target_info = None > > comp_response = ComputeResponse("User", "Password", "Domain", > test_challenge_message, 1) > actual_response, actual_exchange_key, actual_target_info = \ >> comp_response.get_nt_challenge_response(test_lmv1_response, None) > >comp_response = <ntlm_auth.compute_response.ComputeResponse object at 0x7f0ec7f34d30> >expected_exchange_key = b'\xd8rb\xb0\xcd\xe4\xb1\xcbt\x99\xbe\xcc\xcd\xf1\x07\x84' >expected_response = b"g\xc40\x11\xf3\x02\x98\xa2\xad5\xec\xe6O\x163\x1cD\xbd\xbe\xd9'\x84\x1f\x94" >expected_target_info = None >self = <tests.test_compute_response.TestChallengeResults object at 0x7f0ec82f98b0> >test_challenge_message = <ntlm_auth.messages.ChallengeMessage object at 0x7f0ec7f34070> >test_lmv1_response = (b'\x98\xde\xf7\xb8\x7f\x88\xaa]\xaf\xe2\xdfw\x96\x88\xa1r\xde\xf1\x1c}' > b'\\\xcd\xef\x13') > >tests/test_compute_response.py:307: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >ntlm_auth/compute_response.py:153: in get_nt_challenge_response > self._get_NTLMv1_response(self._password, > cbt_data = None > lm_challenge_response = (b'\x98\xde\xf7\xb8\x7f\x88\xaa]\xaf\xe2\xdfw\x96\x88\xa1r\xde\xf1\x1c}' > b'\\\xcd\xef\x13') > self = <ntlm_auth.compute_response.ComputeResponse object at 0x7f0ec7f34d30> > server_certificate_hash = None >ntlm_auth/compute_response.py:297: in _get_NTLMv1_response > ntlm_hash = comphash._ntowfv1(password) > password = 'Password' > server_challenge = b'\x01#Eg\x89\xab\xcd\xef' >ntlm_auth/compute_hash.py:66: in _ntowfv1 > digest = hashlib.new('md4', password.encode('utf-16-le')).digest() > password = 'Password' >/usr/lib/python3.8/hashlib.py:163: in __hash_new > return __get_builtin_constructor(name)(data) > data = b'P\x00a\x00s\x00s\x00w\x00o\x00r\x00d\x00' > kwargs = {} > name = 'md4' >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >name = 'md4' > > def __get_builtin_constructor(name): > cache = __builtin_constructor_cache > constructor = cache.get(name) > if constructor is not None: > return constructor > try: > if name in {'SHA1', 'sha1'}: > import _sha1 > cache['SHA1'] = cache['sha1'] = _sha1.sha1 > elif name in {'MD5', 'md5'}: > import _md5 > cache['MD5'] = cache['md5'] = _md5.md5 > elif name in {'SHA256', 'sha256', 'SHA224', 'sha224'}: > import _sha256 > cache['SHA224'] = cache['sha224'] = _sha256.sha224 > cache['SHA256'] = cache['sha256'] = _sha256.sha256 > elif name in {'SHA512', 'sha512', 'SHA384', 'sha384'}: > import _sha512 > cache['SHA384'] = cache['sha384'] = _sha512.sha384 > cache['SHA512'] = cache['sha512'] = _sha512.sha512 > elif name in {'blake2b', 'blake2s'}: > import _blake2 > cache['blake2b'] = _blake2.blake2b > cache['blake2s'] = _blake2.blake2s > elif name in {'sha3_224', 'sha3_256', 'sha3_384', 'sha3_512'}: > import _sha3 > cache['sha3_224'] = _sha3.sha3_224 > cache['sha3_256'] = _sha3.sha3_256 > cache['sha3_384'] = _sha3.sha3_384 > cache['sha3_512'] = _sha3.sha3_512 > elif name in {'shake_128', 'shake_256'}: > import _sha3 > cache['shake_128'] = _sha3.shake_128 > cache['shake_256'] = _sha3.shake_256 > except ImportError: > pass # no extension module, this hash is unsupported. > > constructor = cache.get(name) > if constructor is not None: > return constructor > >> raise ValueError('unsupported hash type ' + name) >E ValueError: unsupported hash type md4 > >cache = {'blake2b': <class '_blake2.blake2b'>, > 'blake2s': <class '_blake2.blake2s'>, > 'sha3_224': <class '_sha3.sha3_224'>, > 'sha3_256': <class '_sha3.sha3_256'>, > 'sha3_384': <class '_sha3.sha3_384'>, > 'sha3_512': <class '_sha3.sha3_512'>, > 'shake_128': <class '_sha3.shake_128'>, > 'shake_256': <class '_sha3.shake_256'>} >constructor = None >name = 'md4' > >/usr/lib/python3.8/hashlib.py:120: ValueError >_______ TestChallengeResults.test_nt_v1_with_extended_security_response ________ > >name = 'md4', data = b'P\x00a\x00s\x00s\x00w\x00o\x00r\x00d\x00', kwargs = {} > > def __hash_new(name, data=b'', **kwargs): > """new(name, data=b'') - Return a new hashing object using the named algorithm; > optionally initialized with data (which must be a bytes-like object). > """ > if name in __block_openssl_constructor: > # Prefer our blake2 and sha3 implementation > # OpenSSL 1.1.0 comes with a limited implementation of blake2b/s. > # It does neither support keyed blake2 nor advanced features like > # salt, personal, tree hashing or SSE. > return __get_builtin_constructor(name)(data, **kwargs) > try: >> return _hashlib.new(name, data) >E ValueError: [digital envelope routines] initialization error > >data = b'P\x00a\x00s\x00s\x00w\x00o\x00r\x00d\x00' >kwargs = {} >name = 'md4' > >/usr/lib/python3.8/hashlib.py:157: ValueError > >During handling of the above exception, another exception occurred: > >self = <tests.test_compute_response.TestChallengeResults object at 0x7f0ec82f9ca0> >monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f0ec7f2ceb0> > > def test_nt_v1_with_extended_security_response(self, monkeypatch): > monkeypatch.setattr('os.urandom', lambda s: b"\xaa" * 8) > > test_challenge_message = ChallengeMessage( > b"\x4e\x54\x4c\x4d\x53\x53\x50\x00" > b"\x02\x00\x00\x00\x0c\x00\x0c\x00" > b"\x38\x00\x00\x00\x33\x82\x0a\x82" > b"\x01\x23\x45\x67\x89\xab\xcd\xef" > b"\x00\x00\x00\x00\x00\x00\x00\x00" > b"\x00\x00\x00\x00\x00\x00\x00\x00" > b"\x06\x00\x70\x17\x00\x00\x00\x0f" > b"\x53\x00\x65\x00\x72\x00\x76\x00" > b"\x65\x00\x72\x00" > ) > test_lmv1_response = b"\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" \ > b"\x00\x00\x00\x00\x00\x00\x00\x00" \ > b"\x00\x00\x00\x00\x00\x00\x00\x00" > > expected_response = b"\x75\x37\xf8\x03\xae\x36\x71\x28" \ > b"\xca\x45\x82\x04\xbd\xe7\xca\xf8" \ > b"\x1e\x97\xed\x26\x83\x26\x72\x32" > expected_exchange_key = b"\xeb\x93\x42\x9a\x8b\xd9\x52\xf8" \ > b"\xb8\x9c\x55\xb8\x7f\x47\x5e\xdc" > expected_target_info = None > > comp_response = ComputeResponse("User", "Password", "Domain", > test_challenge_message, 1) > actual_response, actual_exchange_key, actual_target_info = \ >> comp_response.get_nt_challenge_response(test_lmv1_response, None) > >comp_response = <ntlm_auth.compute_response.ComputeResponse object at 0x7f0ec7f2cd90> >expected_exchange_key = b'\xeb\x93B\x9a\x8b\xd9R\xf8\xb8\x9cU\xb8\x7fG^\xdc' >expected_response = b'u7\xf8\x03\xae6q(\xcaE\x82\x04\xbd\xe7\xca\xf8\x1e\x97\xed&\x83&r2' >expected_target_info = None >monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f0ec7f2ceb0> >self = <tests.test_compute_response.TestChallengeResults object at 0x7f0ec82f9ca0> >test_challenge_message = <ntlm_auth.messages.ChallengeMessage object at 0x7f0ec7f2c2e0> >test_lmv1_response = (b'\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\x00\x00\x00\x00\x00\x00\x00\x00' > b'\x00\x00\x00\x00\x00\x00\x00\x00') > >tests/test_compute_response.py:340: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >ntlm_auth/compute_response.py:139: in get_nt_challenge_response > self._get_NTLM2_response(self._password, > cbt_data = None > lm_challenge_response = (b'\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\x00\x00\x00\x00\x00\x00\x00\x00' > b'\x00\x00\x00\x00\x00\x00\x00\x00') > self = <ntlm_auth.compute_response.ComputeResponse object at 0x7f0ec7f2cd90> > server_certificate_hash = None >ntlm_auth/compute_response.py:326: in _get_NTLM2_response > ntlm_hash = comphash._ntowfv1(password) > client_challenge = b'\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa' > password = 'Password' > server_challenge = b'\x01#Eg\x89\xab\xcd\xef' >ntlm_auth/compute_hash.py:66: in _ntowfv1 > digest = hashlib.new('md4', password.encode('utf-16-le')).digest() > password = 'Password' >/usr/lib/python3.8/hashlib.py:163: in __hash_new > return __get_builtin_constructor(name)(data) > data = b'P\x00a\x00s\x00s\x00w\x00o\x00r\x00d\x00' > kwargs = {} > name = 'md4' >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >name = 'md4' > > def __get_builtin_constructor(name): > cache = __builtin_constructor_cache > constructor = cache.get(name) > if constructor is not None: > return constructor > try: > if name in {'SHA1', 'sha1'}: > import _sha1 > cache['SHA1'] = cache['sha1'] = _sha1.sha1 > elif name in {'MD5', 'md5'}: > import _md5 > cache['MD5'] = cache['md5'] = _md5.md5 > elif name in {'SHA256', 'sha256', 'SHA224', 'sha224'}: > import _sha256 > cache['SHA224'] = cache['sha224'] = _sha256.sha224 > cache['SHA256'] = cache['sha256'] = _sha256.sha256 > elif name in {'SHA512', 'sha512', 'SHA384', 'sha384'}: > import _sha512 > cache['SHA384'] = cache['sha384'] = _sha512.sha384 > cache['SHA512'] = cache['sha512'] = _sha512.sha512 > elif name in {'blake2b', 'blake2s'}: > import _blake2 > cache['blake2b'] = _blake2.blake2b > cache['blake2s'] = _blake2.blake2s > elif name in {'sha3_224', 'sha3_256', 'sha3_384', 'sha3_512'}: > import _sha3 > cache['sha3_224'] = _sha3.sha3_224 > cache['sha3_256'] = _sha3.sha3_256 > cache['sha3_384'] = _sha3.sha3_384 > cache['sha3_512'] = _sha3.sha3_512 > elif name in {'shake_128', 'shake_256'}: > import _sha3 > cache['shake_128'] = _sha3.shake_128 > cache['shake_256'] = _sha3.shake_256 > except ImportError: > pass # no extension module, this hash is unsupported. > > constructor = cache.get(name) > if constructor is not None: > return constructor > >> raise ValueError('unsupported hash type ' + name) >E ValueError: unsupported hash type md4 > >cache = {'blake2b': <class '_blake2.blake2b'>, > 'blake2s': <class '_blake2.blake2s'>, > 'sha3_224': <class '_sha3.sha3_224'>, > 'sha3_256': <class '_sha3.sha3_256'>, > 'sha3_384': <class '_sha3.sha3_384'>, > 'sha3_512': <class '_sha3.sha3_512'>, > 'shake_128': <class '_sha3.shake_128'>, > 'shake_256': <class '_sha3.shake_256'>} >constructor = None >name = 'md4' > >/usr/lib/python3.8/hashlib.py:120: ValueError >___________________ TestChallengeResults.test_nt_v2_response ___________________ > >name = 'md4', data = b'P\x00a\x00s\x00s\x00w\x00o\x00r\x00d\x00', kwargs = {} > > def __hash_new(name, data=b'', **kwargs): > """new(name, data=b'') - Return a new hashing object using the named algorithm; > optionally initialized with data (which must be a bytes-like object). > """ > if name in __block_openssl_constructor: > # Prefer our blake2 and sha3 implementation > # OpenSSL 1.1.0 comes with a limited implementation of blake2b/s. > # It does neither support keyed blake2 nor advanced features like > # salt, personal, tree hashing or SSE. > return __get_builtin_constructor(name)(data, **kwargs) > try: >> return _hashlib.new(name, data) >E ValueError: [digital envelope routines] initialization error > >data = b'P\x00a\x00s\x00s\x00w\x00o\x00r\x00d\x00' >kwargs = {} >name = 'md4' > >/usr/lib/python3.8/hashlib.py:157: ValueError > >During handling of the above exception, another exception occurred: > >self = <tests.test_compute_response.TestChallengeResults object at 0x7f0ec82f9ac0> >monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f0ec7f5c070> > > def test_nt_v2_response(self, monkeypatch): > monkeypatch.setattr('os.urandom', lambda s: b"\xaa" * 8) > monkeypatch.setattr('ntlm_auth.compute_response.get_windows_timestamp', > lambda: b"\x00" * 8) > > test_target_info = TargetInfo() > test_target_info[AvId.MSV_AV_NB_DOMAIN_NAME] = \ > b"\x44\x00\x6f\x00\x6d\x00\x61\x00\x69\x00\x6e\x00" > test_target_info[AvId.MSV_AV_NB_COMPUTER_NAME] = \ > b"\x53\x00\x65\x00\x72\x00\x76\x00\x65\x00\x72\x00" > > test_challenge_message = ChallengeMessage( > b"\x4e\x54\x4c\x4d\x53\x53\x50\x00" > b"\x02\x00\x00\x00\x03\x00\x0c\x00" > b"\x38\x00\x00\x00\x33\x82\x8a\xe2" > b"\x01\x23\x45\x67\x89\xab\xcd\xef" > b"\x00\x00\x00\x00\x00\x00\x00\x00" > b"\x24\x00\x24\x00\x44\x00\x00\x00" > b"\x06\x00\x70\x17\x00\x00\x00\x0f" > b"\x53\x00\x65\x00\x72\x00\x76\x00" > b"\x65\x00\x72\x00\x02\x00\x0c\x00" > b"\x44\x00\x6f\x00\x6d\x00\x61\x00" > b"\x69\x00\x6e\x00\x01\x00\x0c\x00" > b"\x53\x00\x65\x00\x72\x00\x76\x00" > b"\x65\x00\x72\x00\x00\x00\x00\x00" > ) > test_challenge_message.target_info = test_target_info > > test_lmv2_response = b"\x86\xc3\x50\x97\xac\x9c\xec\x10" \ > b"\x25\x54\x76\x4a\x57\xcc\xcc\x19" \ > b"\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" > > expected_response = b"\x68\xcd\x0a\xb8\x51\xe5\x1c\x96" \ > b"\xaa\xbc\x92\x7b\xeb\xef\x6a\x1c" \ > b"\x01\x01\x00\x00\x00\x00\x00\x00" \ > b"\x00\x00\x00\x00\x00\x00\x00\x00" \ > b"\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" \ > b"\x00\x00\x00\x00\x02\x00\x0c\x00" \ > b"\x44\x00\x6f\x00\x6d\x00\x61\x00" \ > b"\x69\x00\x6e\x00\x01\x00\x0c\x00" \ > b"\x53\x00\x65\x00\x72\x00\x76\x00" \ > b"\x65\x00\x72\x00\x00\x00\x00\x00" \ > b"\x00\x00\x00\x00" > expected_exchange_key = b"\x8d\xe4\x0c\xca\xdb\xc1\x4a\x82" \ > b"\xf1\x5c\xb0\xad\x0d\xe9\x5c\xa3" > expected_target_info = test_target_info > > comp_response = ComputeResponse("User", "Password", "Domain", > test_challenge_message, 3) > actual_response, actual_exchange_key, actual_target_info = \ >> comp_response.get_nt_challenge_response(test_lmv2_response, None) > >comp_response = <ntlm_auth.compute_response.ComputeResponse object at 0x7f0ec7f5cdc0> >expected_exchange_key = b'\x8d\xe4\x0c\xca\xdb\xc1J\x82\xf1\\\xb0\xad\r\xe9\\\xa3' >expected_response = (b'h\xcd\n\xb8Q\xe5\x1c\x96\xaa\xbc\x92{\xeb\xefj\x1c\x01\x01\x00\x00' > b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xaa\xaa\xaa\xaa' > b'\xaa\xaa\xaa\xaa\x00\x00\x00\x00\x02\x00\x0c\x00D\x00o\x00m\x00a\x00' > b'i\x00n\x00\x01\x00\x0c\x00S\x00e\x00r\x00v\x00e\x00r\x00\x00\x00\x00\x00' > b'\x00\x00\x00\x00') >expected_target_info = <ntlm_auth.messages.TargetInfo object at 0x7f0ec7f5cbe0> >monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f0ec7f5c070> >self = <tests.test_compute_response.TestChallengeResults object at 0x7f0ec82f9ac0> >test_challenge_message = <ntlm_auth.messages.ChallengeMessage object at 0x7f0ec7f5c940> >test_lmv2_response = (b'\x86\xc3P\x97\xac\x9c\xec\x10%TvJW\xcc\xcc\x19\xaa\xaa\xaa\xaa' > b'\xaa\xaa\xaa\xaa') >test_target_info = <ntlm_auth.messages.TargetInfo object at 0x7f0ec7f5cbe0> > >tests/test_compute_response.py:395: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >ntlm_auth/compute_response.py:197: in get_nt_challenge_response > self._get_NTLMv2_response(self._user_name, self._password, > cbt_data = None > lm_challenge_response = (b'\x86\xc3P\x97\xac\x9c\xec\x10%TvJW\xcc\xcc\x19\xaa\xaa\xaa\xaa' > b'\xaa\xaa\xaa\xaa') > self = <ntlm_auth.compute_response.ComputeResponse object at 0x7f0ec7f5cdc0> > server_certificate_hash = None > target_info = <ntlm_auth.messages.TargetInfo object at 0x7f0ec7f5cbe0> > timestamp = b'\x00\x00\x00\x00\x00\x00\x00\x00' >ntlm_auth/compute_response.py:368: in _get_NTLMv2_response > nt_hash = comphash._ntowfv2(user_name, password, domain_name) > client_challenge = b'\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa' > domain_name = 'Domain' > password = 'Password' > server_challenge = b'\x01#Eg\x89\xab\xcd\xef' > target_info = <ntlm_auth.messages.TargetInfo object at 0x7f0ec7f5cbe0> > timestamp = b'\x00\x00\x00\x00\x00\x00\x00\x00' > user_name = 'User' >ntlm_auth/compute_hash.py:87: in _ntowfv2 > digest = _ntowfv1(password) > domain_name = 'Domain' > password = 'Password' > user_name = 'User' >ntlm_auth/compute_hash.py:66: in _ntowfv1 > digest = hashlib.new('md4', password.encode('utf-16-le')).digest() > password = 'Password' >/usr/lib/python3.8/hashlib.py:163: in __hash_new > return __get_builtin_constructor(name)(data) > data = b'P\x00a\x00s\x00s\x00w\x00o\x00r\x00d\x00' > kwargs = {} > name = 'md4' >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >name = 'md4' > > def __get_builtin_constructor(name): > cache = __builtin_constructor_cache > constructor = cache.get(name) > if constructor is not None: > return constructor > try: > if name in {'SHA1', 'sha1'}: > import _sha1 > cache['SHA1'] = cache['sha1'] = _sha1.sha1 > elif name in {'MD5', 'md5'}: > import _md5 > cache['MD5'] = cache['md5'] = _md5.md5 > elif name in {'SHA256', 'sha256', 'SHA224', 'sha224'}: > import _sha256 > cache['SHA224'] = cache['sha224'] = _sha256.sha224 > cache['SHA256'] = cache['sha256'] = _sha256.sha256 > elif name in {'SHA512', 'sha512', 'SHA384', 'sha384'}: > import _sha512 > cache['SHA384'] = cache['sha384'] = _sha512.sha384 > cache['SHA512'] = cache['sha512'] = _sha512.sha512 > elif name in {'blake2b', 'blake2s'}: > import _blake2 > cache['blake2b'] = _blake2.blake2b > cache['blake2s'] = _blake2.blake2s > elif name in {'sha3_224', 'sha3_256', 'sha3_384', 'sha3_512'}: > import _sha3 > cache['sha3_224'] = _sha3.sha3_224 > cache['sha3_256'] = _sha3.sha3_256 > cache['sha3_384'] = _sha3.sha3_384 > cache['sha3_512'] = _sha3.sha3_512 > elif name in {'shake_128', 'shake_256'}: > import _sha3 > cache['shake_128'] = _sha3.shake_128 > cache['shake_256'] = _sha3.shake_256 > except ImportError: > pass # no extension module, this hash is unsupported. > > constructor = cache.get(name) > if constructor is not None: > return constructor > >> raise ValueError('unsupported hash type ' + name) >E ValueError: unsupported hash type md4 > >cache = {'blake2b': <class '_blake2.blake2b'>, > 'blake2s': <class '_blake2.blake2s'>, > 'sha3_224': <class '_sha3.sha3_224'>, > 'sha3_256': <class '_sha3.sha3_256'>, > 'sha3_384': <class '_sha3.sha3_384'>, > 'sha3_512': <class '_sha3.sha3_512'>, > 'shake_128': <class '_sha3.shake_128'>, > 'shake_256': <class '_sha3.shake_256'>} >constructor = None >name = 'md4' > >/usr/lib/python3.8/hashlib.py:120: ValueError >___________ TestChallengeResults.test_nt_v2_response_no_target_info ____________ > >name = 'md4', data = b'P\x00a\x00s\x00s\x00w\x00o\x00r\x00d\x00', kwargs = {} > > def __hash_new(name, data=b'', **kwargs): > """new(name, data=b'') - Return a new hashing object using the named algorithm; > optionally initialized with data (which must be a bytes-like object). > """ > if name in __block_openssl_constructor: > # Prefer our blake2 and sha3 implementation > # OpenSSL 1.1.0 comes with a limited implementation of blake2b/s. > # It does neither support keyed blake2 nor advanced features like > # salt, personal, tree hashing or SSE. > return __get_builtin_constructor(name)(data, **kwargs) > try: >> return _hashlib.new(name, data) >E ValueError: [digital envelope routines] initialization error > >data = b'P\x00a\x00s\x00s\x00w\x00o\x00r\x00d\x00' >kwargs = {} >name = 'md4' > >/usr/lib/python3.8/hashlib.py:157: ValueError > >During handling of the above exception, another exception occurred: > >self = <tests.test_compute_response.TestChallengeResults object at 0x7f0ec82f9e20> >monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f0ec7f0d850> > > def test_nt_v2_response_no_target_info(self, monkeypatch): > monkeypatch.setattr('os.urandom', lambda s: b"\xaa" * 8) > monkeypatch.setattr('ntlm_auth.compute_response.get_windows_timestamp', > lambda: b"\x00" * 8) > > test_challenge_message = ChallengeMessage( > b"\x4e\x54\x4c\x4d\x53\x53\x50\x00" > b"\x02\x00\x00\x00\x03\x00\x0c\x00" > b"\x38\x00\x00\x00\x33\x82\x8a\xe2" > b"\x01\x23\x45\x67\x89\xab\xcd\xef" > b"\x00\x00\x00\x00\x00\x00\x00\x00" > b"\x24\x00\x24\x00\x44\x00\x00\x00" > b"\x06\x00\x70\x17\x00\x00\x00\x0f" > b"\x53\x00\x65\x00\x72\x00\x76\x00" > b"\x65\x00\x72\x00\x02\x00\x0c\x00" > b"\x44\x00\x6f\x00\x6d\x00\x61\x00" > b"\x69\x00\x6e\x00\x01\x00\x0c\x00" > b"\x53\x00\x65\x00\x72\x00\x76\x00" > b"\x65\x00\x72\x00\x00\x00\x00\x00" > ) > test_challenge_message.target_info = None > > test_lmv2_response = b"\x86\xc3\x50\x97\xac\x9c\xec\x10" \ > b"\x25\x54\x76\x4a\x57\xcc\xcc\x19" \ > b"\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" > > expected_response = b"\x39\x56\xf2\xe5\x69\xd9\xaf\xa3" \ > b"\xac\x2d\x4f\x36\x7d\x38\xb9\xc5" \ > b"\x01\x01\x00\x00\x00\x00\x00\x00" \ > b"\x00\x00\x00\x00\x00\x00\x00\x00" \ > b"\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" \ > b"\x00\x00\x00\x00\x00\x00\x00\x00" \ > b"\x00\x00\x00\x00" > expected_exchange_key = b"\xe3\x35\x1f\x5b\xe0\xa0\x2b\xc2" \ > b"\xee\xb8\x76\x52\xf7\xe0\x77\x75" > expected_target_info = TargetInfo() > > comp_response = ComputeResponse("User", "Password", "Domain", > test_challenge_message, 3) > actual_response, actual_exchange_key, actual_target_info = \ >> comp_response.get_nt_challenge_response(test_lmv2_response, None) > >comp_response = <ntlm_auth.compute_response.ComputeResponse object at 0x7f0ec7f0dbb0> >expected_exchange_key = b'\xe35\x1f[\xe0\xa0+\xc2\xee\xb8vR\xf7\xe0wu' >expected_response = (b'9V\xf2\xe5i\xd9\xaf\xa3\xac-O6}8\xb9\xc5\x01\x01\x00\x00\x00\x00\x00\x00' > b'\x00\x00\x00\x00\x00\x00\x00\x00\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa' > b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00') >expected_target_info = <ntlm_auth.messages.TargetInfo object at 0x7f0ec7f0dc70> >monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f0ec7f0d850> >self = <tests.test_compute_response.TestChallengeResults object at 0x7f0ec82f9e20> >test_challenge_message = <ntlm_auth.messages.ChallengeMessage object at 0x7f0ec7f0d8b0> >test_lmv2_response = (b'\x86\xc3P\x97\xac\x9c\xec\x10%TvJW\xcc\xcc\x19\xaa\xaa\xaa\xaa' > b'\xaa\xaa\xaa\xaa') > >tests/test_compute_response.py:443: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >ntlm_auth/compute_response.py:197: in get_nt_challenge_response > self._get_NTLMv2_response(self._user_name, self._password, > cbt_data = None > lm_challenge_response = (b'\x86\xc3P\x97\xac\x9c\xec\x10%TvJW\xcc\xcc\x19\xaa\xaa\xaa\xaa' > b'\xaa\xaa\xaa\xaa') > self = <ntlm_auth.compute_response.ComputeResponse object at 0x7f0ec7f0dbb0> > server_certificate_hash = None > target_info = <ntlm_auth.messages.TargetInfo object at 0x7f0ec7f0dcd0> > timestamp = b'\x00\x00\x00\x00\x00\x00\x00\x00' >ntlm_auth/compute_response.py:368: in _get_NTLMv2_response > nt_hash = comphash._ntowfv2(user_name, password, domain_name) > client_challenge = b'\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa' > domain_name = 'Domain' > password = 'Password' > server_challenge = b'\x01#Eg\x89\xab\xcd\xef' > target_info = <ntlm_auth.messages.TargetInfo object at 0x7f0ec7f0dcd0> > timestamp = b'\x00\x00\x00\x00\x00\x00\x00\x00' > user_name = 'User' >ntlm_auth/compute_hash.py:87: in _ntowfv2 > digest = _ntowfv1(password) > domain_name = 'Domain' > password = 'Password' > user_name = 'User' >ntlm_auth/compute_hash.py:66: in _ntowfv1 > digest = hashlib.new('md4', password.encode('utf-16-le')).digest() > password = 'Password' >/usr/lib/python3.8/hashlib.py:163: in __hash_new > return __get_builtin_constructor(name)(data) > data = b'P\x00a\x00s\x00s\x00w\x00o\x00r\x00d\x00' > kwargs = {} > name = 'md4' >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >name = 'md4' > > def __get_builtin_constructor(name): > cache = __builtin_constructor_cache > constructor = cache.get(name) > if constructor is not None: > return constructor > try: > if name in {'SHA1', 'sha1'}: > import _sha1 > cache['SHA1'] = cache['sha1'] = _sha1.sha1 > elif name in {'MD5', 'md5'}: > import _md5 > cache['MD5'] = cache['md5'] = _md5.md5 > elif name in {'SHA256', 'sha256', 'SHA224', 'sha224'}: > import _sha256 > cache['SHA224'] = cache['sha224'] = _sha256.sha224 > cache['SHA256'] = cache['sha256'] = _sha256.sha256 > elif name in {'SHA512', 'sha512', 'SHA384', 'sha384'}: > import _sha512 > cache['SHA384'] = cache['sha384'] = _sha512.sha384 > cache['SHA512'] = cache['sha512'] = _sha512.sha512 > elif name in {'blake2b', 'blake2s'}: > import _blake2 > cache['blake2b'] = _blake2.blake2b > cache['blake2s'] = _blake2.blake2s > elif name in {'sha3_224', 'sha3_256', 'sha3_384', 'sha3_512'}: > import _sha3 > cache['sha3_224'] = _sha3.sha3_224 > cache['sha3_256'] = _sha3.sha3_256 > cache['sha3_384'] = _sha3.sha3_384 > cache['sha3_512'] = _sha3.sha3_512 > elif name in {'shake_128', 'shake_256'}: > import _sha3 > cache['shake_128'] = _sha3.shake_128 > cache['shake_256'] = _sha3.shake_256 > except ImportError: > pass # no extension module, this hash is unsupported. > > constructor = cache.get(name) > if constructor is not None: > return constructor > >> raise ValueError('unsupported hash type ' + name) >E ValueError: unsupported hash type md4 > >cache = {'blake2b': <class '_blake2.blake2b'>, > 'blake2s': <class '_blake2.blake2s'>, > 'sha3_224': <class '_sha3.sha3_224'>, > 'sha3_256': <class '_sha3.sha3_256'>, > 'sha3_384': <class '_sha3.sha3_384'>, > 'sha3_512': <class '_sha3.sha3_512'>, > 'shake_128': <class '_sha3.shake_128'>, > 'shake_256': <class '_sha3.shake_256'>} >constructor = None >name = 'md4' > >/usr/lib/python3.8/hashlib.py:120: ValueError >_______ TestChallengeResults.test_nt_v2_response_with_timestamp_av_pair ________ > >name = 'md4', data = b'P\x00a\x00s\x00s\x00w\x00o\x00r\x00d\x00', kwargs = {} > > def __hash_new(name, data=b'', **kwargs): > """new(name, data=b'') - Return a new hashing object using the named algorithm; > optionally initialized with data (which must be a bytes-like object). > """ > if name in __block_openssl_constructor: > # Prefer our blake2 and sha3 implementation > # OpenSSL 1.1.0 comes with a limited implementation of blake2b/s. > # It does neither support keyed blake2 nor advanced features like > # salt, personal, tree hashing or SSE. > return __get_builtin_constructor(name)(data, **kwargs) > try: >> return _hashlib.new(name, data) >E ValueError: [digital envelope routines] initialization error > >data = b'P\x00a\x00s\x00s\x00w\x00o\x00r\x00d\x00' >kwargs = {} >name = 'md4' > >/usr/lib/python3.8/hashlib.py:157: ValueError > >During handling of the above exception, another exception occurred: > >self = <tests.test_compute_response.TestChallengeResults object at 0x7f0ec82f9940> >monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f0ec7f7e250> > > def test_nt_v2_response_with_timestamp_av_pair(self, monkeypatch): > monkeypatch.setattr('os.urandom', lambda s: b"\xaa" * 8) > > test_target_info = TargetInfo() > test_target_info[AvId.MSV_AV_NB_DOMAIN_NAME] = \ > b"\x44\x00\x6f\x00\x6d\x00\x61\x00\x69\x00\x6e\x00" > test_target_info[AvId.MSV_AV_NB_COMPUTER_NAME] = \ > b"\x53\x00\x65\x00\x72\x00\x76\x00\x65\x00\x72\x00" > test_target_info[AvId.MSV_AV_TIMESTAMP] = b"\x00" * 8 > > test_challenge_message = ChallengeMessage( > b"\x4e\x54\x4c\x4d\x53\x53\x50\x00" > b"\x02\x00\x00\x00\x03\x00\x0c\x00" > b"\x38\x00\x00\x00\x33\x82\x8a\xe2" > b"\x01\x23\x45\x67\x89\xab\xcd\xef" > b"\x00\x00\x00\x00\x00\x00\x00\x00" > b"\x24\x00\x24\x00\x44\x00\x00\x00" > b"\x06\x00\x70\x17\x00\x00\x00\x0f" > b"\x53\x00\x65\x00\x72\x00\x76\x00" > b"\x65\x00\x72\x00\x02\x00\x0c\x00" > b"\x44\x00\x6f\x00\x6d\x00\x61\x00" > b"\x69\x00\x6e\x00\x01\x00\x0c\x00" > b"\x53\x00\x65\x00\x72\x00\x76\x00" > b"\x65\x00\x72\x00\x00\x00\x00\x00" > ) > test_challenge_message.target_info = test_target_info > > test_lmv2_response = b"\x86\xc3\x50\x97\xac\x9c\xec\x10" \ > b"\x25\x54\x76\x4a\x57\xcc\xcc\x19" \ > b"\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" > > expected_response = b"\x5d\xeb\xf3\x87\x1c\x28\x94\xb8" \ > b"\x1f\x16\x42\x81\xed\xbf\x0b\xff" \ > b"\x01\x01\x00\x00\x00\x00\x00\x00" \ > b"\x00\x00\x00\x00\x00\x00\x00\x00" \ > b"\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" \ > b"\x00\x00\x00\x00\x02\x00\x0c\x00" \ > b"\x44\x00\x6f\x00\x6d\x00\x61\x00" \ > b"\x69\x00\x6e\x00\x01\x00\x0c\x00" \ > b"\x53\x00\x65\x00\x72\x00\x76\x00" \ > b"\x65\x00\x72\x00\x07\x00\x08\x00" \ > b"\x00\x00\x00\x00\x00\x00\x00\x00" \ > b"\x06\x00\x04\x00\x02\x00\x00\x00" \ > b"\x00\x00\x00\x00\x00\x00\x00\x00" > expected_exchange_key = b"\x9b\x37\x06\x8f\x99\x7a\x06\x5f" \ > b"\xe9\xc7\x20\x63\x32\x88\xd4\x8f" > expected_target_info = test_target_info > expected_target_info[AvId.MSV_AV_FLAGS] = \ > struct.pack("<L", AvFlags.MIC_PROVIDED) > > comp_response = ComputeResponse("User", "Password", "Domain", > test_challenge_message, 3) > actual_response, actual_exchange_key, actual_target_info = \ >> comp_response.get_nt_challenge_response(test_lmv2_response, None) > >comp_response = <ntlm_auth.compute_response.ComputeResponse object at 0x7f0ec7f7ed30> >expected_exchange_key = b'\x9b7\x06\x8f\x99z\x06_\xe9\xc7 c2\x88\xd4\x8f' >expected_response = (b']\xeb\xf3\x87\x1c(\x94\xb8\x1f\x16B\x81\xed\xbf\x0b\xff\x01\x01\x00\x00' > b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xaa\xaa\xaa\xaa' > b'\xaa\xaa\xaa\xaa\x00\x00\x00\x00\x02\x00\x0c\x00D\x00o\x00m\x00a\x00' > b'i\x00n\x00\x01\x00\x0c\x00S\x00e\x00r\x00v\x00e\x00r\x00\x07\x00\x08\x00' > b'\x00\x00\x00\x00\x00\x00\x00\x00\x06\x00\x04\x00\x02\x00\x00\x00' > b'\x00\x00\x00\x00\x00\x00\x00\x00') >expected_target_info = <ntlm_auth.messages.TargetInfo object at 0x7f0ec7f7e310> >monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f0ec7f7e250> >self = <tests.test_compute_response.TestChallengeResults object at 0x7f0ec82f9940> >test_challenge_message = <ntlm_auth.messages.ChallengeMessage object at 0x7f0ec7f7e730> >test_lmv2_response = (b'\x86\xc3P\x97\xac\x9c\xec\x10%TvJW\xcc\xcc\x19\xaa\xaa\xaa\xaa' > b'\xaa\xaa\xaa\xaa') >test_target_info = <ntlm_auth.messages.TargetInfo object at 0x7f0ec7f7e310> > >tests/test_compute_response.py:501: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >ntlm_auth/compute_response.py:197: in get_nt_challenge_response > self._get_NTLMv2_response(self._user_name, self._password, > cbt_data = None > lm_challenge_response = (b'\x86\xc3P\x97\xac\x9c\xec\x10%TvJW\xcc\xcc\x19\xaa\xaa\xaa\xaa' > b'\xaa\xaa\xaa\xaa') > self = <ntlm_auth.compute_response.ComputeResponse object at 0x7f0ec7f7ed30> > server_certificate_hash = None > target_info = <ntlm_auth.messages.TargetInfo object at 0x7f0ec7f7e310> > timestamp = b'\x00\x00\x00\x00\x00\x00\x00\x00' >ntlm_auth/compute_response.py:368: in _get_NTLMv2_response > nt_hash = comphash._ntowfv2(user_name, password, domain_name) > client_challenge = b'\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa' > domain_name = 'Domain' > password = 'Password' > server_challenge = b'\x01#Eg\x89\xab\xcd\xef' > target_info = <ntlm_auth.messages.TargetInfo object at 0x7f0ec7f7e310> > timestamp = b'\x00\x00\x00\x00\x00\x00\x00\x00' > user_name = 'User' >ntlm_auth/compute_hash.py:87: in _ntowfv2 > digest = _ntowfv1(password) > domain_name = 'Domain' > password = 'Password' > user_name = 'User' >ntlm_auth/compute_hash.py:66: in _ntowfv1 > digest = hashlib.new('md4', password.encode('utf-16-le')).digest() > password = 'Password' >/usr/lib/python3.8/hashlib.py:163: in __hash_new > return __get_builtin_constructor(name)(data) > data = b'P\x00a\x00s\x00s\x00w\x00o\x00r\x00d\x00' > kwargs = {} > name = 'md4' >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >name = 'md4' > > def __get_builtin_constructor(name): > cache = __builtin_constructor_cache > constructor = cache.get(name) > if constructor is not None: > return constructor > try: > if name in {'SHA1', 'sha1'}: > import _sha1 > cache['SHA1'] = cache['sha1'] = _sha1.sha1 > elif name in {'MD5', 'md5'}: > import _md5 > cache['MD5'] = cache['md5'] = _md5.md5 > elif name in {'SHA256', 'sha256', 'SHA224', 'sha224'}: > import _sha256 > cache['SHA224'] = cache['sha224'] = _sha256.sha224 > cache['SHA256'] = cache['sha256'] = _sha256.sha256 > elif name in {'SHA512', 'sha512', 'SHA384', 'sha384'}: > import _sha512 > cache['SHA384'] = cache['sha384'] = _sha512.sha384 > cache['SHA512'] = cache['sha512'] = _sha512.sha512 > elif name in {'blake2b', 'blake2s'}: > import _blake2 > cache['blake2b'] = _blake2.blake2b > cache['blake2s'] = _blake2.blake2s > elif name in {'sha3_224', 'sha3_256', 'sha3_384', 'sha3_512'}: > import _sha3 > cache['sha3_224'] = _sha3.sha3_224 > cache['sha3_256'] = _sha3.sha3_256 > cache['sha3_384'] = _sha3.sha3_384 > cache['sha3_512'] = _sha3.sha3_512 > elif name in {'shake_128', 'shake_256'}: > import _sha3 > cache['shake_128'] = _sha3.shake_128 > cache['shake_256'] = _sha3.shake_256 > except ImportError: > pass # no extension module, this hash is unsupported. > > constructor = cache.get(name) > if constructor is not None: > return constructor > >> raise ValueError('unsupported hash type ' + name) >E ValueError: unsupported hash type md4 > >cache = {'blake2b': <class '_blake2.blake2b'>, > 'blake2s': <class '_blake2.blake2s'>, > 'sha3_224': <class '_sha3.sha3_224'>, > 'sha3_256': <class '_sha3.sha3_256'>, > 'sha3_384': <class '_sha3.sha3_384'>, > 'sha3_512': <class '_sha3.sha3_512'>, > 'shake_128': <class '_sha3.shake_128'>, > 'shake_256': <class '_sha3.shake_256'>} >constructor = None >name = 'md4' > >/usr/lib/python3.8/hashlib.py:120: ValueError >______________ TestAuthenticate.test_authenticate_message_ntlm_v1 ______________ > >name = 'md4', data = b'P\x00a\x00s\x00s\x00w\x00o\x00r\x00d\x00', kwargs = {} > > def __hash_new(name, data=b'', **kwargs): > """new(name, data=b'') - Return a new hashing object using the named algorithm; > optionally initialized with data (which must be a bytes-like object). > """ > if name in __block_openssl_constructor: > # Prefer our blake2 and sha3 implementation > # OpenSSL 1.1.0 comes with a limited implementation of blake2b/s. > # It does neither support keyed blake2 nor advanced features like > # salt, personal, tree hashing or SSE. > return __get_builtin_constructor(name)(data, **kwargs) > try: >> return _hashlib.new(name, data) >E ValueError: [digital envelope routines] initialization error > >data = b'P\x00a\x00s\x00s\x00w\x00o\x00r\x00d\x00' >kwargs = {} >name = 'md4' > >/usr/lib/python3.8/hashlib.py:157: ValueError > >During handling of the above exception, another exception occurred: > >self = <tests.test_messages.TestAuthenticate object at 0x7f0ec82dda90> >monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f0ec7f909d0> > > def test_authenticate_message_ntlm_v1(self, monkeypatch): > monkeypatch.setattr('ntlm_auth.messages.get_random_export_session_key', > lambda: b"\x55" * 16) > monkeypatch.setattr('ntlm_auth.messages.get_version', > lambda s: b"\x05\x01\x28\x0A\x00\x00\x00\x0F") > > test_challenge_message = ChallengeMessage( > b"\x4e\x54\x4c\x4d\x53\x53\x50\x00" > b"\x02\x00\x00\x00\x0c\x00\x0c\x00" > b"\x38\x00\x00\x00\x33\x82\x02\xe2" > b"\x01\x23\x45\x67\x89\xab\xcd\xef" > b"\x06\x00\x70\x17\x00\x00\x00\x0f" > b"\x53\x00\x65\x00\x72\x00\x76\x00" > b"\x65\x00\x72\x00" > ) > # Need to override the flags in the challenge message to match the > # expectation, these flags are inconsequential and are done manualy for > # sanity > test_challenge_message.negotiate_flags -= \ > NegotiateFlags.NTLMSSP_TARGET_TYPE_SERVER > test_challenge_message.negotiate_flags |= \ > NegotiateFlags.NTLMSSP_REQUEST_TARGET > test_challenge_message.negotiate_flags |= \ > NegotiateFlags.NTLMSSP_NEGOTIATE_TARGET_INFO > > expected = b"\x4e\x54\x4c\x4d\x53\x53\x50\x00" \ > b"\x03\x00\x00\x00\x18\x00\x18\x00" \ > b"\x6c\x00\x00\x00\x18\x00\x18\x00" \ > b"\x84\x00\x00\x00\x0c\x00\x0c\x00" \ > b"\x48\x00\x00\x00\x08\x00\x08\x00" \ > b"\x54\x00\x00\x00\x10\x00\x10\x00" \ > b"\x5c\x00\x00\x00\x10\x00\x10\x00" \ > b"\x9c\x00\x00\x00\x35\x82\x80\xe2" \ > b"\x05\x01\x28\x0a\x00\x00\x00\x0f" \ > b"\x44\x00\x6f\x00\x6d\x00\x61\x00" \ > b"\x69\x00\x6e\x00\x55\x00\x73\x00" \ > b"\x65\x00\x72\x00\x43\x00\x4f\x00" \ > b"\x4d\x00\x50\x00\x55\x00\x54\x00" \ > b"\x45\x00\x52\x00\x98\xde\xf7\xb8" \ > b"\x7f\x88\xaa\x5d\xaf\xe2\xdf\x77" \ > b"\x96\x88\xa1\x72\xde\xf1\x1c\x7d" \ > b"\x5c\xcd\xef\x13\x67\xc4\x30\x11" \ > b"\xf3\x02\x98\xa2\xad\x35\xec\xe6" \ > b"\x4f\x16\x33\x1c\x44\xbd\xbe\xd9" \ > b"\x27\x84\x1f\x94\x51\x88\x22\xb1" \ > b"\xb3\xf3\x50\xc8\x95\x86\x82\xec" \ > b"\xbb\x3e\x3c\xb7" > >> actual = AuthenticateMessage("User", "Password", "Domain", "COMPUTER", > test_challenge_message, 1, None) > >expected = (b'NTLMSSP\x00\x03\x00\x00\x00\x18\x00\x18\x00l\x00\x00\x00\x18\x00\x18\x00' > b'\x84\x00\x00\x00\x0c\x00\x0c\x00H\x00\x00\x00\x08\x00\x08\x00T\x00\x00\x00' > b'\x10\x00\x10\x00\\\x00\x00\x00\x10\x00\x10\x00\x9c\x00\x00\x005\x82\x80\xe2' > b'\x05\x01(\n\x00\x00\x00\x0fD\x00o\x00m\x00a\x00i\x00n\x00U\x00s\x00' > b'e\x00r\x00C\x00O\x00M\x00P\x00U\x00T\x00E\x00R\x00\x98\xde\xf7\xb8' > b'\x7f\x88\xaa]\xaf\xe2\xdfw\x96\x88\xa1r\xde\xf1\x1c}\\\xcd\xef\x13g\xc40\x11' > b'\xf3\x02\x98\xa2\xad5\xec\xe6O\x163\x1cD\xbd\xbe\xd9\'\x84\x1f\x94Q\x88"\xb1' > b'\xb3\xf3P\xc8\x95\x86\x82\xec\xbb><\xb7') >monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f0ec7f909d0> >self = <tests.test_messages.TestAuthenticate object at 0x7f0ec82dda90> >test_challenge_message = <ntlm_auth.messages.ChallengeMessage object at 0x7f0ec7f90a30> > >tests/test_messages.py:276: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >ntlm_auth/messages.py:350: in __init__ > compute_response.get_nt_challenge_response( > cbt_data = None > challenge_message = <ntlm_auth.messages.ChallengeMessage object at 0x7f0ec7f90a30> > compute_response = <ntlm_auth.compute_response.ComputeResponse object at 0x7f0ec7f90400> > domain_name = 'Domain' > encoding_value = 'utf-16-le' > ntlm_compatibility = 1 > password = 'Password' > self = <ntlm_auth.messages.AuthenticateMessage object at 0x7f0ec7f90730> > server_certificate_hash = None > user_name = 'User' > workstation = 'COMPUTER' >ntlm_auth/compute_response.py:153: in get_nt_challenge_response > self._get_NTLMv1_response(self._password, > cbt_data = None > lm_challenge_response = (b'\x98\xde\xf7\xb8\x7f\x88\xaa]\xaf\xe2\xdfw\x96\x88\xa1r\xde\xf1\x1c}' > b'\\\xcd\xef\x13') > self = <ntlm_auth.compute_response.ComputeResponse object at 0x7f0ec7f90400> > server_certificate_hash = None >ntlm_auth/compute_response.py:297: in _get_NTLMv1_response > ntlm_hash = comphash._ntowfv1(password) > password = 'Password' > server_challenge = b'\x01#Eg\x89\xab\xcd\xef' >ntlm_auth/compute_hash.py:66: in _ntowfv1 > digest = hashlib.new('md4', password.encode('utf-16-le')).digest() > password = 'Password' >/usr/lib/python3.8/hashlib.py:163: in __hash_new > return __get_builtin_constructor(name)(data) > data = b'P\x00a\x00s\x00s\x00w\x00o\x00r\x00d\x00' > kwargs = {} > name = 'md4' >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >name = 'md4' > > def __get_builtin_constructor(name): > cache = __builtin_constructor_cache > constructor = cache.get(name) > if constructor is not None: > return constructor > try: > if name in {'SHA1', 'sha1'}: > import _sha1 > cache['SHA1'] = cache['sha1'] = _sha1.sha1 > elif name in {'MD5', 'md5'}: > import _md5 > cache['MD5'] = cache['md5'] = _md5.md5 > elif name in {'SHA256', 'sha256', 'SHA224', 'sha224'}: > import _sha256 > cache['SHA224'] = cache['sha224'] = _sha256.sha224 > cache['SHA256'] = cache['sha256'] = _sha256.sha256 > elif name in {'SHA512', 'sha512', 'SHA384', 'sha384'}: > import _sha512 > cache['SHA384'] = cache['sha384'] = _sha512.sha384 > cache['SHA512'] = cache['sha512'] = _sha512.sha512 > elif name in {'blake2b', 'blake2s'}: > import _blake2 > cache['blake2b'] = _blake2.blake2b > cache['blake2s'] = _blake2.blake2s > elif name in {'sha3_224', 'sha3_256', 'sha3_384', 'sha3_512'}: > import _sha3 > cache['sha3_224'] = _sha3.sha3_224 > cache['sha3_256'] = _sha3.sha3_256 > cache['sha3_384'] = _sha3.sha3_384 > cache['sha3_512'] = _sha3.sha3_512 > elif name in {'shake_128', 'shake_256'}: > import _sha3 > cache['shake_128'] = _sha3.shake_128 > cache['shake_256'] = _sha3.shake_256 > except ImportError: > pass # no extension module, this hash is unsupported. > > constructor = cache.get(name) > if constructor is not None: > return constructor > >> raise ValueError('unsupported hash type ' + name) >E ValueError: unsupported hash type md4 > >cache = {'blake2b': <class '_blake2.blake2b'>, > 'blake2s': <class '_blake2.blake2s'>, > 'sha3_224': <class '_sha3.sha3_224'>, > 'sha3_256': <class '_sha3.sha3_256'>, > 'sha3_384': <class '_sha3.sha3_384'>, > 'sha3_512': <class '_sha3.sha3_512'>, > 'shake_128': <class '_sha3.shake_128'>, > 'shake_256': <class '_sha3.shake_256'>} >constructor = None >name = 'md4' > >/usr/lib/python3.8/hashlib.py:120: ValueError >________ TestAuthenticate.test_authenticate_without_domain_workstation _________ > >name = 'md4', data = b'P\x00a\x00s\x00s\x00w\x00o\x00r\x00d\x00', kwargs = {} > > def __hash_new(name, data=b'', **kwargs): > """new(name, data=b'') - Return a new hashing object using the named algorithm; > optionally initialized with data (which must be a bytes-like object). > """ > if name in __block_openssl_constructor: > # Prefer our blake2 and sha3 implementation > # OpenSSL 1.1.0 comes with a limited implementation of blake2b/s. > # It does neither support keyed blake2 nor advanced features like > # salt, personal, tree hashing or SSE. > return __get_builtin_constructor(name)(data, **kwargs) > try: >> return _hashlib.new(name, data) >E ValueError: [digital envelope routines] initialization error > >data = b'P\x00a\x00s\x00s\x00w\x00o\x00r\x00d\x00' >kwargs = {} >name = 'md4' > >/usr/lib/python3.8/hashlib.py:157: ValueError > >During handling of the above exception, another exception occurred: > >self = <tests.test_messages.TestAuthenticate object at 0x7f0ec82dd7c0> >monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f0ec7edf490> > > def test_authenticate_without_domain_workstation(self, monkeypatch): > monkeypatch.setattr('ntlm_auth.messages.get_random_export_session_key', > lambda: b"\x55" * 16) > monkeypatch.setattr('ntlm_auth.messages.get_version', > lambda s: b"\x05\x01\x28\x0A\x00\x00\x00\x0F") > > test_challenge_message = ChallengeMessage( > b"\x4e\x54\x4c\x4d\x53\x53\x50\x00" > b"\x02\x00\x00\x00\x0c\x00\x0c\x00" > b"\x38\x00\x00\x00\x33\x82\x02\xe2" > b"\x01\x23\x45\x67\x89\xab\xcd\xef" > b"\x06\x00\x70\x17\x00\x00\x00\x0f" > b"\x53\x00\x65\x00\x72\x00\x76\x00" > b"\x65\x00\x72\x00" > ) > > # Not a Microsoft example, using pre-computed value > expected = b"\x4e\x54\x4c\x4d\x53\x53\x50\x00" \ > b"\x03\x00\x00\x00\x18\x00\x18\x00" \ > b"\x50\x00\x00\x00\x18\x00\x18\x00" \ > b"\x68\x00\x00\x00\x00\x00\x00\x00" \ > b"\x48\x00\x00\x00\x08\x00\x08\x00" \ > b"\x48\x00\x00\x00\x00\x00\x00\x00" \ > b"\x50\x00\x00\x00\x10\x00\x10\x00" \ > b"\x80\x00\x00\x00\x31\x82\x02\xe2" \ > b"\x05\x01\x28\x0a\x00\x00\x00\x0f" \ > b"\x55\x00\x73\x00\x65\x00\x72\x00" \ > b"\x98\xde\xf7\xb8\x7f\x88\xaa\x5d" \ > b"\xaf\xe2\xdf\x77\x96\x88\xa1\x72" \ > b"\xde\xf1\x1c\x7d\x5c\xcd\xef\x13" \ > b"\x67\xc4\x30\x11\xf3\x02\x98\xa2" \ > b"\xad\x35\xec\xe6\x4f\x16\x33\x1c" \ > b"\x44\xbd\xbe\xd9\x27\x84\x1f\x94" \ > b"\x51\x88\x22\xb1\xb3\xf3\x50\xc8" \ > b"\x95\x86\x82\xec\xbb\x3e\x3c\xb7" > >> actual = AuthenticateMessage("User", "Password", None, None, > test_challenge_message, 1, None) > >expected = (b'NTLMSSP\x00\x03\x00\x00\x00\x18\x00\x18\x00P\x00\x00\x00\x18\x00\x18\x00' > b'h\x00\x00\x00\x00\x00\x00\x00H\x00\x00\x00\x08\x00\x08\x00H\x00\x00\x00' > b'\x00\x00\x00\x00P\x00\x00\x00\x10\x00\x10\x00\x80\x00\x00\x001\x82\x02\xe2' > b'\x05\x01(\n\x00\x00\x00\x0fU\x00s\x00e\x00r\x00\x98\xde\xf7\xb8\x7f\x88\xaa]' > b'\xaf\xe2\xdfw\x96\x88\xa1r\xde\xf1\x1c}\\\xcd\xef\x13g\xc40\x11' > b'\xf3\x02\x98\xa2\xad5\xec\xe6O\x163\x1cD\xbd\xbe\xd9\'\x84\x1f\x94Q\x88"\xb1' > b'\xb3\xf3P\xc8\x95\x86\x82\xec\xbb><\xb7') >monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f0ec7edf490> >self = <tests.test_messages.TestAuthenticate object at 0x7f0ec82dd7c0> >test_challenge_message = <ntlm_auth.messages.ChallengeMessage object at 0x7f0ec7edf8e0> > >tests/test_messages.py:318: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >ntlm_auth/messages.py:350: in __init__ > compute_response.get_nt_challenge_response( > cbt_data = None > challenge_message = <ntlm_auth.messages.ChallengeMessage object at 0x7f0ec7edf8e0> > compute_response = <ntlm_auth.compute_response.ComputeResponse object at 0x7f0ec7edfa30> > domain_name = None > encoding_value = 'utf-16-le' > ntlm_compatibility = 1 > password = 'Password' > self = <ntlm_auth.messages.AuthenticateMessage object at 0x7f0ec7edf970> > server_certificate_hash = None > user_name = 'User' > workstation = None >ntlm_auth/compute_response.py:153: in get_nt_challenge_response > self._get_NTLMv1_response(self._password, > cbt_data = None > lm_challenge_response = (b'\x98\xde\xf7\xb8\x7f\x88\xaa]\xaf\xe2\xdfw\x96\x88\xa1r\xde\xf1\x1c}' > b'\\\xcd\xef\x13') > self = <ntlm_auth.compute_response.ComputeResponse object at 0x7f0ec7edfa30> > server_certificate_hash = None >ntlm_auth/compute_response.py:297: in _get_NTLMv1_response > ntlm_hash = comphash._ntowfv1(password) > password = 'Password' > server_challenge = b'\x01#Eg\x89\xab\xcd\xef' >ntlm_auth/compute_hash.py:66: in _ntowfv1 > digest = hashlib.new('md4', password.encode('utf-16-le')).digest() > password = 'Password' >/usr/lib/python3.8/hashlib.py:163: in __hash_new > return __get_builtin_constructor(name)(data) > data = b'P\x00a\x00s\x00s\x00w\x00o\x00r\x00d\x00' > kwargs = {} > name = 'md4' >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >name = 'md4' > > def __get_builtin_constructor(name): > cache = __builtin_constructor_cache > constructor = cache.get(name) > if constructor is not None: > return constructor > try: > if name in {'SHA1', 'sha1'}: > import _sha1 > cache['SHA1'] = cache['sha1'] = _sha1.sha1 > elif name in {'MD5', 'md5'}: > import _md5 > cache['MD5'] = cache['md5'] = _md5.md5 > elif name in {'SHA256', 'sha256', 'SHA224', 'sha224'}: > import _sha256 > cache['SHA224'] = cache['sha224'] = _sha256.sha224 > cache['SHA256'] = cache['sha256'] = _sha256.sha256 > elif name in {'SHA512', 'sha512', 'SHA384', 'sha384'}: > import _sha512 > cache['SHA384'] = cache['sha384'] = _sha512.sha384 > cache['SHA512'] = cache['sha512'] = _sha512.sha512 > elif name in {'blake2b', 'blake2s'}: > import _blake2 > cache['blake2b'] = _blake2.blake2b > cache['blake2s'] = _blake2.blake2s > elif name in {'sha3_224', 'sha3_256', 'sha3_384', 'sha3_512'}: > import _sha3 > cache['sha3_224'] = _sha3.sha3_224 > cache['sha3_256'] = _sha3.sha3_256 > cache['sha3_384'] = _sha3.sha3_384 > cache['sha3_512'] = _sha3.sha3_512 > elif name in {'shake_128', 'shake_256'}: > import _sha3 > cache['shake_128'] = _sha3.shake_128 > cache['shake_256'] = _sha3.shake_256 > except ImportError: > pass # no extension module, this hash is unsupported. > > constructor = cache.get(name) > if constructor is not None: > return constructor > >> raise ValueError('unsupported hash type ' + name) >E ValueError: unsupported hash type md4 > >cache = {'blake2b': <class '_blake2.blake2b'>, > 'blake2s': <class '_blake2.blake2s'>, > 'sha3_224': <class '_sha3.sha3_224'>, > 'sha3_256': <class '_sha3.sha3_256'>, > 'sha3_384': <class '_sha3.sha3_384'>, > 'sha3_512': <class '_sha3.sha3_512'>, > 'shake_128': <class '_sha3.shake_128'>, > 'shake_256': <class '_sha3.shake_256'>} >constructor = None >name = 'md4' > >/usr/lib/python3.8/hashlib.py:120: ValueError >________ TestAuthenticate.test_authenticate_message_ntlm_v1_non_unicode ________ > >name = 'md4', data = b'P\x00a\x00s\x00s\x00w\x00o\x00r\x00d\x00', kwargs = {} > > def __hash_new(name, data=b'', **kwargs): > """new(name, data=b'') - Return a new hashing object using the named algorithm; > optionally initialized with data (which must be a bytes-like object). > """ > if name in __block_openssl_constructor: > # Prefer our blake2 and sha3 implementation > # OpenSSL 1.1.0 comes with a limited implementation of blake2b/s. > # It does neither support keyed blake2 nor advanced features like > # salt, personal, tree hashing or SSE. > return __get_builtin_constructor(name)(data, **kwargs) > try: >> return _hashlib.new(name, data) >E ValueError: [digital envelope routines] initialization error > >data = b'P\x00a\x00s\x00s\x00w\x00o\x00r\x00d\x00' >kwargs = {} >name = 'md4' > >/usr/lib/python3.8/hashlib.py:157: ValueError > >During handling of the above exception, another exception occurred: > >self = <tests.test_messages.TestAuthenticate object at 0x7f0ec834b040> >monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f0ec7e24b20> > > def test_authenticate_message_ntlm_v1_non_unicode(self, monkeypatch): > monkeypatch.setattr('ntlm_auth.messages.get_random_export_session_key', > lambda: b"\x55" * 16) > monkeypatch.setattr('ntlm_auth.messages.get_version', > lambda s: b"\x05\x01\x28\x0A\x00\x00\x00\x0F") > > test_challenge_message = ChallengeMessage( > b"\x4e\x54\x4c\x4d\x53\x53\x50\x00" > b"\x02\x00\x00\x00\x0c\x00\x0c\x00" > b"\x38\x00\x00\x00\x33\x82\x02\xe2" > b"\x01\x23\x45\x67\x89\xab\xcd\xef" > b"\x06\x00\x70\x17\x00\x00\x00\x0f" > b"\x53\x00\x65\x00\x72\x00\x76\x00" > b"\x65\x00\x72\x00" > ) > test_challenge_message.negotiate_flags -= \ > NegotiateFlags.NTLMSSP_NEGOTIATE_UNICODE > test_challenge_message.negotiate_flags |= \ > NegotiateFlags.NTLMSSP_NEGOTIATE_OEM > > # Not a Microsoft example, using pre-computed value > expected = b"\x4e\x54\x4c\x4d\x53\x53\x50\x00" \ > b"\x03\x00\x00\x00\x18\x00\x18\x00" \ > b"\x5a\x00\x00\x00\x18\x00\x18\x00" \ > b"\x72\x00\x00\x00\x06\x00\x06\x00" \ > b"\x48\x00\x00\x00\x04\x00\x04\x00" \ > b"\x4e\x00\x00\x00\x08\x00\x08\x00" \ > b"\x52\x00\x00\x00\x10\x00\x10\x00" \ > b"\x8a\x00\x00\x00\x32\x82\x02\xe2" \ > b"\x05\x01\x28\x0a\x00\x00\x00\x0f" \ > b"\x44\x6f\x6d\x61\x69\x6e\x55\x73" \ > b"\x65\x72\x43\x4f\x4d\x50\x55\x54" \ > b"\x45\x52\x98\xde\xf7\xb8\x7f\x88" \ > b"\xaa\x5d\xaf\xe2\xdf\x77\x96\x88" \ > b"\xa1\x72\xde\xf1\x1c\x7d\x5c\xcd" \ > b"\xef\x13\x67\xc4\x30\x11\xf3\x02" \ > b"\x98\xa2\xad\x35\xec\xe6\x4f\x16" \ > b"\x33\x1c\x44\xbd\xbe\xd9\x27\x84" \ > b"\x1f\x94\x51\x88\x22\xb1\xb3\xf3" \ > b"\x50\xc8\x95\x86\x82\xec\xbb\x3e" \ > b"\x3c\xb7" >> actual = AuthenticateMessage("User", "Password", "Domain", "COMPUTER", > test_challenge_message, 1, None) > >expected = (b'NTLMSSP\x00\x03\x00\x00\x00\x18\x00\x18\x00Z\x00\x00\x00\x18\x00\x18\x00' > b'r\x00\x00\x00\x06\x00\x06\x00H\x00\x00\x00\x04\x00\x04\x00N\x00\x00\x00' > b'\x08\x00\x08\x00R\x00\x00\x00\x10\x00\x10\x00\x8a\x00\x00\x002\x82\x02\xe2' > b'\x05\x01(\n\x00\x00\x00\x0fDomainUserCOMPUTER\x98\xde\xf7\xb8\x7f\x88' > b'\xaa]\xaf\xe2\xdfw\x96\x88\xa1r\xde\xf1\x1c}\\\xcd\xef\x13g\xc40\x11\xf3\x02' > b'\x98\xa2\xad5\xec\xe6O\x163\x1cD\xbd\xbe\xd9\'\x84\x1f\x94Q\x88"\xb1\xb3\xf3' > b'P\xc8\x95\x86\x82\xec\xbb><\xb7') >monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f0ec7e24b20> >self = <tests.test_messages.TestAuthenticate object at 0x7f0ec834b040> >test_challenge_message = <ntlm_auth.messages.ChallengeMessage object at 0x7f0ec7e249a0> > >tests/test_messages.py:365: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >ntlm_auth/messages.py:350: in __init__ > compute_response.get_nt_challenge_response( > cbt_data = None > challenge_message = <ntlm_auth.messages.ChallengeMessage object at 0x7f0ec7e249a0> > compute_response = <ntlm_auth.compute_response.ComputeResponse object at 0x7f0ec7e24e20> > domain_name = 'Domain' > encoding_value = 'ascii' > ntlm_compatibility = 1 > password = 'Password' > self = <ntlm_auth.messages.AuthenticateMessage object at 0x7f0ec7e24d90> > server_certificate_hash = None > user_name = 'User' > workstation = 'COMPUTER' >ntlm_auth/compute_response.py:153: in get_nt_challenge_response > self._get_NTLMv1_response(self._password, > cbt_data = None > lm_challenge_response = (b'\x98\xde\xf7\xb8\x7f\x88\xaa]\xaf\xe2\xdfw\x96\x88\xa1r\xde\xf1\x1c}' > b'\\\xcd\xef\x13') > self = <ntlm_auth.compute_response.ComputeResponse object at 0x7f0ec7e24e20> > server_certificate_hash = None >ntlm_auth/compute_response.py:297: in _get_NTLMv1_response > ntlm_hash = comphash._ntowfv1(password) > password = 'Password' > server_challenge = b'\x01#Eg\x89\xab\xcd\xef' >ntlm_auth/compute_hash.py:66: in _ntowfv1 > digest = hashlib.new('md4', password.encode('utf-16-le')).digest() > password = 'Password' >/usr/lib/python3.8/hashlib.py:163: in __hash_new > return __get_builtin_constructor(name)(data) > data = b'P\x00a\x00s\x00s\x00w\x00o\x00r\x00d\x00' > kwargs = {} > name = 'md4' >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >name = 'md4' > > def __get_builtin_constructor(name): > cache = __builtin_constructor_cache > constructor = cache.get(name) > if constructor is not None: > return constructor > try: > if name in {'SHA1', 'sha1'}: > import _sha1 > cache['SHA1'] = cache['sha1'] = _sha1.sha1 > elif name in {'MD5', 'md5'}: > import _md5 > cache['MD5'] = cache['md5'] = _md5.md5 > elif name in {'SHA256', 'sha256', 'SHA224', 'sha224'}: > import _sha256 > cache['SHA224'] = cache['sha224'] = _sha256.sha224 > cache['SHA256'] = cache['sha256'] = _sha256.sha256 > elif name in {'SHA512', 'sha512', 'SHA384', 'sha384'}: > import _sha512 > cache['SHA384'] = cache['sha384'] = _sha512.sha384 > cache['SHA512'] = cache['sha512'] = _sha512.sha512 > elif name in {'blake2b', 'blake2s'}: > import _blake2 > cache['blake2b'] = _blake2.blake2b > cache['blake2s'] = _blake2.blake2s > elif name in {'sha3_224', 'sha3_256', 'sha3_384', 'sha3_512'}: > import _sha3 > cache['sha3_224'] = _sha3.sha3_224 > cache['sha3_256'] = _sha3.sha3_256 > cache['sha3_384'] = _sha3.sha3_384 > cache['sha3_512'] = _sha3.sha3_512 > elif name in {'shake_128', 'shake_256'}: > import _sha3 > cache['shake_128'] = _sha3.shake_128 > cache['shake_256'] = _sha3.shake_256 > except ImportError: > pass # no extension module, this hash is unsupported. > > constructor = cache.get(name) > if constructor is not None: > return constructor > >> raise ValueError('unsupported hash type ' + name) >E ValueError: unsupported hash type md4 > >cache = {'blake2b': <class '_blake2.blake2b'>, > 'blake2s': <class '_blake2.blake2s'>, > 'sha3_224': <class '_sha3.sha3_224'>, > 'sha3_256': <class '_sha3.sha3_256'>, > 'sha3_384': <class '_sha3.sha3_384'>, > 'sha3_512': <class '_sha3.sha3_512'>, > 'shake_128': <class '_sha3.shake_128'>, > 'shake_256': <class '_sha3.shake_256'>} >constructor = None >name = 'md4' > >/usr/lib/python3.8/hashlib.py:120: ValueError >_________ TestAuthenticate.test_authenticate_message_ntlm_v1_with_ess __________ > >name = 'md4', data = b'P\x00a\x00s\x00s\x00w\x00o\x00r\x00d\x00', kwargs = {} > > def __hash_new(name, data=b'', **kwargs): > """new(name, data=b'') - Return a new hashing object using the named algorithm; > optionally initialized with data (which must be a bytes-like object). > """ > if name in __block_openssl_constructor: > # Prefer our blake2 and sha3 implementation > # OpenSSL 1.1.0 comes with a limited implementation of blake2b/s. > # It does neither support keyed blake2 nor advanced features like > # salt, personal, tree hashing or SSE. > return __get_builtin_constructor(name)(data, **kwargs) > try: >> return _hashlib.new(name, data) >E ValueError: [digital envelope routines] initialization error > >data = b'P\x00a\x00s\x00s\x00w\x00o\x00r\x00d\x00' >kwargs = {} >name = 'md4' > >/usr/lib/python3.8/hashlib.py:157: ValueError > >During handling of the above exception, another exception occurred: > >self = <tests.test_messages.TestAuthenticate object at 0x7f0ec834b370> >monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f0ec7e38d90> > > def test_authenticate_message_ntlm_v1_with_ess(self, monkeypatch): > monkeypatch.setattr('os.urandom', lambda s: b"\xaa" * 8) > monkeypatch.setattr('ntlm_auth.messages.get_version', > lambda s: b"\x05\x01\x28\x0A\x00\x00\x00\x0F") > > test_challenge_message = ChallengeMessage( > b"\x4e\x54\x4c\x4d\x53\x53\x50\x00" > b"\x02\x00\x00\x00\x0c\x00\x0c\x00" > b"\x38\x00\x00\x00\x33\x82\x0a\x82" > b"\x01\x23\x45\x67\x89\xab\xcd\xef" > b"\x00\x00\x00\x00\x00\x00\x00\x00" > b"\x00\x00\x00\x00\x00\x00\x00\x00" > b"\x06\x00\x70\x17\x00\x00\x00\x0f" > b"\x53\x00\x65\x00\x72\x00\x76\x00" > b"\x65\x00\x72\x00" > ) > # Need to override the flags in the challenge message to match the > # expectation, these flags are inconsequential and are done manualy > # for sanity > test_challenge_message.negotiate_flags -= \ > NegotiateFlags.NTLMSSP_TARGET_TYPE_SERVER > test_challenge_message.negotiate_flags |= \ > NegotiateFlags.NTLMSSP_REQUEST_TARGET > > expected = b"\x4e\x54\x4c\x4d\x53\x53\x50\x00" \ > b"\x03\x00\x00\x00\x18\x00\x18\x00" \ > b"\x6c\x00\x00\x00\x18\x00\x18\x00" \ > b"\x84\x00\x00\x00\x0c\x00\x0c\x00" \ > b"\x48\x00\x00\x00\x08\x00\x08\x00" \ > b"\x54\x00\x00\x00\x10\x00\x10\x00" \ > b"\x5c\x00\x00\x00\x00\x00\x00\x00" \ > b"\x9c\x00\x00\x00\x35\x82\x08\x82" \ > b"\x05\x01\x28\x0a\x00\x00\x00\x0f" \ > b"\x44\x00\x6f\x00\x6d\x00\x61\x00" \ > b"\x69\x00\x6e\x00\x55\x00\x73\x00" \ > b"\x65\x00\x72\x00\x43\x00\x4f\x00" \ > b"\x4d\x00\x50\x00\x55\x00\x54\x00" \ > b"\x45\x00\x52\x00\xaa\xaa\xaa\xaa" \ > b"\xaa\xaa\xaa\xaa\x00\x00\x00\x00" \ > b"\x00\x00\x00\x00\x00\x00\x00\x00" \ > b"\x00\x00\x00\x00\x75\x37\xf8\x03" \ > b"\xae\x36\x71\x28\xca\x45\x82\x04" \ > b"\xbd\xe7\xca\xf8\x1e\x97\xed\x26" \ > b"\x83\x26\x72\x32" > >> actual = AuthenticateMessage("User", "Password", "Domain", "COMPUTER", > test_challenge_message, 1, None) > >expected = (b'NTLMSSP\x00\x03\x00\x00\x00\x18\x00\x18\x00l\x00\x00\x00\x18\x00\x18\x00' > b'\x84\x00\x00\x00\x0c\x00\x0c\x00H\x00\x00\x00\x08\x00\x08\x00T\x00\x00\x00' > b'\x10\x00\x10\x00\\\x00\x00\x00\x00\x00\x00\x00\x9c\x00\x00\x005\x82\x08\x82' > b'\x05\x01(\n\x00\x00\x00\x0fD\x00o\x00m\x00a\x00i\x00n\x00U\x00s\x00' > b'e\x00r\x00C\x00O\x00M\x00P\x00U\x00T\x00E\x00R\x00\xaa\xaa\xaa\xaa' > b'\xaa\xaa\xaa\xaa\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' > b'\x00\x00\x00\x00u7\xf8\x03\xae6q(\xcaE\x82\x04\xbd\xe7\xca\xf8\x1e\x97\xed&' > b'\x83&r2') >monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f0ec7e38d90> >self = <tests.test_messages.TestAuthenticate object at 0x7f0ec834b370> >test_challenge_message = <ntlm_auth.messages.ChallengeMessage object at 0x7f0ec7e38880> > >tests/test_messages.py:416: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >ntlm_auth/messages.py:350: in __init__ > compute_response.get_nt_challenge_response( > cbt_data = None > challenge_message = <ntlm_auth.messages.ChallengeMessage object at 0x7f0ec7e38880> > compute_response = <ntlm_auth.compute_response.ComputeResponse object at 0x7f0ec7e386d0> > domain_name = 'Domain' > encoding_value = 'utf-16-le' > ntlm_compatibility = 1 > password = 'Password' > self = <ntlm_auth.messages.AuthenticateMessage object at 0x7f0ec7e38f70> > server_certificate_hash = None > user_name = 'User' > workstation = 'COMPUTER' >ntlm_auth/compute_response.py:139: in get_nt_challenge_response > self._get_NTLM2_response(self._password, > cbt_data = None > lm_challenge_response = (b'\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\x00\x00\x00\x00\x00\x00\x00\x00' > b'\x00\x00\x00\x00\x00\x00\x00\x00') > self = <ntlm_auth.compute_response.ComputeResponse object at 0x7f0ec7e386d0> > server_certificate_hash = None >ntlm_auth/compute_response.py:326: in _get_NTLM2_response > ntlm_hash = comphash._ntowfv1(password) > client_challenge = b'\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa' > password = 'Password' > server_challenge = b'\x01#Eg\x89\xab\xcd\xef' >ntlm_auth/compute_hash.py:66: in _ntowfv1 > digest = hashlib.new('md4', password.encode('utf-16-le')).digest() > password = 'Password' >/usr/lib/python3.8/hashlib.py:163: in __hash_new > return __get_builtin_constructor(name)(data) > data = b'P\x00a\x00s\x00s\x00w\x00o\x00r\x00d\x00' > kwargs = {} > name = 'md4' >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >name = 'md4' > > def __get_builtin_constructor(name): > cache = __builtin_constructor_cache > constructor = cache.get(name) > if constructor is not None: > return constructor > try: > if name in {'SHA1', 'sha1'}: > import _sha1 > cache['SHA1'] = cache['sha1'] = _sha1.sha1 > elif name in {'MD5', 'md5'}: > import _md5 > cache['MD5'] = cache['md5'] = _md5.md5 > elif name in {'SHA256', 'sha256', 'SHA224', 'sha224'}: > import _sha256 > cache['SHA224'] = cache['sha224'] = _sha256.sha224 > cache['SHA256'] = cache['sha256'] = _sha256.sha256 > elif name in {'SHA512', 'sha512', 'SHA384', 'sha384'}: > import _sha512 > cache['SHA384'] = cache['sha384'] = _sha512.sha384 > cache['SHA512'] = cache['sha512'] = _sha512.sha512 > elif name in {'blake2b', 'blake2s'}: > import _blake2 > cache['blake2b'] = _blake2.blake2b > cache['blake2s'] = _blake2.blake2s > elif name in {'sha3_224', 'sha3_256', 'sha3_384', 'sha3_512'}: > import _sha3 > cache['sha3_224'] = _sha3.sha3_224 > cache['sha3_256'] = _sha3.sha3_256 > cache['sha3_384'] = _sha3.sha3_384 > cache['sha3_512'] = _sha3.sha3_512 > elif name in {'shake_128', 'shake_256'}: > import _sha3 > cache['shake_128'] = _sha3.shake_128 > cache['shake_256'] = _sha3.shake_256 > except ImportError: > pass # no extension module, this hash is unsupported. > > constructor = cache.get(name) > if constructor is not None: > return constructor > >> raise ValueError('unsupported hash type ' + name) >E ValueError: unsupported hash type md4 > >cache = {'blake2b': <class '_blake2.blake2b'>, > 'blake2s': <class '_blake2.blake2s'>, > 'sha3_224': <class '_sha3.sha3_224'>, > 'sha3_256': <class '_sha3.sha3_256'>, > 'sha3_384': <class '_sha3.sha3_384'>, > 'sha3_512': <class '_sha3.sha3_512'>, > 'shake_128': <class '_sha3.shake_128'>, > 'shake_256': <class '_sha3.shake_256'>} >constructor = None >name = 'md4' > >/usr/lib/python3.8/hashlib.py:120: ValueError >______________ TestAuthenticate.test_authenticate_message_ntlm_v2 ______________ > >name = 'md4', data = b'P\x00a\x00s\x00s\x00w\x00o\x00r\x00d\x00', kwargs = {} > > def __hash_new(name, data=b'', **kwargs): > """new(name, data=b'') - Return a new hashing object using the named algorithm; > optionally initialized with data (which must be a bytes-like object). > """ > if name in __block_openssl_constructor: > # Prefer our blake2 and sha3 implementation > # OpenSSL 1.1.0 comes with a limited implementation of blake2b/s. > # It does neither support keyed blake2 nor advanced features like > # salt, personal, tree hashing or SSE. > return __get_builtin_constructor(name)(data, **kwargs) > try: >> return _hashlib.new(name, data) >E ValueError: [digital envelope routines] initialization error > >data = b'P\x00a\x00s\x00s\x00w\x00o\x00r\x00d\x00' >kwargs = {} >name = 'md4' > >/usr/lib/python3.8/hashlib.py:157: ValueError > >During handling of the above exception, another exception occurred: > >self = <tests.test_messages.TestAuthenticate object at 0x7f0ec834b400> >monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f0ec7f0dbe0> > > def test_authenticate_message_ntlm_v2(self, monkeypatch): > monkeypatch.setattr('os.urandom', lambda s: b"\xaa" * 8) > monkeypatch.setattr('ntlm_auth.messages.get_version', > lambda s: b"\x05\x01\x28\x0A\x00\x00\x00\x0F") > monkeypatch.setattr('ntlm_auth.messages.get_random_export_session_key', > lambda: b"\x55" * 16) > monkeypatch.setattr('ntlm_auth.compute_response.get_windows_timestamp', > lambda: b"\x00" * 8) > > test_challenge_message = ChallengeMessage( > b"\x4e\x54\x4c\x4d\x53\x53\x50\x00" > b"\x02\x00\x00\x00\x03\x00\x0c\x00" > b"\x38\x00\x00\x00\x33\x82\x8a\xe2" > b"\x01\x23\x45\x67\x89\xab\xcd\xef" > b"\x00\x00\x00\x00\x00\x00\x00\x00" > b"\x24\x00\x24\x00\x44\x00\x00\x00" > b"\x06\x00\x70\x17\x00\x00\x00\x0f" > b"\x53\x00\x65\x00\x72\x00\x76\x00" > b"\x65\x00\x72\x00\x02\x00\x0c\x00" > b"\x44\x00\x6f\x00\x6d\x00\x61\x00" > b"\x69\x00\x6e\x00\x01\x00\x0c\x00" > b"\x53\x00\x65\x00\x72\x00\x76\x00" > b"\x65\x00\x72\x00\x00\x00\x00\x00" > ) > > # Need to override the flags in the challenge message to match the > # expectation, these flags are inconsequential and are done manualy for > # sanity > test_challenge_message.negotiate_flags -= \ > NegotiateFlags.NTLMSSP_TARGET_TYPE_SERVER > test_challenge_message.negotiate_flags |= \ > NegotiateFlags.NTLMSSP_REQUEST_TARGET > > expected = b"\x4e\x54\x4c\x4d\x53\x53\x50\x00" \ > b"\x03\x00\x00\x00\x18\x00\x18\x00" \ > b"\x6c\x00\x00\x00\x54\x00\x54\x00" \ > b"\x84\x00\x00\x00\x0c\x00\x0c\x00" \ > b"\x48\x00\x00\x00\x08\x00\x08\x00" \ > b"\x54\x00\x00\x00\x10\x00\x10\x00" \ > b"\x5c\x00\x00\x00\x10\x00\x10\x00" \ > b"\xd8\x00\x00\x00\x35\x82\x88\xe2" \ > b"\x05\x01\x28\x0a\x00\x00\x00\x0f" \ > b"\x44\x00\x6f\x00\x6d\x00\x61\x00" \ > b"\x69\x00\x6e\x00\x55\x00\x73\x00" \ > b"\x65\x00\x72\x00\x43\x00\x4f\x00" \ > b"\x4d\x00\x50\x00\x55\x00\x54\x00" \ > b"\x45\x00\x52\x00\x86\xc3\x50\x97" \ > b"\xac\x9c\xec\x10\x25\x54\x76\x4a" \ > b"\x57\xcc\xcc\x19\xaa\xaa\xaa\xaa" \ > b"\xaa\xaa\xaa\xaa\x68\xcd\x0a\xb8" \ > b"\x51\xe5\x1c\x96\xaa\xbc\x92\x7b" \ > b"\xeb\xef\x6a\x1c\x01\x01\x00\x00" \ > b"\x00\x00\x00\x00\x00\x00\x00\x00" \ > b"\x00\x00\x00\x00\xaa\xaa\xaa\xaa" \ > b"\xaa\xaa\xaa\xaa\x00\x00\x00\x00" \ > b"\x02\x00\x0c\x00\x44\x00\x6f\x00" \ > b"\x6d\x00\x61\x00\x69\x00\x6e\x00" \ > b"\x01\x00\x0c\x00\x53\x00\x65\x00" \ > b"\x72\x00\x76\x00\x65\x00\x72\x00" \ > b"\x00\x00\x00\x00\x00\x00\x00\x00" \ > b"\xc5\xda\xd2\x54\x4f\xc9\x79\x90" \ > b"\x94\xce\x1c\xe9\x0b\xc9\xd0\x3e" > >> actual = AuthenticateMessage("User", "Password", "Domain", "COMPUTER", > test_challenge_message, 3, None) > >expected = (b'NTLMSSP\x00\x03\x00\x00\x00\x18\x00\x18\x00l\x00\x00\x00T\x00T\x00' > b'\x84\x00\x00\x00\x0c\x00\x0c\x00H\x00\x00\x00\x08\x00\x08\x00T\x00\x00\x00' > b'\x10\x00\x10\x00\\\x00\x00\x00\x10\x00\x10\x00\xd8\x00\x00\x005\x82\x88\xe2' > b'\x05\x01(\n\x00\x00\x00\x0fD\x00o\x00m\x00a\x00i\x00n\x00U\x00s\x00' > b'e\x00r\x00C\x00O\x00M\x00P\x00U\x00T\x00E\x00R\x00\x86\xc3P\x97' > b'\xac\x9c\xec\x10%TvJW\xcc\xcc\x19\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaah\xcd\n\xb8' > b'Q\xe5\x1c\x96\xaa\xbc\x92{\xeb\xefj\x1c\x01\x01\x00\x00\x00\x00\x00\x00' > b'\x00\x00\x00\x00\x00\x00\x00\x00\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa' > b'\x00\x00\x00\x00\x02\x00\x0c\x00D\x00o\x00m\x00a\x00i\x00n\x00' > b'\x01\x00\x0c\x00S\x00e\x00r\x00v\x00e\x00r\x00\x00\x00\x00\x00' > b'\x00\x00\x00\x00\xc5\xda\xd2TO\xc9y\x90\x94\xce\x1c\xe9\x0b\xc9\xd0>') >monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f0ec7f0dbe0> >self = <tests.test_messages.TestAuthenticate object at 0x7f0ec834b400> >test_challenge_message = <ntlm_auth.messages.ChallengeMessage object at 0x7f0ec7f0da00> > >tests/test_messages.py:485: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >ntlm_auth/messages.py:348: in __init__ > compute_response.get_lm_challenge_response() > cbt_data = None > challenge_message = <ntlm_auth.messages.ChallengeMessage object at 0x7f0ec7f0da00> > compute_response = <ntlm_auth.compute_response.ComputeResponse object at 0x7f0ec7f0db50> > domain_name = 'Domain' > encoding_value = 'utf-16-le' > ntlm_compatibility = 3 > password = 'Password' > self = <ntlm_auth.messages.AuthenticateMessage object at 0x7f0ec7f0de20> > server_certificate_hash = None > user_name = 'User' > workstation = 'COMPUTER' >ntlm_auth/compute_response.py:91: in get_lm_challenge_response > response = self._get_LMv2_response(self._user_name, self._password, > self = <ntlm_auth.compute_response.ComputeResponse object at 0x7f0ec7f0db50> >ntlm_auth/compute_response.py:272: in _get_LMv2_response > nt_hash = comphash._ntowfv2(user_name, password, domain_name) > client_challenge = b'\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa' > domain_name = 'Domain' > password = 'Password' > server_challenge = b'\x01#Eg\x89\xab\xcd\xef' > user_name = 'User' >ntlm_auth/compute_hash.py:87: in _ntowfv2 > digest = _ntowfv1(password) > domain_name = 'Domain' > password = 'Password' > user_name = 'User' >ntlm_auth/compute_hash.py:66: in _ntowfv1 > digest = hashlib.new('md4', password.encode('utf-16-le')).digest() > password = 'Password' >/usr/lib/python3.8/hashlib.py:163: in __hash_new > return __get_builtin_constructor(name)(data) > data = b'P\x00a\x00s\x00s\x00w\x00o\x00r\x00d\x00' > kwargs = {} > name = 'md4' >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >name = 'md4' > > def __get_builtin_constructor(name): > cache = __builtin_constructor_cache > constructor = cache.get(name) > if constructor is not None: > return constructor > try: > if name in {'SHA1', 'sha1'}: > import _sha1 > cache['SHA1'] = cache['sha1'] = _sha1.sha1 > elif name in {'MD5', 'md5'}: > import _md5 > cache['MD5'] = cache['md5'] = _md5.md5 > elif name in {'SHA256', 'sha256', 'SHA224', 'sha224'}: > import _sha256 > cache['SHA224'] = cache['sha224'] = _sha256.sha224 > cache['SHA256'] = cache['sha256'] = _sha256.sha256 > elif name in {'SHA512', 'sha512', 'SHA384', 'sha384'}: > import _sha512 > cache['SHA384'] = cache['sha384'] = _sha512.sha384 > cache['SHA512'] = cache['sha512'] = _sha512.sha512 > elif name in {'blake2b', 'blake2s'}: > import _blake2 > cache['blake2b'] = _blake2.blake2b > cache['blake2s'] = _blake2.blake2s > elif name in {'sha3_224', 'sha3_256', 'sha3_384', 'sha3_512'}: > import _sha3 > cache['sha3_224'] = _sha3.sha3_224 > cache['sha3_256'] = _sha3.sha3_256 > cache['sha3_384'] = _sha3.sha3_384 > cache['sha3_512'] = _sha3.sha3_512 > elif name in {'shake_128', 'shake_256'}: > import _sha3 > cache['shake_128'] = _sha3.shake_128 > cache['shake_256'] = _sha3.shake_256 > except ImportError: > pass # no extension module, this hash is unsupported. > > constructor = cache.get(name) > if constructor is not None: > return constructor > >> raise ValueError('unsupported hash type ' + name) >E ValueError: unsupported hash type md4 > >cache = {'blake2b': <class '_blake2.blake2b'>, > 'blake2s': <class '_blake2.blake2s'>, > 'sha3_224': <class '_sha3.sha3_224'>, > 'sha3_256': <class '_sha3.sha3_256'>, > 'sha3_384': <class '_sha3.sha3_384'>, > 'sha3_512': <class '_sha3.sha3_512'>, > 'shake_128': <class '_sha3.shake_128'>, > 'shake_256': <class '_sha3.shake_256'>} >constructor = None >name = 'md4' > >/usr/lib/python3.8/hashlib.py:120: ValueError >_____________ TestAuthenticate.test_authenticate_message_with_cbt ______________ > >name = 'md4', data = b'P\x00a\x00s\x00s\x00w\x00o\x00r\x00d\x00', kwargs = {} > > def __hash_new(name, data=b'', **kwargs): > """new(name, data=b'') - Return a new hashing object using the named algorithm; > optionally initialized with data (which must be a bytes-like object). > """ > if name in __block_openssl_constructor: > # Prefer our blake2 and sha3 implementation > # OpenSSL 1.1.0 comes with a limited implementation of blake2b/s. > # It does neither support keyed blake2 nor advanced features like > # salt, personal, tree hashing or SSE. > return __get_builtin_constructor(name)(data, **kwargs) > try: >> return _hashlib.new(name, data) >E ValueError: [digital envelope routines] initialization error > >data = b'P\x00a\x00s\x00s\x00w\x00o\x00r\x00d\x00' >kwargs = {} >name = 'md4' > >/usr/lib/python3.8/hashlib.py:157: ValueError > >During handling of the above exception, another exception occurred: > >self = <tests.test_messages.TestAuthenticate object at 0x7f0ec834b7c0> >monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f0ec7eb26d0> > > def test_authenticate_message_with_cbt(self, monkeypatch): > monkeypatch.setattr('os.urandom', lambda s: b"\xaa" * 8) > monkeypatch.setattr('ntlm_auth.messages.get_random_export_session_key', > lambda: b"\x55" * 16) > monkeypatch.setattr('ntlm_auth.compute_response.get_windows_timestamp', > lambda: b"\x00" * 8) > > test_challenge_message = ChallengeMessage( > b"\x4e\x54\x4c\x4d\x53\x53\x50\x00" > b"\x02\x00\x00\x00\x03\x00\x0c\x00" > b"\x38\x00\x00\x00\x33\x82\x8a\xe2" > b"\x01\x23\x45\x67\x89\xab\xcd\xef" > b"\x00\x00\x00\x00\x00\x00\x00\x00" > b"\x24\x00\x24\x00\x44\x00\x00\x00" > b"\x06\x00\x70\x17\x00\x00\x00\x0f" > b"\x53\x00\x65\x00\x72\x00\x76\x00" > b"\x65\x00\x72\x00\x02\x00\x0c\x00" > b"\x44\x00\x6f\x00\x6d\x00\x61\x00" > b"\x69\x00\x6e\x00\x01\x00\x0c\x00" > b"\x53\x00\x65\x00\x72\x00\x76\x00" > b"\x65\x00\x72\x00\x00\x00\x00\x00" > ) > test_server_cert_hash = \ > 'E3CA49271E5089CC48CE82109F1324F41DBEDDC29A777410C738F7868C4FF405' > > # Not a Microsoft example, using pre-computed value > expected = b"\x4e\x54\x4c\x4d\x53\x53\x50\x00" \ > b"\x03\x00\x00\x00\x18\x00\x18\x00" \ > b"\x6c\x00\x00\x00\x68\x00\x68\x00" \ > b"\x84\x00\x00\x00\x0c\x00\x0c\x00" \ > b"\x48\x00\x00\x00\x08\x00\x08\x00" \ > b"\x54\x00\x00\x00\x10\x00\x10\x00" \ > b"\x5c\x00\x00\x00\x10\x00\x10\x00" \ > b"\xec\x00\x00\x00\x31\x82\x8a\xe2" \ > b"\x06\x01\xb1\x1d\x00\x00\x00\x0f" \ > b"\x44\x00\x6f\x00\x6d\x00\x61\x00" \ > b"\x69\x00\x6e\x00\x55\x00\x73\x00" \ > b"\x65\x00\x72\x00\x43\x00\x4f\x00" \ > b"\x4d\x00\x50\x00\x55\x00\x54\x00" \ > b"\x45\x00\x52\x00\x86\xc3\x50\x97" \ > b"\xac\x9c\xec\x10\x25\x54\x76\x4a" \ > b"\x57\xcc\xcc\x19\xaa\xaa\xaa\xaa" \ > b"\xaa\xaa\xaa\xaa\x04\x10\xc4\x7a" \ > b"\xcf\x19\x97\x89\xde\x7f\x20\x11" \ > b"\x95\x7a\xea\x50\x01\x01\x00\x00" \ > b"\x00\x00\x00\x00\x00\x00\x00\x00" \ > b"\x00\x00\x00\x00\xaa\xaa\xaa\xaa" \ > b"\xaa\xaa\xaa\xaa\x00\x00\x00\x00" \ > b"\x02\x00\x0c\x00\x44\x00\x6f\x00" \ > b"\x6d\x00\x61\x00\x69\x00\x6e\x00" \ > b"\x01\x00\x0c\x00\x53\x00\x65\x00" \ > b"\x72\x00\x76\x00\x65\x00\x72\x00" \ > b"\x0a\x00\x10\x00\x6e\xa1\x9d\xf0" \ > b"\x66\xda\x46\x22\x05\x1f\x9c\x4f" \ > b"\x92\xc6\xdf\x74\x00\x00\x00\x00" \ > b"\x00\x00\x00\x00\xe5\x69\x95\x1d" \ > b"\x15\xd4\x73\x5f\x49\xe1\x4c\xf9" \ > b"\xa7\xd3\xe6\x72" >> actual = AuthenticateMessage("User", "Password", "Domain", "COMPUTER", > test_challenge_message, 3, > test_server_cert_hash) > >expected = (b'NTLMSSP\x00\x03\x00\x00\x00\x18\x00\x18\x00l\x00\x00\x00h\x00h\x00' > b'\x84\x00\x00\x00\x0c\x00\x0c\x00H\x00\x00\x00\x08\x00\x08\x00T\x00\x00\x00' > b'\x10\x00\x10\x00\\\x00\x00\x00\x10\x00\x10\x00\xec\x00\x00\x001\x82\x8a\xe2' > b'\x06\x01\xb1\x1d\x00\x00\x00\x0fD\x00o\x00m\x00a\x00i\x00n\x00U\x00s\x00' > b'e\x00r\x00C\x00O\x00M\x00P\x00U\x00T\x00E\x00R\x00\x86\xc3P\x97' > b'\xac\x9c\xec\x10%TvJW\xcc\xcc\x19\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa' > b'\x04\x10\xc4z\xcf\x19\x97\x89\xde\x7f \x11\x95z\xeaP\x01\x01\x00\x00' > b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xaa\xaa\xaa\xaa' > b'\xaa\xaa\xaa\xaa\x00\x00\x00\x00\x02\x00\x0c\x00D\x00o\x00m\x00a\x00' > b'i\x00n\x00\x01\x00\x0c\x00S\x00e\x00r\x00v\x00e\x00r\x00\n\x00\x10\x00' > b'n\xa1\x9d\xf0f\xdaF"\x05\x1f\x9cO\x92\xc6\xdft\x00\x00\x00\x00' > b'\x00\x00\x00\x00\xe5i\x95\x1d\x15\xd4s_I\xe1L\xf9\xa7\xd3\xe6r') >monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f0ec7eb26d0> >self = <tests.test_messages.TestAuthenticate object at 0x7f0ec834b7c0> >test_challenge_message = <ntlm_auth.messages.ChallengeMessage object at 0x7f0ec7eb26a0> >test_server_cert_hash = 'E3CA49271E5089CC48CE82109F1324F41DBEDDC29A777410C738F7868C4FF405' > >tests/test_messages.py:549: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >ntlm_auth/messages.py:348: in __init__ > compute_response.get_lm_challenge_response() > cbt_data = None > challenge_message = <ntlm_auth.messages.ChallengeMessage object at 0x7f0ec7eb26a0> > compute_response = <ntlm_auth.compute_response.ComputeResponse object at 0x7f0ec7eb2eb0> > domain_name = 'Domain' > encoding_value = 'utf-16-le' > ntlm_compatibility = 3 > password = 'Password' > self = <ntlm_auth.messages.AuthenticateMessage object at 0x7f0ec7eb2910> > server_certificate_hash = 'E3CA49271E5089CC48CE82109F1324F41DBEDDC29A777410C738F7868C4FF405' > user_name = 'User' > workstation = 'COMPUTER' >ntlm_auth/compute_response.py:91: in get_lm_challenge_response > response = self._get_LMv2_response(self._user_name, self._password, > self = <ntlm_auth.compute_response.ComputeResponse object at 0x7f0ec7eb2eb0> >ntlm_auth/compute_response.py:272: in _get_LMv2_response > nt_hash = comphash._ntowfv2(user_name, password, domain_name) > client_challenge = b'\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa' > domain_name = 'Domain' > password = 'Password' > server_challenge = b'\x01#Eg\x89\xab\xcd\xef' > user_name = 'User' >ntlm_auth/compute_hash.py:87: in _ntowfv2 > digest = _ntowfv1(password) > domain_name = 'Domain' > password = 'Password' > user_name = 'User' >ntlm_auth/compute_hash.py:66: in _ntowfv1 > digest = hashlib.new('md4', password.encode('utf-16-le')).digest() > password = 'Password' >/usr/lib/python3.8/hashlib.py:163: in __hash_new > return __get_builtin_constructor(name)(data) > data = b'P\x00a\x00s\x00s\x00w\x00o\x00r\x00d\x00' > kwargs = {} > name = 'md4' >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >name = 'md4' > > def __get_builtin_constructor(name): > cache = __builtin_constructor_cache > constructor = cache.get(name) > if constructor is not None: > return constructor > try: > if name in {'SHA1', 'sha1'}: > import _sha1 > cache['SHA1'] = cache['sha1'] = _sha1.sha1 > elif name in {'MD5', 'md5'}: > import _md5 > cache['MD5'] = cache['md5'] = _md5.md5 > elif name in {'SHA256', 'sha256', 'SHA224', 'sha224'}: > import _sha256 > cache['SHA224'] = cache['sha224'] = _sha256.sha224 > cache['SHA256'] = cache['sha256'] = _sha256.sha256 > elif name in {'SHA512', 'sha512', 'SHA384', 'sha384'}: > import _sha512 > cache['SHA384'] = cache['sha384'] = _sha512.sha384 > cache['SHA512'] = cache['sha512'] = _sha512.sha512 > elif name in {'blake2b', 'blake2s'}: > import _blake2 > cache['blake2b'] = _blake2.blake2b > cache['blake2s'] = _blake2.blake2s > elif name in {'sha3_224', 'sha3_256', 'sha3_384', 'sha3_512'}: > import _sha3 > cache['sha3_224'] = _sha3.sha3_224 > cache['sha3_256'] = _sha3.sha3_256 > cache['sha3_384'] = _sha3.sha3_384 > cache['sha3_512'] = _sha3.sha3_512 > elif name in {'shake_128', 'shake_256'}: > import _sha3 > cache['shake_128'] = _sha3.shake_128 > cache['shake_256'] = _sha3.shake_256 > except ImportError: > pass # no extension module, this hash is unsupported. > > constructor = cache.get(name) > if constructor is not None: > return constructor > >> raise ValueError('unsupported hash type ' + name) >E ValueError: unsupported hash type md4 > >cache = {'blake2b': <class '_blake2.blake2b'>, > 'blake2s': <class '_blake2.blake2s'>, > 'sha3_224': <class '_sha3.sha3_224'>, > 'sha3_256': <class '_sha3.sha3_256'>, > 'sha3_384': <class '_sha3.sha3_384'>, > 'sha3_512': <class '_sha3.sha3_512'>, > 'shake_128': <class '_sha3.shake_128'>, > 'shake_256': <class '_sha3.shake_256'>} >constructor = None >name = 'md4' > >/usr/lib/python3.8/hashlib.py:120: ValueError >_____________ TestAuthenticate.test_authenticate_message_with_mic ______________ > >name = 'md4', data = b'P\x00a\x00s\x00s\x00w\x00o\x00r\x00d\x00', kwargs = {} > > def __hash_new(name, data=b'', **kwargs): > """new(name, data=b'') - Return a new hashing object using the named algorithm; > optionally initialized with data (which must be a bytes-like object). > """ > if name in __block_openssl_constructor: > # Prefer our blake2 and sha3 implementation > # OpenSSL 1.1.0 comes with a limited implementation of blake2b/s. > # It does neither support keyed blake2 nor advanced features like > # salt, personal, tree hashing or SSE. > return __get_builtin_constructor(name)(data, **kwargs) > try: >> return _hashlib.new(name, data) >E ValueError: [digital envelope routines] initialization error > >data = b'P\x00a\x00s\x00s\x00w\x00o\x00r\x00d\x00' >kwargs = {} >name = 'md4' > >/usr/lib/python3.8/hashlib.py:157: ValueError > >During handling of the above exception, another exception occurred: > >self = <tests.test_messages.TestAuthenticate object at 0x7f0ec834b790> >monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f0ec7ebaaf0> > > def test_authenticate_message_with_mic(self, monkeypatch): > monkeypatch.setattr('os.urandom', lambda s: b"\xaa" * 8) > monkeypatch.setattr('ntlm_auth.messages.get_random_export_session_key', > lambda: b"\x55" * 16) > > test_challenge_message = ChallengeMessage( > b"\x4e\x54\x4c\x4d\x53\x53\x50\x00" > b"\x02\x00\x00\x00\x03\x00\x0c\x00" > b"\x38\x00\x00\x00\x33\x82\x8a\xe2" > b"\x01\x23\x45\x67\x89\xab\xcd\xef" > b"\x00\x00\x00\x00\x00\x00\x00\x00" > b"\x24\x00\x24\x00\x44\x00\x00\x00" > b"\x06\x00\x70\x17\x00\x00\x00\x0f" > b"\x53\x00\x65\x00\x72\x00\x76\x00" > b"\x65\x00\x72\x00\x02\x00\x0c\x00" > b"\x44\x00\x6f\x00\x6d\x00\x61\x00" > b"\x69\x00\x6e\x00\x01\x00\x0c\x00" > b"\x53\x00\x65\x00\x72\x00\x76\x00" > b"\x65\x00\x72\x00\x00\x00\x00\x00" > ) > test_challenge_message.target_info[AvId.MSV_AV_TIMESTAMP] = b"\x00" * 8 > test_server_cert_hash = \ > 'E3CA49271E5089CC48CE82109F1324F41DBEDDC29A777410C738F7868C4FF405' > test_negotiate_message = NegotiateMessage(3800728115, "Domain", > "COMPUTER") > > # Not a Microsoft example, using pre-computed value > expected = b"\x4E\x54\x4C\x4D\x53\x53\x50\x00" \ > b"\x03\x00\x00\x00\x18\x00\x18\x00" \ > b"\x7C\x00\x00\x00\x7C\x00\x7C\x00" \ > b"\x94\x00\x00\x00\x0C\x00\x0C\x00" \ > b"\x58\x00\x00\x00\x08\x00\x08\x00" \ > b"\x64\x00\x00\x00\x10\x00\x10\x00" \ > b"\x6C\x00\x00\x00\x10\x00\x10\x00" \ > b"\x10\x01\x00\x00\x31\x82\x8A\xE2" \ > b"\x06\x01\xB1\x1D\x00\x00\x00\x0F" \ > b"\xD2\xA1\x45\xDE\xA4\x25\x3E\x19" \ > b"\x10\xFE\x0F\x5B\x7A\x0D\x2A\x90" \ > b"\x44\x00\x6F\x00\x6D\x00\x61\x00" \ > b"\x69\x00\x6E\x00\x55\x00\x73\x00" \ > b"\x65\x00\x72\x00\x43\x00\x4F\x00" \ > b"\x4D\x00\x50\x00\x55\x00\x54\x00" \ > b"\x45\x00\x52\x00\x00\x00\x00\x00" \ > b"\x00\x00\x00\x00\x00\x00\x00\x00" \ > b"\x00\x00\x00\x00\x00\x00\x00\x00" \ > b"\x00\x00\x00\x00\xA1\x3D\x03\x8A" \ > b"\xD0\xCA\x02\x64\x33\x89\x7C\x33" \ > b"\x5E\x0F\x56\xDF\x01\x01\x00\x00" \ > b"\x00\x00\x00\x00\x00\x00\x00\x00" \ > b"\x00\x00\x00\x00\xAA\xAA\xAA\xAA" \ > b"\xAA\xAA\xAA\xAA\x00\x00\x00\x00" \ > b"\x02\x00\x0C\x00\x44\x00\x6F\x00" \ > b"\x6D\x00\x61\x00\x69\x00\x6E\x00" \ > b"\x01\x00\x0C\x00\x53\x00\x65\x00" \ > b"\x72\x00\x76\x00\x65\x00\x72\x00" \ > b"\x07\x00\x08\x00\x00\x00\x00\x00" \ > b"\x00\x00\x00\x00\x06\x00\x04\x00" \ > b"\x02\x00\x00\x00\x0A\x00\x10\x00" \ > b"\x6E\xA1\x9D\xF0\x66\xDA\x46\x22" \ > b"\x05\x1F\x9C\x4F\x92\xC6\xDF\x74" \ > b"\x00\x00\x00\x00\x00\x00\x00\x00" \ > b"\x1D\x08\x89\xD1\xA5\xEE\xED\x21" \ > b"\x91\x9E\x1A\xB8\x27\xC3\x0B\x17" > >> actual = AuthenticateMessage("User", "Password", "Domain", "COMPUTER", > test_challenge_message, 3, > test_server_cert_hash) > >expected = (b'NTLMSSP\x00\x03\x00\x00\x00\x18\x00\x18\x00|\x00\x00\x00|\x00|\x00' > b'\x94\x00\x00\x00\x0c\x00\x0c\x00X\x00\x00\x00\x08\x00\x08\x00d\x00\x00\x00' > b'\x10\x00\x10\x00l\x00\x00\x00\x10\x00\x10\x00\x10\x01\x00\x001\x82\x8a\xe2' > b'\x06\x01\xb1\x1d\x00\x00\x00\x0f\xd2\xa1E\xde\xa4%>\x19\x10\xfe\x0f[z\r*\x90' > b'D\x00o\x00m\x00a\x00i\x00n\x00U\x00s\x00e\x00r\x00C\x00O\x00M\x00P\x00' > b'U\x00T\x00E\x00R\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' > b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1=\x03\x8a\xd0\xca\x02d' > b'3\x89|3^\x0fV\xdf\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' > b'\x00\x00\x00\x00\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\x00\x00\x00\x00' > b'\x02\x00\x0c\x00D\x00o\x00m\x00a\x00i\x00n\x00\x01\x00\x0c\x00S\x00e\x00' > b'r\x00v\x00e\x00r\x00\x07\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00' > b'\x06\x00\x04\x00\x02\x00\x00\x00\n\x00\x10\x00n\xa1\x9d\xf0f\xdaF"' > b'\x05\x1f\x9cO\x92\xc6\xdft\x00\x00\x00\x00\x00\x00\x00\x00\x1d\x08\x89\xd1' > b"\xa5\xee\xed!\x91\x9e\x1a\xb8'\xc3\x0b\x17") >monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f0ec7ebaaf0> >self = <tests.test_messages.TestAuthenticate object at 0x7f0ec834b790> >test_challenge_message = <ntlm_auth.messages.ChallengeMessage object at 0x7f0ec7eba550> >test_negotiate_message = <ntlm_auth.messages.NegotiateMessage object at 0x7f0ec7ebae20> >test_server_cert_hash = 'E3CA49271E5089CC48CE82109F1324F41DBEDDC29A777410C738F7868C4FF405' > >tests/test_messages.py:620: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >ntlm_auth/messages.py:348: in __init__ > compute_response.get_lm_challenge_response() > cbt_data = None > challenge_message = <ntlm_auth.messages.ChallengeMessage object at 0x7f0ec7eba550> > compute_response = <ntlm_auth.compute_response.ComputeResponse object at 0x7f0ec7ebab80> > domain_name = 'Domain' > encoding_value = 'utf-16-le' > ntlm_compatibility = 3 > password = 'Password' > self = <ntlm_auth.messages.AuthenticateMessage object at 0x7f0ec7ebadc0> > server_certificate_hash = 'E3CA49271E5089CC48CE82109F1324F41DBEDDC29A777410C738F7868C4FF405' > user_name = 'User' > workstation = 'COMPUTER' >ntlm_auth/compute_response.py:91: in get_lm_challenge_response > response = self._get_LMv2_response(self._user_name, self._password, > self = <ntlm_auth.compute_response.ComputeResponse object at 0x7f0ec7ebab80> >ntlm_auth/compute_response.py:272: in _get_LMv2_response > nt_hash = comphash._ntowfv2(user_name, password, domain_name) > client_challenge = b'\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa' > domain_name = 'Domain' > password = 'Password' > server_challenge = b'\x01#Eg\x89\xab\xcd\xef' > user_name = 'User' >ntlm_auth/compute_hash.py:87: in _ntowfv2 > digest = _ntowfv1(password) > domain_name = 'Domain' > password = 'Password' > user_name = 'User' >ntlm_auth/compute_hash.py:66: in _ntowfv1 > digest = hashlib.new('md4', password.encode('utf-16-le')).digest() > password = 'Password' >/usr/lib/python3.8/hashlib.py:163: in __hash_new > return __get_builtin_constructor(name)(data) > data = b'P\x00a\x00s\x00s\x00w\x00o\x00r\x00d\x00' > kwargs = {} > name = 'md4' >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >name = 'md4' > > def __get_builtin_constructor(name): > cache = __builtin_constructor_cache > constructor = cache.get(name) > if constructor is not None: > return constructor > try: > if name in {'SHA1', 'sha1'}: > import _sha1 > cache['SHA1'] = cache['sha1'] = _sha1.sha1 > elif name in {'MD5', 'md5'}: > import _md5 > cache['MD5'] = cache['md5'] = _md5.md5 > elif name in {'SHA256', 'sha256', 'SHA224', 'sha224'}: > import _sha256 > cache['SHA224'] = cache['sha224'] = _sha256.sha224 > cache['SHA256'] = cache['sha256'] = _sha256.sha256 > elif name in {'SHA512', 'sha512', 'SHA384', 'sha384'}: > import _sha512 > cache['SHA384'] = cache['sha384'] = _sha512.sha384 > cache['SHA512'] = cache['sha512'] = _sha512.sha512 > elif name in {'blake2b', 'blake2s'}: > import _blake2 > cache['blake2b'] = _blake2.blake2b > cache['blake2s'] = _blake2.blake2s > elif name in {'sha3_224', 'sha3_256', 'sha3_384', 'sha3_512'}: > import _sha3 > cache['sha3_224'] = _sha3.sha3_224 > cache['sha3_256'] = _sha3.sha3_256 > cache['sha3_384'] = _sha3.sha3_384 > cache['sha3_512'] = _sha3.sha3_512 > elif name in {'shake_128', 'shake_256'}: > import _sha3 > cache['shake_128'] = _sha3.shake_128 > cache['shake_256'] = _sha3.shake_256 > except ImportError: > pass # no extension module, this hash is unsupported. > > constructor = cache.get(name) > if constructor is not None: > return constructor > >> raise ValueError('unsupported hash type ' + name) >E ValueError: unsupported hash type md4 > >cache = {'blake2b': <class '_blake2.blake2b'>, > 'blake2s': <class '_blake2.blake2s'>, > 'sha3_224': <class '_sha3.sha3_224'>, > 'sha3_256': <class '_sha3.sha3_256'>, > 'sha3_384': <class '_sha3.sha3_384'>, > 'sha3_512': <class '_sha3.sha3_512'>, > 'shake_128': <class '_sha3.shake_128'>, > 'shake_256': <class '_sha3.shake_256'>} >constructor = None >name = 'md4' > >/usr/lib/python3.8/hashlib.py:120: ValueError >________________ TestMessages.test_create_authenticate_message _________________ > >name = 'md4', data = b'P\x00a\x00s\x00s\x00w\x00o\x00r\x00d\x00', kwargs = {} > > def __hash_new(name, data=b'', **kwargs): > """new(name, data=b'') - Return a new hashing object using the named algorithm; > optionally initialized with data (which must be a bytes-like object). > """ > if name in __block_openssl_constructor: > # Prefer our blake2 and sha3 implementation > # OpenSSL 1.1.0 comes with a limited implementation of blake2b/s. > # It does neither support keyed blake2 nor advanced features like > # salt, personal, tree hashing or SSE. > return __get_builtin_constructor(name)(data, **kwargs) > try: >> return _hashlib.new(name, data) >E ValueError: [digital envelope routines] initialization error > >data = b'P\x00a\x00s\x00s\x00w\x00o\x00r\x00d\x00' >kwargs = {} >name = 'md4' > >/usr/lib/python3.8/hashlib.py:157: ValueError > >During handling of the above exception, another exception occurred: > >self = <tests.test_ntlm.TestMessages object at 0x7f0ec81cdee0> >monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f0ec7ee25b0> > > def test_create_authenticate_message(self, monkeypatch): > monkeypatch.setattr('os.urandom', lambda s: b"\xaa" * 8) > monkeypatch.setattr('ntlm_auth.messages.get_version', > lambda s: b"\x05\x01\x28\x0A\x00\x00\x00\x0F") > monkeypatch.setattr('ntlm_auth.messages.get_random_export_session_key', > lambda: b"\x55" * 16) > monkeypatch.setattr('ntlm_auth.compute_response.get_windows_timestamp', > lambda: b"\x00" * 8) > > test_challenge_string = base64.b64encode( > b"\x4e\x54\x4c\x4d\x53\x53\x50\x00" > b"\x02\x00\x00\x00\x2f\x82\x88\xe2" > b"\x38\x00\x00\x00\x33\x82\x8a\xe2" > b"\x01\x23\x45\x67\x89\xab\xcd\xef" > b"\x00\x00\x00\x00\x00\x00\x00\x00" > b"\x24\x00\x24\x00\x44\x00\x00\x00" > b"\x06\x00\x70\x17\x00\x00\x00\x0f" > b"\x53\x00\x65\x00\x72\x00\x76\x00" > b"\x65\x00\x72\x00\x02\x00\x0c\x00" > b"\x44\x00\x6f\x00\x6d\x00\x61\x00" > b"\x69\x00\x6e\x00\x01\x00\x0c\x00" > b"\x53\x00\x65\x00\x72\x00\x76\x00" > b"\x65\x00\x72\x00\x00\x00\x00\x00" > ) > > test_ntlm_context = Ntlm() > test_ntlm_context.create_negotiate_message("Domain", "COMPUTER") > test_ntlm_context.parse_challenge_message(test_challenge_string) > > expected_message = base64.b64encode( > b"\x4e\x54\x4c\x4d\x53\x53\x50\x00" > b"\x03\x00\x00\x00\x18\x00\x18\x00" > b"\x6c\x00\x00\x00\x54\x00\x54\x00" > b"\x84\x00\x00\x00\x0c\x00\x0c\x00" > b"\x48\x00\x00\x00\x08\x00\x08\x00" > b"\x54\x00\x00\x00\x10\x00\x10\x00" > b"\x5c\x00\x00\x00\x10\x00\x10\x00" > b"\xd8\x00\x00\x00\x31\x82\x8a\xe2" > b"\x05\x01\x28\x0a\x00\x00\x00\x0f" > b"\x44\x00\x6f\x00\x6d\x00\x61\x00" > b"\x69\x00\x6e\x00\x55\x00\x73\x00" > b"\x65\x00\x72\x00\x43\x00\x4f\x00" > b"\x4d\x00\x50\x00\x55\x00\x54\x00" > b"\x45\x00\x52\x00\x86\xc3\x50\x97" > b"\xac\x9c\xec\x10\x25\x54\x76\x4a" > b"\x57\xcc\xcc\x19\xaa\xaa\xaa\xaa" > b"\xaa\xaa\xaa\xaa\x68\xcd\x0a\xb8" > b"\x51\xe5\x1c\x96\xaa\xbc\x92\x7b" > b"\xeb\xef\x6a\x1c\x01\x01\x00\x00" > b"\x00\x00\x00\x00\x00\x00\x00\x00" > b"\x00\x00\x00\x00\xaa\xaa\xaa\xaa" > b"\xaa\xaa\xaa\xaa\x00\x00\x00\x00" > b"\x02\x00\x0c\x00\x44\x00\x6f\x00" > b"\x6d\x00\x61\x00\x69\x00\x6e\x00" > b"\x01\x00\x0c\x00\x53\x00\x65\x00" > b"\x72\x00\x76\x00\x65\x00\x72\x00" > b"\x00\x00\x00\x00\x00\x00\x00\x00" > b"\xc5\xda\xd2\x54\x4f\xc9\x79\x90" > b"\x94\xce\x1c\xe9\x0b\xc9\xd0\x3e" > ) > > actual_message = \ >> test_ntlm_context.create_authenticate_message("User", "Password", > "Domain", "COMPUTER") > >expected_message = (b'TlRMTVNTUAADAAAAGAAYAGwAAABUAFQAhAAAAAwADABIAAAACAAIAFQAAAAQABAAXAAAABAAEADY' > b'AAAAMYKK4gUBKAoAAAAPRABvAG0AYQBpAG4AVQBzAGUAcgBDAE8ATQBQAFUAVABFAFIAhsNQl6yc' > b'7BAlVHZKV8zMGaqqqqqqqqqqaM0KuFHlHJaqvJJ76+9qHAEBAAAAAAAAAAAAAAAAAACqqqqqqqqq' > b'qgAAAAACAAwARABvAG0AYQBpAG4AAQAMAFMAZQByAHYAZQByAAAAAAAAAAAAxdrSVE/JeZCUzhzp' > b'C8nQPg==') >monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f0ec7ee25b0> >self = <tests.test_ntlm.TestMessages object at 0x7f0ec81cdee0> >test_challenge_string = (b'TlRMTVNTUAACAAAAL4KI4jgAAAAzgoriASNFZ4mrze8AAAAAAAAAACQAJABEAAAABgBwFwAAAA9T' > b'AGUAcgB2AGUAcgACAAwARABvAG0AYQBpAG4AAQAMAFMAZQByAHYAZQByAAAAAAA=') >test_ntlm_context = <ntlm_auth.ntlm.Ntlm object at 0x7f0ec7ee2940> > >tests/test_ntlm.py:195: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >ntlm_auth/ntlm.py:235: in create_authenticate_message > msg = self._context.step(self._challenge_token) > domain_name = 'Domain' > password = 'Password' > self = <ntlm_auth.ntlm.Ntlm object at 0x7f0ec7ee2940> > server_certificate_hash = None > user_name = 'User' > workstation = 'COMPUTER' >ntlm_auth/ntlm.py:98: in step > self._authenticate_message = AuthenticateMessage( > input_token = (b'NTLMSSP\x00\x02\x00\x00\x00/\x82\x88\xe28\x00\x00\x003\x82\x8a\xe2\x01#Eg' > b'\x89\xab\xcd\xef\x00\x00\x00\x00\x00\x00\x00\x00$\x00$\x00D\x00\x00\x00' > b'\x06\x00p\x17\x00\x00\x00\x0fS\x00e\x00r\x00v\x00e\x00r\x00\x02\x00\x0c\x00' > b'D\x00o\x00m\x00a\x00i\x00n\x00\x01\x00\x0c\x00S\x00e\x00r\x00v\x00e\x00r\x00' > b'\x00\x00\x00\x00') > self = <ntlm_auth.ntlm.NtlmContext object at 0x7f0ec7ee25e0> >ntlm_auth/messages.py:348: in __init__ > compute_response.get_lm_challenge_response() > cbt_data = None > challenge_message = <ntlm_auth.messages.ChallengeMessage object at 0x7f0ec7ee2910> > compute_response = <ntlm_auth.compute_response.ComputeResponse object at 0x7f0ec7ee20d0> > domain_name = 'Domain' > encoding_value = 'utf-16-le' > ntlm_compatibility = 3 > password = 'Password' > self = <ntlm_auth.messages.AuthenticateMessage object at 0x7f0ec7ee23d0> > server_certificate_hash = None > user_name = 'User' > workstation = 'COMPUTER' >ntlm_auth/compute_response.py:91: in get_lm_challenge_response > response = self._get_LMv2_response(self._user_name, self._password, > self = <ntlm_auth.compute_response.ComputeResponse object at 0x7f0ec7ee20d0> >ntlm_auth/compute_response.py:272: in _get_LMv2_response > nt_hash = comphash._ntowfv2(user_name, password, domain_name) > client_challenge = b'\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa' > domain_name = 'Domain' > password = 'Password' > server_challenge = b'\x01#Eg\x89\xab\xcd\xef' > user_name = 'User' >ntlm_auth/compute_hash.py:87: in _ntowfv2 > digest = _ntowfv1(password) > domain_name = 'Domain' > password = 'Password' > user_name = 'User' >ntlm_auth/compute_hash.py:66: in _ntowfv1 > digest = hashlib.new('md4', password.encode('utf-16-le')).digest() > password = 'Password' >/usr/lib/python3.8/hashlib.py:163: in __hash_new > return __get_builtin_constructor(name)(data) > data = b'P\x00a\x00s\x00s\x00w\x00o\x00r\x00d\x00' > kwargs = {} > name = 'md4' >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >name = 'md4' > > def __get_builtin_constructor(name): > cache = __builtin_constructor_cache > constructor = cache.get(name) > if constructor is not None: > return constructor > try: > if name in {'SHA1', 'sha1'}: > import _sha1 > cache['SHA1'] = cache['sha1'] = _sha1.sha1 > elif name in {'MD5', 'md5'}: > import _md5 > cache['MD5'] = cache['md5'] = _md5.md5 > elif name in {'SHA256', 'sha256', 'SHA224', 'sha224'}: > import _sha256 > cache['SHA224'] = cache['sha224'] = _sha256.sha224 > cache['SHA256'] = cache['sha256'] = _sha256.sha256 > elif name in {'SHA512', 'sha512', 'SHA384', 'sha384'}: > import _sha512 > cache['SHA384'] = cache['sha384'] = _sha512.sha384 > cache['SHA512'] = cache['sha512'] = _sha512.sha512 > elif name in {'blake2b', 'blake2s'}: > import _blake2 > cache['blake2b'] = _blake2.blake2b > cache['blake2s'] = _blake2.blake2s > elif name in {'sha3_224', 'sha3_256', 'sha3_384', 'sha3_512'}: > import _sha3 > cache['sha3_224'] = _sha3.sha3_224 > cache['sha3_256'] = _sha3.sha3_256 > cache['sha3_384'] = _sha3.sha3_384 > cache['sha3_512'] = _sha3.sha3_512 > elif name in {'shake_128', 'shake_256'}: > import _sha3 > cache['shake_128'] = _sha3.shake_128 > cache['shake_256'] = _sha3.shake_256 > except ImportError: > pass # no extension module, this hash is unsupported. > > constructor = cache.get(name) > if constructor is not None: > return constructor > >> raise ValueError('unsupported hash type ' + name) >E ValueError: unsupported hash type md4 > >cache = {'blake2b': <class '_blake2.blake2b'>, > 'blake2s': <class '_blake2.blake2s'>, > 'sha3_224': <class '_sha3.sha3_224'>, > 'sha3_256': <class '_sha3.sha3_256'>, > 'sha3_384': <class '_sha3.sha3_384'>, > 'sha3_512': <class '_sha3.sha3_512'>, > 'shake_128': <class '_sha3.shake_128'>, > 'shake_256': <class '_sha3.shake_256'>} >constructor = None >name = 'md4' > >/usr/lib/python3.8/hashlib.py:120: ValueError >________ TestMessages.test_create_authenticate_message_without_security ________ > >name = 'md4', data = b'P\x00a\x00s\x00s\x00w\x00o\x00r\x00d\x00', kwargs = {} > > def __hash_new(name, data=b'', **kwargs): > """new(name, data=b'') - Return a new hashing object using the named algorithm; > optionally initialized with data (which must be a bytes-like object). > """ > if name in __block_openssl_constructor: > # Prefer our blake2 and sha3 implementation > # OpenSSL 1.1.0 comes with a limited implementation of blake2b/s. > # It does neither support keyed blake2 nor advanced features like > # salt, personal, tree hashing or SSE. > return __get_builtin_constructor(name)(data, **kwargs) > try: >> return _hashlib.new(name, data) >E ValueError: [digital envelope routines] initialization error > >data = b'P\x00a\x00s\x00s\x00w\x00o\x00r\x00d\x00' >kwargs = {} >name = 'md4' > >/usr/lib/python3.8/hashlib.py:157: ValueError > >During handling of the above exception, another exception occurred: > >self = <tests.test_ntlm.TestMessages object at 0x7f0ec81a9340> >monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f0ec7e54640> > > def test_create_authenticate_message_without_security(self, monkeypatch): > monkeypatch.setattr('os.urandom', lambda s: b"\xaa" * 8) > monkeypatch.setattr('ntlm_auth.messages.get_version', > lambda s: b"\x05\x01\x28\x0A\x00\x00\x00\x0F") > monkeypatch.setattr('ntlm_auth.messages.get_random_export_session_key', > lambda: b"\x55" * 16) > monkeypatch.setattr('ntlm_auth.compute_response.get_windows_timestamp', > lambda: b"\x00" * 8) > > test_challenge_string = base64.b64encode( > b"\x4e\x54\x4c\x4d\x53\x53\x50\x00" > b"\x02\x00\x00\x00\x03\x00\x0c\x00" > b"\x38\x00\x00\x00\x03\x92\x8a\xe2" > b"\x01\x23\x45\x67\x89\xab\xcd\xef" > b"\x00\x00\x00\x00\x00\x00\x00\x00" > b"\x24\x00\x24\x00\x44\x00\x00\x00" > b"\x06\x00\x70\x17\x00\x00\x00\x0f" > b"\x53\x00\x65\x00\x72\x00\x76\x00" > b"\x65\x00\x72\x00\x02\x00\x0c\x00" > b"\x44\x00\x6f\x00\x6d\x00\x61\x00" > b"\x69\x00\x6e\x00\x01\x00\x0c\x00" > b"\x53\x00\x65\x00\x72\x00\x76\x00" > b"\x65\x00\x72\x00\x00\x00\x00\x00" > ) > test_ntlm_context = Ntlm() > test_ntlm_context.create_negotiate_message("Domain", "COMPUTER") > test_ntlm_context.parse_challenge_message(test_challenge_string) > > expected_message = base64.b64encode( > b"\x4e\x54\x4c\x4d\x53\x53\x50\x00" > b"\x03\x00\x00\x00\x18\x00\x18\x00" > b"\x6c\x00\x00\x00\x54\x00\x54\x00" > b"\x84\x00\x00\x00\x0c\x00\x0c\x00" > b"\x48\x00\x00\x00\x08\x00\x08\x00" > b"\x54\x00\x00\x00\x10\x00\x10\x00" > b"\x5c\x00\x00\x00\x10\x00\x10\x00" > b"\xd8\x00\x00\x00\x01\x92\x8a\xe2" > b"\x05\x01\x28\x0a\x00\x00\x00\x0f" > b"\x44\x00\x6f\x00\x6d\x00\x61\x00" > b"\x69\x00\x6e\x00\x55\x00\x73\x00" > b"\x65\x00\x72\x00\x43\x00\x4f\x00" > b"\x4d\x00\x50\x00\x55\x00\x54\x00" > b"\x45\x00\x52\x00\x86\xc3\x50\x97" > b"\xac\x9c\xec\x10\x25\x54\x76\x4a" > b"\x57\xcc\xcc\x19\xaa\xaa\xaa\xaa" > b"\xaa\xaa\xaa\xaa\x68\xcd\x0a\xb8" > b"\x51\xe5\x1c\x96\xaa\xbc\x92\x7b" > b"\xeb\xef\x6a\x1c\x01\x01\x00\x00" > b"\x00\x00\x00\x00\x00\x00\x00\x00" > b"\x00\x00\x00\x00\xaa\xaa\xaa\xaa" > b"\xaa\xaa\xaa\xaa\x00\x00\x00\x00" > b"\x02\x00\x0c\x00\x44\x00\x6f\x00" > b"\x6d\x00\x61\x00\x69\x00\x6e\x00" > b"\x01\x00\x0c\x00\x53\x00\x65\x00" > b"\x72\x00\x76\x00\x65\x00\x72\x00" > b"\x00\x00\x00\x00\x00\x00\x00\x00" > b"\xc5\xda\xd2\x54\x4f\xc9\x79\x90" > b"\x94\xce\x1c\xe9\x0b\xc9\xd0\x3e" > ) > > actual_message = \ >> test_ntlm_context.create_authenticate_message("User", "Password", > "Domain", "COMPUTER") > >expected_message = (b'TlRMTVNTUAADAAAAGAAYAGwAAABUAFQAhAAAAAwADABIAAAACAAIAFQAAAAQABAAXAAAABAAEADY' > b'AAAAAZKK4gUBKAoAAAAPRABvAG0AYQBpAG4AVQBzAGUAcgBDAE8ATQBQAFUAVABFAFIAhsNQl6yc' > b'7BAlVHZKV8zMGaqqqqqqqqqqaM0KuFHlHJaqvJJ76+9qHAEBAAAAAAAAAAAAAAAAAACqqqqqqqqq' > b'qgAAAAACAAwARABvAG0AYQBpAG4AAQAMAFMAZQByAHYAZQByAAAAAAAAAAAAxdrSVE/JeZCUzhzp' > b'C8nQPg==') >monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f0ec7e54640> >self = <tests.test_ntlm.TestMessages object at 0x7f0ec81a9340> >test_challenge_string = (b'TlRMTVNTUAACAAAAAwAMADgAAAADkoriASNFZ4mrze8AAAAAAAAAACQAJABEAAAABgBwFwAAAA9T' > b'AGUAcgB2AGUAcgACAAwARABvAG0AYQBpAG4AAQAMAFMAZQByAHYAZQByAAAAAAA=') >test_ntlm_context = <ntlm_auth.ntlm.Ntlm object at 0x7f0ec7e54820> > >tests/test_ntlm.py:264: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >ntlm_auth/ntlm.py:235: in create_authenticate_message > msg = self._context.step(self._challenge_token) > domain_name = 'Domain' > password = 'Password' > self = <ntlm_auth.ntlm.Ntlm object at 0x7f0ec7e54820> > server_certificate_hash = None > user_name = 'User' > workstation = 'COMPUTER' >ntlm_auth/ntlm.py:98: in step > self._authenticate_message = AuthenticateMessage( > input_token = (b'NTLMSSP\x00\x02\x00\x00\x00\x03\x00\x0c\x008\x00\x00\x00\x03\x92\x8a\xe2' > b'\x01#Eg\x89\xab\xcd\xef\x00\x00\x00\x00\x00\x00\x00\x00$\x00$\x00' > b'D\x00\x00\x00\x06\x00p\x17\x00\x00\x00\x0fS\x00e\x00r\x00v\x00e\x00r\x00' > b'\x02\x00\x0c\x00D\x00o\x00m\x00a\x00i\x00n\x00\x01\x00\x0c\x00S\x00e\x00' > b'r\x00v\x00e\x00r\x00\x00\x00\x00\x00') > self = <ntlm_auth.ntlm.NtlmContext object at 0x7f0ec7e54190> >ntlm_auth/messages.py:348: in __init__ > compute_response.get_lm_challenge_response() > cbt_data = None > challenge_message = <ntlm_auth.messages.ChallengeMessage object at 0x7f0ec7e54ac0> > compute_response = <ntlm_auth.compute_response.ComputeResponse object at 0x7f0ec7e54be0> > domain_name = 'Domain' > encoding_value = 'utf-16-le' > ntlm_compatibility = 3 > password = 'Password' > self = <ntlm_auth.messages.AuthenticateMessage object at 0x7f0ec7e54b20> > server_certificate_hash = None > user_name = 'User' > workstation = 'COMPUTER' >ntlm_auth/compute_response.py:91: in get_lm_challenge_response > response = self._get_LMv2_response(self._user_name, self._password, > self = <ntlm_auth.compute_response.ComputeResponse object at 0x7f0ec7e54be0> >ntlm_auth/compute_response.py:272: in _get_LMv2_response > nt_hash = comphash._ntowfv2(user_name, password, domain_name) > client_challenge = b'\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa' > domain_name = 'Domain' > password = 'Password' > server_challenge = b'\x01#Eg\x89\xab\xcd\xef' > user_name = 'User' >ntlm_auth/compute_hash.py:87: in _ntowfv2 > digest = _ntowfv1(password) > domain_name = 'Domain' > password = 'Password' > user_name = 'User' >ntlm_auth/compute_hash.py:66: in _ntowfv1 > digest = hashlib.new('md4', password.encode('utf-16-le')).digest() > password = 'Password' >/usr/lib/python3.8/hashlib.py:163: in __hash_new > return __get_builtin_constructor(name)(data) > data = b'P\x00a\x00s\x00s\x00w\x00o\x00r\x00d\x00' > kwargs = {} > name = 'md4' >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >name = 'md4' > > def __get_builtin_constructor(name): > cache = __builtin_constructor_cache > constructor = cache.get(name) > if constructor is not None: > return constructor > try: > if name in {'SHA1', 'sha1'}: > import _sha1 > cache['SHA1'] = cache['sha1'] = _sha1.sha1 > elif name in {'MD5', 'md5'}: > import _md5 > cache['MD5'] = cache['md5'] = _md5.md5 > elif name in {'SHA256', 'sha256', 'SHA224', 'sha224'}: > import _sha256 > cache['SHA224'] = cache['sha224'] = _sha256.sha224 > cache['SHA256'] = cache['sha256'] = _sha256.sha256 > elif name in {'SHA512', 'sha512', 'SHA384', 'sha384'}: > import _sha512 > cache['SHA384'] = cache['sha384'] = _sha512.sha384 > cache['SHA512'] = cache['sha512'] = _sha512.sha512 > elif name in {'blake2b', 'blake2s'}: > import _blake2 > cache['blake2b'] = _blake2.blake2b > cache['blake2s'] = _blake2.blake2s > elif name in {'sha3_224', 'sha3_256', 'sha3_384', 'sha3_512'}: > import _sha3 > cache['sha3_224'] = _sha3.sha3_224 > cache['sha3_256'] = _sha3.sha3_256 > cache['sha3_384'] = _sha3.sha3_384 > cache['sha3_512'] = _sha3.sha3_512 > elif name in {'shake_128', 'shake_256'}: > import _sha3 > cache['shake_128'] = _sha3.shake_128 > cache['shake_256'] = _sha3.shake_256 > except ImportError: > pass # no extension module, this hash is unsupported. > > constructor = cache.get(name) > if constructor is not None: > return constructor > >> raise ValueError('unsupported hash type ' + name) >E ValueError: unsupported hash type md4 > >cache = {'blake2b': <class '_blake2.blake2b'>, > 'blake2s': <class '_blake2.blake2s'>, > 'sha3_224': <class '_sha3.sha3_224'>, > 'sha3_256': <class '_sha3.sha3_256'>, > 'sha3_384': <class '_sha3.sha3_384'>, > 'sha3_512': <class '_sha3.sha3_512'>, > 'shake_128': <class '_sha3.shake_128'>, > 'shake_256': <class '_sha3.shake_256'>} >constructor = None >name = 'md4' > >/usr/lib/python3.8/hashlib.py:120: ValueError >______________________ TestNtlmContext.test_ntlm_context _______________________ > >name = 'md4', data = b'P\x00a\x00s\x00s\x00w\x00o\x00r\x00d\x00', kwargs = {} > > def __hash_new(name, data=b'', **kwargs): > """new(name, data=b'') - Return a new hashing object using the named algorithm; > optionally initialized with data (which must be a bytes-like object). > """ > if name in __block_openssl_constructor: > # Prefer our blake2 and sha3 implementation > # OpenSSL 1.1.0 comes with a limited implementation of blake2b/s. > # It does neither support keyed blake2 nor advanced features like > # salt, personal, tree hashing or SSE. > return __get_builtin_constructor(name)(data, **kwargs) > try: >> return _hashlib.new(name, data) >E ValueError: [digital envelope routines] initialization error > >data = b'P\x00a\x00s\x00s\x00w\x00o\x00r\x00d\x00' >kwargs = {} >name = 'md4' > >/usr/lib/python3.8/hashlib.py:157: ValueError > >During handling of the above exception, another exception occurred: > >self = <tests.test_ntlm.TestNtlmContext object at 0x7f0ec81a9160> >monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f0ec7d57eb0> > > def test_ntlm_context(self, monkeypatch): > monkeypatch.setattr('os.urandom', lambda s: b"\xaa" * 8) > monkeypatch.setattr('ntlm_auth.messages.get_version', > lambda s: b"\x05\x01\x28\x0A\x00\x00\x00\x0F") > monkeypatch.setattr('ntlm_auth.messages.get_random_export_session_key', > lambda: b"\x55" * 16) > monkeypatch.setattr('ntlm_auth.compute_response.get_windows_timestamp', > lambda: b"\x00" * 8) > > ch = 'E3CA49271E5089CC48CE82109F1324F41DBEDDC29A777410C738F7868C4FF405' > cbt_data = GssChannelBindingsStruct() > cbt_data[cbt_data.APPLICATION_DATA] = b"tls-server-end-point:" + \ > base64.b16decode(ch) > ntlm_context = NtlmContext("User", "Password", "Domain", "COMPUTER", > cbt_data=cbt_data) > actual_nego = ntlm_context.step() > expected_nego = b"\x4e\x54\x4c\x4d\x53\x53\x50\x00" \ > b"\x01\x00\x00\x00\x31\xb0\x88\xe2" \ > b"\x06\x00\x06\x00\x28\x00\x00\x00" \ > b"\x08\x00\x08\x00\x2e\x00\x00\x00" \ > b"\x05\x01\x28\x0a\x00\x00\x00\x0f" \ > b"\x44\x6f\x6d\x61\x69\x6e\x43\x4f" \ > b"\x4d\x50\x55\x54\x45\x52" > assert actual_nego == expected_nego > assert not ntlm_context.mic_present > assert not ntlm_context.complete > > challenge_msg = b"\x4e\x54\x4c\x4d\x53\x53\x50\x00" \ > b"\x02\x00\x00\x00\x2f\x82\x88\xe2" \ > b"\x38\x00\x00\x00\x33\x82\x8a\xe2" \ > b"\x01\x23\x45\x67\x89\xab\xcd\xef" \ > b"\x00\x00\x00\x00\x00\x00\x00\x00" \ > b"\x24\x00\x24\x00\x44\x00\x00\x00" \ > b"\x06\x00\x70\x17\x00\x00\x00\x0f" \ > b"\x53\x00\x65\x00\x72\x00\x76\x00" \ > b"\x65\x00\x72\x00\x02\x00\x0c\x00" \ > b"\x44\x00\x6f\x00\x6d\x00\x61\x00" \ > b"\x69\x00\x6e\x00\x01\x00\x0c\x00" \ > b"\x53\x00\x65\x00\x72\x00\x76\x00" \ > b"\x65\x00\x72\x00\x00\x00\x00\x00" >> actual_auth = ntlm_context.step(challenge_msg) > >actual_nego = (b'NTLMSSP\x00\x01\x00\x00\x001\xb0\x88\xe2\x06\x00\x06\x00(\x00\x00\x00' > b'\x08\x00\x08\x00.\x00\x00\x00\x05\x01(\n\x00\x00\x00\x0fDomainCOMPUTER') >cbt_data = <ntlm_auth.gss_channel_bindings.GssChannelBindingsStruct object at 0x7f0ec7d57a00> >ch = 'E3CA49271E5089CC48CE82109F1324F41DBEDDC29A777410C738F7868C4FF405' >challenge_msg = (b'NTLMSSP\x00\x02\x00\x00\x00/\x82\x88\xe28\x00\x00\x003\x82\x8a\xe2\x01#Eg' > b'\x89\xab\xcd\xef\x00\x00\x00\x00\x00\x00\x00\x00$\x00$\x00D\x00\x00\x00' > b'\x06\x00p\x17\x00\x00\x00\x0fS\x00e\x00r\x00v\x00e\x00r\x00\x02\x00\x0c\x00' > b'D\x00o\x00m\x00a\x00i\x00n\x00\x01\x00\x0c\x00S\x00e\x00r\x00v\x00e\x00r\x00' > b'\x00\x00\x00\x00') >expected_nego = (b'NTLMSSP\x00\x01\x00\x00\x001\xb0\x88\xe2\x06\x00\x06\x00(\x00\x00\x00' > b'\x08\x00\x08\x00.\x00\x00\x00\x05\x01(\n\x00\x00\x00\x0fDomainCOMPUTER') >monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f0ec7d57eb0> >ntlm_context = <ntlm_auth.ntlm.NtlmContext object at 0x7f0ec7d570a0> >self = <tests.test_ntlm.TestNtlmContext object at 0x7f0ec81a9160> > >tests/test_ntlm.py:345: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >ntlm_auth/ntlm.py:98: in step > self._authenticate_message = AuthenticateMessage( > input_token = (b'NTLMSSP\x00\x02\x00\x00\x00/\x82\x88\xe28\x00\x00\x003\x82\x8a\xe2\x01#Eg' > b'\x89\xab\xcd\xef\x00\x00\x00\x00\x00\x00\x00\x00$\x00$\x00D\x00\x00\x00' > b'\x06\x00p\x17\x00\x00\x00\x0fS\x00e\x00r\x00v\x00e\x00r\x00\x02\x00\x0c\x00' > b'D\x00o\x00m\x00a\x00i\x00n\x00\x01\x00\x0c\x00S\x00e\x00r\x00v\x00e\x00r\x00' > b'\x00\x00\x00\x00') > self = <ntlm_auth.ntlm.NtlmContext object at 0x7f0ec7d570a0> >ntlm_auth/messages.py:348: in __init__ > compute_response.get_lm_challenge_response() > cbt_data = <ntlm_auth.gss_channel_bindings.GssChannelBindingsStruct object at 0x7f0ec7d57a00> > challenge_message = <ntlm_auth.messages.ChallengeMessage object at 0x7f0ec7d573a0> > compute_response = <ntlm_auth.compute_response.ComputeResponse object at 0x7f0ec7d57340> > domain_name = 'Domain' > encoding_value = 'utf-16-le' > ntlm_compatibility = 3 > password = 'Password' > self = <ntlm_auth.messages.AuthenticateMessage object at 0x7f0ec7d572b0> > server_certificate_hash = None > user_name = 'User' > workstation = 'COMPUTER' >ntlm_auth/compute_response.py:91: in get_lm_challenge_response > response = self._get_LMv2_response(self._user_name, self._password, > self = <ntlm_auth.compute_response.ComputeResponse object at 0x7f0ec7d57340> >ntlm_auth/compute_response.py:272: in _get_LMv2_response > nt_hash = comphash._ntowfv2(user_name, password, domain_name) > client_challenge = b'\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa' > domain_name = 'Domain' > password = 'Password' > server_challenge = b'\x01#Eg\x89\xab\xcd\xef' > user_name = 'User' >ntlm_auth/compute_hash.py:87: in _ntowfv2 > digest = _ntowfv1(password) > domain_name = 'Domain' > password = 'Password' > user_name = 'User' >ntlm_auth/compute_hash.py:66: in _ntowfv1 > digest = hashlib.new('md4', password.encode('utf-16-le')).digest() > password = 'Password' >/usr/lib/python3.8/hashlib.py:163: in __hash_new > return __get_builtin_constructor(name)(data) > data = b'P\x00a\x00s\x00s\x00w\x00o\x00r\x00d\x00' > kwargs = {} > name = 'md4' >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >name = 'md4' > > def __get_builtin_constructor(name): > cache = __builtin_constructor_cache > constructor = cache.get(name) > if constructor is not None: > return constructor > try: > if name in {'SHA1', 'sha1'}: > import _sha1 > cache['SHA1'] = cache['sha1'] = _sha1.sha1 > elif name in {'MD5', 'md5'}: > import _md5 > cache['MD5'] = cache['md5'] = _md5.md5 > elif name in {'SHA256', 'sha256', 'SHA224', 'sha224'}: > import _sha256 > cache['SHA224'] = cache['sha224'] = _sha256.sha224 > cache['SHA256'] = cache['sha256'] = _sha256.sha256 > elif name in {'SHA512', 'sha512', 'SHA384', 'sha384'}: > import _sha512 > cache['SHA384'] = cache['sha384'] = _sha512.sha384 > cache['SHA512'] = cache['sha512'] = _sha512.sha512 > elif name in {'blake2b', 'blake2s'}: > import _blake2 > cache['blake2b'] = _blake2.blake2b > cache['blake2s'] = _blake2.blake2s > elif name in {'sha3_224', 'sha3_256', 'sha3_384', 'sha3_512'}: > import _sha3 > cache['sha3_224'] = _sha3.sha3_224 > cache['sha3_256'] = _sha3.sha3_256 > cache['sha3_384'] = _sha3.sha3_384 > cache['sha3_512'] = _sha3.sha3_512 > elif name in {'shake_128', 'shake_256'}: > import _sha3 > cache['shake_128'] = _sha3.shake_128 > cache['shake_256'] = _sha3.shake_256 > except ImportError: > pass # no extension module, this hash is unsupported. > > constructor = cache.get(name) > if constructor is not None: > return constructor > >> raise ValueError('unsupported hash type ' + name) >E ValueError: unsupported hash type md4 > >cache = {'blake2b': <class '_blake2.blake2b'>, > 'blake2s': <class '_blake2.blake2s'>, > 'sha3_224': <class '_sha3.sha3_224'>, > 'sha3_256': <class '_sha3.sha3_256'>, > 'sha3_384': <class '_sha3.sha3_384'>, > 'sha3_512': <class '_sha3.sha3_512'>, > 'shake_128': <class '_sha3.shake_128'>, > 'shake_256': <class '_sha3.shake_256'>} >constructor = None >name = 'md4' > >/usr/lib/python3.8/hashlib.py:120: ValueError >__________________ TestNtlmContext.test_ntlm_context_with_mic __________________ > >name = 'md4', data = b'P\x00a\x00s\x00s\x00w\x00o\x00r\x00d\x00', kwargs = {} > > def __hash_new(name, data=b'', **kwargs): > """new(name, data=b'') - Return a new hashing object using the named algorithm; > optionally initialized with data (which must be a bytes-like object). > """ > if name in __block_openssl_constructor: > # Prefer our blake2 and sha3 implementation > # OpenSSL 1.1.0 comes with a limited implementation of blake2b/s. > # It does neither support keyed blake2 nor advanced features like > # salt, personal, tree hashing or SSE. > return __get_builtin_constructor(name)(data, **kwargs) > try: >> return _hashlib.new(name, data) >E ValueError: [digital envelope routines] initialization error > >data = b'P\x00a\x00s\x00s\x00w\x00o\x00r\x00d\x00' >kwargs = {} >name = 'md4' > >/usr/lib/python3.8/hashlib.py:157: ValueError > >During handling of the above exception, another exception occurred: > >self = <tests.test_ntlm.TestNtlmContext object at 0x7f0ec81a9220> >monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f0ec7d63640> > > def test_ntlm_context_with_mic(self, monkeypatch): > monkeypatch.setattr('os.urandom', lambda s: b"\xaa" * 8) > monkeypatch.setattr('ntlm_auth.messages.get_version', lambda s: b"\x05\x01\x28\x0A\x00\x00\x00\x0F") > monkeypatch.setattr('ntlm_auth.messages.get_random_export_session_key', lambda: b"\x55" * 16) > monkeypatch.setattr('ntlm_auth.compute_response.get_windows_timestamp', lambda: b"\x00" * 8) > > ch = 'E3CA49271E5089CC48CE82109F1324F41DBEDDC29A777410C738F7868C4FF405' > cbt_data = GssChannelBindingsStruct() > cbt_data[cbt_data.APPLICATION_DATA] = b"tls-server-end-point:" + \ > base64.b16decode(ch) > ntlm_context = NtlmContext("User", "Password", "Domain", "COMPUTER", > cbt_data=cbt_data) > ntlm_context.reset_rc4_state() # Verifies it won't fail when the session security isn't set up. > > actual_nego = ntlm_context.step() > expected_nego = b"\x4e\x54\x4c\x4d\x53\x53\x50\x00" \ > b"\x01\x00\x00\x00\x31\xb0\x88\xe2" \ > b"\x06\x00\x06\x00\x28\x00\x00\x00" \ > b"\x08\x00\x08\x00\x2e\x00\x00\x00" \ > b"\x05\x01\x28\x0a\x00\x00\x00\x0f" \ > b"\x44\x6f\x6d\x61\x69\x6e\x43\x4f" \ > b"\x4d\x50\x55\x54\x45\x52" > assert actual_nego == expected_nego > assert not ntlm_context.mic_present > assert not ntlm_context.complete > > challenge_msg = b"\x4E\x54\x4C\x4D\x53\x53\x50\x00" \ > b"\x02\x00\x00\x00\x00\x00\x00\x00" \ > b"\x38\x00\x00\x00\x33\x82\x8A\xE2" \ > b"\x01\x23\x45\x67\x89\xAB\xCD\xEF" \ > b"\x00\x00\x00\x00\x00\x00\x00\x00" \ > b"\x30\x00\x30\x00\x38\x00\x00\x00" \ > b"\x06\x01\xB1\x1D\x00\x00\x00\x0F" \ > b"\x02\x00\x0C\x00\x44\x00\x6F\x00" \ > b"\x6D\x00\x61\x00\x69\x00\x6E\x00" \ > b"\x01\x00\x0C\x00\x53\x00\x65\x00" \ > b"\x72\x00\x76\x00\x65\x00\x72\x00" \ > b"\x07\x00\x08\x00\x00\x00\x00\x00" \ > b"\x00\x00\x00\x00\x00\x00\x00\x00" >> actual_auth = ntlm_context.step(challenge_msg) > >actual_nego = (b'NTLMSSP\x00\x01\x00\x00\x001\xb0\x88\xe2\x06\x00\x06\x00(\x00\x00\x00' > b'\x08\x00\x08\x00.\x00\x00\x00\x05\x01(\n\x00\x00\x00\x0fDomainCOMPUTER') >cbt_data = <ntlm_auth.gss_channel_bindings.GssChannelBindingsStruct object at 0x7f0ec7d63130> >ch = 'E3CA49271E5089CC48CE82109F1324F41DBEDDC29A777410C738F7868C4FF405' >challenge_msg = (b'NTLMSSP\x00\x02\x00\x00\x00\x00\x00\x00\x008\x00\x00\x003\x82\x8a\xe2\x01#Eg' > b'\x89\xab\xcd\xef\x00\x00\x00\x00\x00\x00\x00\x000\x000\x008\x00\x00\x00' > b'\x06\x01\xb1\x1d\x00\x00\x00\x0f\x02\x00\x0c\x00D\x00o\x00m\x00a\x00' > b'i\x00n\x00\x01\x00\x0c\x00S\x00e\x00r\x00v\x00e\x00r\x00\x07\x00\x08\x00' > b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00') >expected_nego = (b'NTLMSSP\x00\x01\x00\x00\x001\xb0\x88\xe2\x06\x00\x06\x00(\x00\x00\x00' > b'\x08\x00\x08\x00.\x00\x00\x00\x05\x01(\n\x00\x00\x00\x0fDomainCOMPUTER') >monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f0ec7d63640> >ntlm_context = <ntlm_auth.ntlm.NtlmContext object at 0x7f0ec7d63850> >self = <tests.test_ntlm.TestNtlmContext object at 0x7f0ec81a9220> > >tests/test_ntlm.py:445: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >ntlm_auth/ntlm.py:98: in step > self._authenticate_message = AuthenticateMessage( > input_token = (b'NTLMSSP\x00\x02\x00\x00\x00\x00\x00\x00\x008\x00\x00\x003\x82\x8a\xe2\x01#Eg' > b'\x89\xab\xcd\xef\x00\x00\x00\x00\x00\x00\x00\x000\x000\x008\x00\x00\x00' > b'\x06\x01\xb1\x1d\x00\x00\x00\x0f\x02\x00\x0c\x00D\x00o\x00m\x00a\x00' > b'i\x00n\x00\x01\x00\x0c\x00S\x00e\x00r\x00v\x00e\x00r\x00\x07\x00\x08\x00' > b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00') > self = <ntlm_auth.ntlm.NtlmContext object at 0x7f0ec7d63850> >ntlm_auth/messages.py:348: in __init__ > compute_response.get_lm_challenge_response() > cbt_data = <ntlm_auth.gss_channel_bindings.GssChannelBindingsStruct object at 0x7f0ec7d63130> > challenge_message = <ntlm_auth.messages.ChallengeMessage object at 0x7f0ec7d63a30> > compute_response = <ntlm_auth.compute_response.ComputeResponse object at 0x7f0ec7d639a0> > domain_name = 'Domain' > encoding_value = 'utf-16-le' > ntlm_compatibility = 3 > password = 'Password' > self = <ntlm_auth.messages.AuthenticateMessage object at 0x7f0ec7d63ac0> > server_certificate_hash = None > user_name = 'User' > workstation = 'COMPUTER' >ntlm_auth/compute_response.py:91: in get_lm_challenge_response > response = self._get_LMv2_response(self._user_name, self._password, > self = <ntlm_auth.compute_response.ComputeResponse object at 0x7f0ec7d639a0> >ntlm_auth/compute_response.py:272: in _get_LMv2_response > nt_hash = comphash._ntowfv2(user_name, password, domain_name) > client_challenge = b'\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa' > domain_name = 'Domain' > password = 'Password' > server_challenge = b'\x01#Eg\x89\xab\xcd\xef' > user_name = 'User' >ntlm_auth/compute_hash.py:87: in _ntowfv2 > digest = _ntowfv1(password) > domain_name = 'Domain' > password = 'Password' > user_name = 'User' >ntlm_auth/compute_hash.py:66: in _ntowfv1 > digest = hashlib.new('md4', password.encode('utf-16-le')).digest() > password = 'Password' >/usr/lib/python3.8/hashlib.py:163: in __hash_new > return __get_builtin_constructor(name)(data) > data = b'P\x00a\x00s\x00s\x00w\x00o\x00r\x00d\x00' > kwargs = {} > name = 'md4' >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >name = 'md4' > > def __get_builtin_constructor(name): > cache = __builtin_constructor_cache > constructor = cache.get(name) > if constructor is not None: > return constructor > try: > if name in {'SHA1', 'sha1'}: > import _sha1 > cache['SHA1'] = cache['sha1'] = _sha1.sha1 > elif name in {'MD5', 'md5'}: > import _md5 > cache['MD5'] = cache['md5'] = _md5.md5 > elif name in {'SHA256', 'sha256', 'SHA224', 'sha224'}: > import _sha256 > cache['SHA224'] = cache['sha224'] = _sha256.sha224 > cache['SHA256'] = cache['sha256'] = _sha256.sha256 > elif name in {'SHA512', 'sha512', 'SHA384', 'sha384'}: > import _sha512 > cache['SHA384'] = cache['sha384'] = _sha512.sha384 > cache['SHA512'] = cache['sha512'] = _sha512.sha512 > elif name in {'blake2b', 'blake2s'}: > import _blake2 > cache['blake2b'] = _blake2.blake2b > cache['blake2s'] = _blake2.blake2s > elif name in {'sha3_224', 'sha3_256', 'sha3_384', 'sha3_512'}: > import _sha3 > cache['sha3_224'] = _sha3.sha3_224 > cache['sha3_256'] = _sha3.sha3_256 > cache['sha3_384'] = _sha3.sha3_384 > cache['sha3_512'] = _sha3.sha3_512 > elif name in {'shake_128', 'shake_256'}: > import _sha3 > cache['shake_128'] = _sha3.shake_128 > cache['shake_256'] = _sha3.shake_256 > except ImportError: > pass # no extension module, this hash is unsupported. > > constructor = cache.get(name) > if constructor is not None: > return constructor > >> raise ValueError('unsupported hash type ' + name) >E ValueError: unsupported hash type md4 > >cache = {'blake2b': <class '_blake2.blake2b'>, > 'blake2s': <class '_blake2.blake2s'>, > 'sha3_224': <class '_sha3.sha3_224'>, > 'sha3_256': <class '_sha3.sha3_256'>, > 'sha3_384': <class '_sha3.sha3_384'>, > 'sha3_512': <class '_sha3.sha3_512'>, > 'shake_128': <class '_sha3.shake_128'>, > 'shake_256': <class '_sha3.shake_256'>} >constructor = None >name = 'md4' > >/usr/lib/python3.8/hashlib.py:120: ValueError >=============================== warnings summary =============================== >../../../../../../../usr/lib/python3.8/site-packages/_pytest/config/__init__.py:1294 > /usr/lib/python3.8/site-packages/_pytest/config/__init__.py:1294: PytestConfigWarning: Unknown config option: pep8maxlinelength > > self._warn_or_fail_if_strict(f"Unknown config option: {key}\n") > >-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html >=========================== short test summary info ============================ >SKIPPED [20] tests/test_ntlm.py:581: NTLM_USERNAME, NTLM_PASSWORD, NTLM_SERVER environment variables were not set, integration tests will be skipped >FAILED tests/test_compute_hash.py::TestComputeHash::test_ntowfv1 - ValueError... >FAILED tests/test_compute_hash.py::TestComputeHash::test_ntowfv2 - ValueError... >FAILED tests/test_compute_response.py::TestHashResults::test_get_LMv2_response >FAILED tests/test_compute_response.py::TestHashResults::test_get_NTLMv1_response >FAILED tests/test_compute_response.py::TestHashResults::test_get_NTLM2_response >FAILED tests/test_compute_response.py::TestHashResults::test_get_NTLMv2_response >FAILED tests/test_compute_response.py::TestChallengeResults::test_lm_v1_with_ntlm_2_response >FAILED tests/test_compute_response.py::TestChallengeResults::test_lm_v2_response >FAILED tests/test_compute_response.py::TestChallengeResults::test_lm_v2_response_with_no_target_info_timestamp >FAILED tests/test_compute_response.py::TestChallengeResults::test_lm_v2_response_with_server_target_info_timestamp >FAILED tests/test_compute_response.py::TestChallengeResults::test_nt_v1_response >FAILED tests/test_compute_response.py::TestChallengeResults::test_nt_v1_with_extended_security_response >FAILED tests/test_compute_response.py::TestChallengeResults::test_nt_v2_response >FAILED tests/test_compute_response.py::TestChallengeResults::test_nt_v2_response_no_target_info >FAILED tests/test_compute_response.py::TestChallengeResults::test_nt_v2_response_with_timestamp_av_pair >FAILED tests/test_messages.py::TestAuthenticate::test_authenticate_message_ntlm_v1 >FAILED tests/test_messages.py::TestAuthenticate::test_authenticate_without_domain_workstation >FAILED tests/test_messages.py::TestAuthenticate::test_authenticate_message_ntlm_v1_non_unicode >FAILED tests/test_messages.py::TestAuthenticate::test_authenticate_message_ntlm_v1_with_ess >FAILED tests/test_messages.py::TestAuthenticate::test_authenticate_message_ntlm_v2 >FAILED tests/test_messages.py::TestAuthenticate::test_authenticate_message_with_cbt >FAILED tests/test_messages.py::TestAuthenticate::test_authenticate_message_with_mic >FAILED tests/test_ntlm.py::TestMessages::test_create_authenticate_message - V... >FAILED tests/test_ntlm.py::TestMessages::test_create_authenticate_message_without_security >FAILED tests/test_ntlm.py::TestNtlmContext::test_ntlm_context - ValueError: u... >FAILED tests/test_ntlm.py::TestNtlmContext::test_ntlm_context_with_mic - Valu... >============= 26 failed, 78 passed, 20 skipped, 1 warning in 3.23s ============= > * ERROR: dev-python/ntlm-auth-1.5.0::gentoo failed (test phase): > * pytest failed with python3.8 > * > * Call stack: > * ebuild.sh, line 136: Called src_test > * environment, line 3451: Called distutils-r1_src_test > * environment, line 1621: Called _distutils-r1_run_foreach_impl 'python_test' > * environment, line 701: Called python_foreach_impl 'distutils-r1_run_phase' 'python_test' > * environment, line 3129: Called multibuild_foreach_variant '_python_multibuild_wrapper' 'distutils-r1_run_phase' 'python_test' > * environment, line 2655: Called _multibuild_run '_python_multibuild_wrapper' 'distutils-r1_run_phase' 'python_test' > * environment, line 2653: Called _python_multibuild_wrapper 'distutils-r1_run_phase' 'python_test' > * environment, line 1049: Called distutils-r1_run_phase 'python_test' > * environment, line 1544: Called python_test > * environment, line 3418: Called distutils-r1_python_test > * environment, line 1494: Called epytest > * environment, line 2160: Called die > * The specific snippet of code: > * "${@}" || die -n "pytest failed with ${EPYTHON}"; > * > * If you need support, post the output of `emerge --info '=dev-python/ntlm-auth-1.5.0::gentoo'`, > * the complete build log and the output of `emerge -pqv '=dev-python/ntlm-auth-1.5.0::gentoo'`. > * The complete build log is located at '/var/log/emerge-log/build/dev-python/ntlm-auth-1.5.0:20221224-101356.log'. > * For convenience, a symlink to the build log is located at '/var/tmp/portage/dev-python/ntlm-auth-1.5.0/temp/build.log'. > * The ebuild environment file is located at '/var/tmp/portage/dev-python/ntlm-auth-1.5.0/temp/environment'. > * Working directory: '/var/tmp/portage/dev-python/ntlm-auth-1.5.0/work/ntlm-auth-1.5.0' > * S: '/var/tmp/portage/dev-python/ntlm-auth-1.5.0/work/ntlm-auth-1.5.0' >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 888169
: 844853