rsmusllp / king-phisher

Phishing Campaign Toolkit
BSD 3-Clause "New" or "Revised" License
2.27k stars 540 forks source link

Issue with Python 3.9, Termcolor #465

Closed laurelandhardy closed 2 years ago

laurelandhardy commented 3 years ago

root@localhost:/opt/king-phisher# ./KingPhisherServer server_config.yml Loading .env environment variables... Traceback (most recent call last): File "/usr/lib/python3.9/runpy.py", line 197, in _run_module_as_main return _run_code(code, main_globals, None, File "/usr/lib/python3.9/runpy.py", line 87, in _run_code exec(code, run_globals) File "/opt/king-phisher/king_phisher/server/main.py", line 42, in from king_phisher import color File "/opt/king-phisher/king_phisher/color.py", line 41, in import termcolor ModuleNotFoundError: No module named 'termcolor'

laurelandhardy commented 3 years ago

Where did went wrong?? Please help. Thanks

wolfthefallen commented 3 years ago

What operating system are you using? and how much ram and harddrive space do you have? As there is a similar issue: https://github.com/rsmusllp/king-phisher/issues/443

laurelandhardy commented 3 years ago

Hi wolf, Here we go: Hard drive: Total size: 153.4GB / Available 62.8GB

Linux localhost 5.10.0-kali5-amd64 #1 SMP Debian 5.10.24-1kali1 (2021-03-23) x86_64 GNU/Linux Memory Total: 2923324 kB Kali GNU/Linux Rolling \n \l Processor/CPU info: processor : 0 vendor_id : GenuineIntel cpu family : 6 model : 15 model name : Intel(R) Pentium(R) Dual CPU T3200 @ 2.00GHz stepping : 13 microcode : 0xa4 cpu MHz : 1995.048 cache size : 1024 KB physical id : 0 siblings : 2 core id : 0 cpu cores : 2 apicid : 0 initial apicid : 0 fpu : yes fpu_exception : yes cpuid level : 10 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good nopl cpuid aperfmperf pni dtes64 monitor ds_cpl est tm2 ssse3 cx16 xtpr pdcm lahf_lm pti dtherm bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit bogomips : 3990.09 clflush size : 64 cache_alignment : 64 address sizes : 36 bits physical, 48 bits virtual power management:

processor : 1 vendor_id : GenuineIntel cpu family : 6 model : 15 model name : Intel(R) Pentium(R) Dual CPU T3200 @ 2.00GHz stepping : 13 microcode : 0xa4 cpu MHz : 1995.048 cache size : 1024 KB physical id : 0 siblings : 2 core id : 1 cpu cores : 2 apicid : 1 initial apicid : 1 fpu : yes fpu_exception : yes cpuid level : 10 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good nopl cpuid aperfmperf pni dtes64 monitor ds_cpl est tm2 ssse3 cx16 xtpr pdcm lahf_lm pti dtherm bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit bogomips : 3990.09 clflush size : 64 cache_alignment : 64 address sizes : 36 bits physical, 48 bits virtual power management:


Module Size Used by ctr 16384 2 aes_generic 36864 4 libaes 16384 1 aes_generic crypto_simd 16384 0 cryptd 24576 1 crypto_simd glue_helper 16384 0 ccm 20480 6 cdc_ether 24576 0 usbnet 53248 1 cdc_ether mii 16384 1 usbnet snd_hda_codec_realtek 147456 1 snd_hda_codec_generic 98304 1 snd_hda_codec_realtek ledtrig_audio 16384 1 snd_hda_codec_generic snd_hda_intel 57344 5 snd_intel_dspcfg 28672 1 snd_hda_intel soundwire_intel 45056 1 snd_intel_dspcfg soundwire_generic_allocation 16384 1 soundwire_intel uvcvideo 114688 0 rtl8187 53248 0 snd_soc_core 315392 1 soundwire_intel snd_compress 32768 1 snd_soc_core videobuf2_vmalloc 20480 1 uvcvideo mac80211 983040 1 rtl8187 soundwire_cadence 36864 1 soundwire_intel videobuf2_memops 20480 1 videobuf2_vmalloc videobuf2_v4l2 36864 1 uvcvideo snd_hda_codec 172032 3 snd_hda_codec_generic,snd_hda_intel,snd_hda_codec_realtek cfg80211 970752 2 mac80211,rtl8187 videobuf2_common 65536 2 videobuf2_v4l2,uvcvideo snd_hda_core 110592 4 snd_hda_codec_generic,snd_hda_intel,snd_hda_codec,snd_hda_codec_realtek eeprom_93cx6 16384 1 rtl8187 videodev 286720 3 videobuf2_v4l2,uvcvideo,videobuf2_common rfkill 28672 5 cfg80211 snd_hwdep 16384 1 snd_hda_codec libarc4 16384 1 mac80211 mc 61440 4 videodev,videobuf2_v4l2,uvcvideo,videobuf2_common soundwire_bus 90112 3 soundwire_intel,soundwire_generic_allocation,soundwire_cadence snd_pcm 135168 7 snd_hda_intel,snd_hda_codec,soundwire_intel,snd_compress,snd_soc_core,snd_hda_core snd_timer 49152 1 snd_pcm snd 110592 18 snd_hda_codec_generic,snd_hwdep,snd_hda_intel,snd_hda_codec,snd_hda_codec_realtek,snd_timer,snd_compress,snd_soc_core,snd_pcm soundcore 16384 1 snd iTCO_wdt 16384 0 intel_pmc_bxt 16384 1 iTCO_wdt sg 36864 0 joydev 28672 0 coretemp 20480 0 iTCO_vendor_support 16384 1 iTCO_wdt at24 24576 0 serio_raw 20480 0 pcspkr 16384 0 wmi_bmof 16384 0 watchdog 28672 1 iTCO_wdt ac 16384 0 evdev 28672 18 acpi_cpufreq 32768 1 binfmt_misc 24576 1 squashfs 69632 2 loop 36864 4 msr 16384 0 fuse 167936 3 configfs 57344 1 ip_tables 32768 0 x_tables 53248 1 ip_tables autofs4 53248 2 ext4 921600 1 crc16 16384 1 ext4 mbcache 16384 1 ext4 jbd2 151552 1 ext4 crc32c_generic 16384 2 sr_mod 28672 0 cdrom 73728 1 sr_mod sd_mod 61440 3 t10_pi 16384 1 sd_mod crc_t10dif 20480 1 t10_pi crct10dif_generic 16384 1 crct10dif_common 16384 2 crct10dif_generic,crc_t10dif hid_generic 16384 0 usbhid 65536 0 hid 147456 2 usbhid,hid_generic ums_realtek 24576 0 uas 32768 0 usb_storage 81920 2 uas,ums_realtek ahci 40960 2 libahci 45056 1 ahci libata 290816 2 libahci,ahci psmouse 184320 0 scsi_mod 262144 6 sd_mod,usb_storage,uas,libata,sg,sr_mod i2c_i801 32768 0 i2c_smbus 20480 1 i2c_i801 r8169 102400 0 i915 2711552 16 uhci_hcd 53248 0 ehci_pci 20480 0 ehci_hcd 98304 1 ehci_pci realtek 24576 1 lpc_ich 28672 0 i2c_algo_bit 16384 1 i915 mdio_devres 16384 1 r8169 drm_kms_helper 274432 1 i915 libphy 151552 3 r8169,mdio_devres,realtek cec 61440 2 drm_kms_helper,i915 drm 618496 11 drm_kms_helper,i915 usbcore 323584 11 ehci_pci,usbnet,usbhid,usb_storage,uvcvideo,ehci_hcd,cdc_ether,uas,rtl8187,ums_realtek,uhci_hcd usb_common 16384 4 usbcore,uvcvideo,ehci_hcd,uhci_hcd wmi 36864 1 wmi_bmof battery 20480 0 video 53248 1 i915 button 24576 0


ENV:

SHELL=/bin/bash SESSION_MANAGER=local/localhost:@/tmp/.ICE-unix/1363,unix/localhost:/tmp/.ICE-unix/1363 QT_ACCESSIBILITY=1 COLORTERM=truecolor XDG_MENU_PREFIX=gnome- GNOME_DESKTOP_SESSION_ID=this-is-deprecated LESS_TERMCAP_se= LESS_TERMCAP_so= POWERSHELL_TELEMETRY_OPTOUT=1 SSH_AUTH_SOCK=/run/user/1000/keyring/ssh XMODIFIERS=@im=ibus DESKTOP_SESSION=gnome SSH_AGENT_PID=1318 GTK_MODULES=gail:atk-bridge PWD=/home/frenchman LOGNAME=frenchman XDG_SESSION_DESKTOP=gnome QT_QPA_PLATFORMTHEME=qt5ct XDG_SESSION_TYPE=x11 GPG_AGENT_INFO=/run/user/1000/gnupg/S.gpg-agent:0:1 XAUTHORITY=/run/user/1000/gdm/Xauthority WINDOWPATH=2 COMMAND_NOT_FOUND_INSTALL_PROMPT=1 GDM_LANG=en_US.UTF-8 HOME=/home/frenchman USERNAME=frenchman IM_CONFIG_PHASE=1 LANG=en_US.UTF-8 LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:.tar=01;31:.tgz=01;31:.arc=01;31:.arj=01;31:.taz=01;31:.lha=01;31:.lz4=01;31:.lzh=01;31:.lzma=01;31:.tlz=01;31:.txz=01;31:.tzo=01;31:.t7z=01;31:.zip=01;31:.z=01;31:.dz=01;31:.gz=01;31:.lrz=01;31:.lz=01;31:.lzo=01;31:.xz=01;31:.zst=01;31:.tzst=01;31:.bz2=01;31:.bz=01;31:.tbz=01;31:.tbz2=01;31:.tz=01;31:.deb=01;31:.rpm=01;31:.jar=01;31:.war=01;31:.ear=01;31:.sar=01;31:.rar=01;31:.alz=01;31:.ace=01;31:.zoo=01;31:.cpio=01;31:.7z=01;31:.rz=01;31:.cab=01;31:.wim=01;31:.swm=01;31:.dwm=01;31:.esd=01;31:.jpg=01;35:.jpeg=01;35:.mjpg=01;35:.mjpeg=01;35:.gif=01;35:.bmp=01;35:.pbm=01;35:.pgm=01;35:.ppm=01;35:.tga=01;35:.xbm=01;35:.xpm=01;35:.tif=01;35:.tiff=01;35:.png=01;35:.svg=01;35:.svgz=01;35:.mng=01;35:.pcx=01;35:.mov=01;35:.mpg=01;35:.mpeg=01;35:.m2v=01;35:.mkv=01;35:.webm=01;35:.webp=01;35:.ogm=01;35:.mp4=01;35:.m4v=01;35:.mp4v=01;35:.vob=01;35:.qt=01;35:.nuv=01;35:.wmv=01;35:.asf=01;35:.rm=01;35:.rmvb=01;35:.flc=01;35:.avi=01;35:.fli=01;35:.flv=01;35:.gl=01;35:.dl=01;35:.xcf=01;35:.xwd=01;35:.yuv=01;35:.cgm=01;35:.emf=01;35:.ogv=01;35:.ogx=01;35:.aac=00;36:.au=00;36:.flac=00;36:.m4a=00;36:.mid=00;36:.midi=00;36:.mka=00;36:.mp3=00;36:.mpc=00;36:.ogg=00;36:.ra=00;36:.wav=00;36:.oga=00;36:.opus=00;36:.spx=00;36:.xspf=00;36: XDG_CURRENT_DESKTOP=GNOME VTE_VERSION=6203 GNOME_TERMINAL_SCREEN=/org/gnome/Terminal/screen/076688ee_9d9d_4b4c_a592_a38c56d0981d XDG_SESSION_CLASS=user TERM=xterm-256color LESS_TERMCAP_mb= LESS_TERMCAP_me= LESS_TERMCAP_md= USER=frenchman GNOME_TERMINAL_SERVICE=:1.156 DISPLAY=:1 LESS_TERMCAP_ue= SHLVL=1 LESS_TERMCAP_us= QT_IM_MODULE=ibus XDG_RUNTIME_DIR=/run/user/1000 QT_AUTO_SCREEN_SCALE_FACTOR=0 XDG_DATA_DIRS=/usr/share/gnome:/usr/local/share/:/usr/share/:/var/lib/snapd/desktop PATH=/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/snap/bin GDMSESSION=gnome DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus _JAVAOPTIONS=-Dawt.useSystemAAFontSettings=on -Dswing.aatext=true =/usr/bin/env


Memory Free /proc/meminfo MemFree: 204060 kB


mount | column -t sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime) proc on /proc type proc (rw,nosuid,nodev,noexec,relatime) udev on /dev type devtmpfs (rw,nosuid,noexec,relatime,size=1420512k,nr_inodes=355128,mode=755) devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000) tmpfs on /run type tmpfs (rw,nosuid,nodev,noexec,relatime,size=292336k,mode=755) /dev/sda1 on / type ext4 (rw,relatime,errors=remount-ro) securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime) tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev) tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k) cgroup2 on /sys/fs/cgroup type cgroup2 (rw,nosuid,nodev,noexec,relatime,nsdelegate,memory_recursiveprot) pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime) none on /sys/fs/bpf type bpf (rw,nosuid,nodev,noexec,relatime,mode=700) systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=29,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=13002) debugfs on /sys/kernel/debug type debugfs (rw,nosuid,nodev,noexec,relatime) tracefs on /sys/kernel/tracing type tracefs (rw,nosuid,nodev,noexec,relatime) hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime,pagesize=2M) configfs on /sys/kernel/config type configfs (rw,nosuid,nodev,noexec,relatime) fusectl on /sys/fs/fuse/connections type fusectl (rw,nosuid,nodev,noexec,relatime) mqueue on /dev/mqueue type mqueue (rw,nosuid,nodev,noexec,relatime) /var/lib/snapd/snaps/core18_1997.snap on /snap/core18/1997 type squashfs (ro,nodev,relatime,x-gdu.hide) /var/lib/snapd/snaps/snapd_11402.snap on /snap/snapd/11402 type squashfs (ro,nodev,relatime,x-gdu.hide) binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,nosuid,nodev,noexec,relatime) tmpfs on /run/user/1000 type tmpfs (rw,nosuid,nodev,relatime,size=292332k,nr_inodes=73083,mode=700,uid=1000,gid=1000) gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=1000,group_id=1000)

Disk /dev/sda: 149.05 GiB, 160041885696 bytes, 312581808 sectors Disk model: ST9160827AS
Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: dos Disk identifier: 0x95ff077c

Device Boot Start End Sectors Size Id Type /dev/sda1 * 2048 306567167 306565120 146.2G 83 Linux /dev/sda2 306569214 312580095 6010882 2.9G 5 Extended /dev/sda5 306569216 312580095 6010880 2.9G 82 Linux swap / Solaris

Disk /dev/loop0: 55.45 MiB, 58142720 bytes, 113560 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/loop1: 32.27 MiB, 33841152 bytes, 66096 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes

Hoping that these details are going to be useful. Thanx in advance

wolfthefallen commented 3 years ago

from the King Phisher Directory, change to root user, then run export PIPENV_VENV_IN_PROJECT=True && pipenv --verbose --site-packages install

If it fails it will probably be due to low memory available. IF this is the case you can attempt to shut down all unused services and try again. Once complete you can start them back up.

laurelandhardy commented 3 years ago

Thank you wolf, sorry replying late, I wanted to increase memory before applying your fix. I did and below is the outcome: ──(frenchman㉿localhost)-[/opt/king-phisher] └─$ sudo su [sudo] password for frenchman: root@localhost:/opt/king-phisher# export PIPENV_VENV_IN_PROJECT=True && pipenv --verbose --site-packages install Using python: None Path to python: /usr/bin/python3.9 Virtualenv already exists! Removing existing virtualenv... Using python: /usr/bin/python3.9 Path to python: /usr/bin/python3.9 Creating a virtualenv for this project... Pipfile: /opt/king-phisher/Pipfile Using /usr/bin/python3.9 (3.9.2) to create virtualenv... Making site-packages available... created virtual environment CPython3.9.2.final.0-64 in 3836ms creator CPython3Posix(dest=/opt/king-phisher/.venv, clear=False, no_vcs_ignore=False, global=True) seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/root/.local/share/virtualenv) added seed packages: pip==21.0.1, setuptools==54.1.2, wheel==0.36.2 activators BashActivator,CShellActivator,FishActivator,PowerShellActivator,PythonActivator,XonshActivator

Traceback (most recent call last): File "/usr/local/lib/python3.9/dist-packages/pipenv/utils.py", line 1131, in create_spinner yield sp File "/usr/local/lib/python3.9/dist-packages/pipenv/core.py", line 977, in do_create_virtualenv sp.green.ok(environments.PIPENV_SPINNER_OK_TEXT.format(u"Successfully created virtual environment!")) File "/usr/local/lib/python3.9/dist-packages/pipenv/vendor/vistir/spin.py", line 265, in ok self._freeze(_text, err=err) File "/usr/local/lib/python3.9/dist-packages/pipenv/vendor/vistir/spin.py", line 364, in _freeze last_frame = self._compose_out(text, mode="last") File "/usr/local/lib/python3.9/dist-packages/pipenv/vendor/vistir/spin.py", line 387, in _compose_out if self._color_func is not None: File "/usr/local/lib/python3.9/dist-packages/pipenv/vendor/vistir/spin.py", line 116, in getattr retval = super(DummySpinner, self).getattribute(k) AttributeError: 'VistirSpinner' object has no attribute '_color_func'

Traceback (most recent call last): File "/usr/local/bin/pipenv", line 8, in sys.exit(cli()) File "/usr/local/lib/python3.9/dist-packages/pipenv/vendor/click/core.py", line 829, in call return self.main(args, kwargs) File "/usr/local/lib/python3.9/dist-packages/pipenv/vendor/click/core.py", line 782, in main rv = self.invoke(ctx) File "/usr/local/lib/python3.9/dist-packages/pipenv/vendor/click/core.py", line 1256, in invoke Command.invoke(self, ctx) File "/usr/local/lib/python3.9/dist-packages/pipenv/vendor/click/core.py", line 1066, in invoke return ctx.invoke(self.callback, ctx.params) File "/usr/local/lib/python3.9/dist-packages/pipenv/vendor/click/core.py", line 610, in invoke return callback(args, kwargs) File "/usr/local/lib/python3.9/dist-packages/pipenv/vendor/click/decorators.py", line 73, in new_func return ctx.invoke(f, obj, *args, *kwargs) File "/usr/local/lib/python3.9/dist-packages/pipenv/vendor/click/core.py", line 610, in invoke return callback(args, kwargs) File "/usr/local/lib/python3.9/dist-packages/pipenv/vendor/click/decorators.py", line 21, in new_func return f(get_current_context(), *args, **kwargs) File "/usr/local/lib/python3.9/dist-packages/pipenv/cli/command.py", line 199, in cli ensure_project( File "/usr/local/lib/python3.9/dist-packages/pipenv/core.py", line 576, in ensure_project ensure_virtualenv( File "/usr/local/lib/python3.9/dist-packages/pipenv/core.py", line 541, in ensure_virtualenv ensure_virtualenv( File "/usr/local/lib/python3.9/dist-packages/pipenv/core.py", line 511, in ensure_virtualenv do_create_virtualenv( File "/usr/local/lib/python3.9/dist-packages/pipenv/core.py", line 977, in do_create_virtualenv sp.green.ok(environments.PIPENV_SPINNER_OK_TEXT.format(u"Successfully created virtual environment!")) File "/usr/local/lib/python3.9/dist-packages/pipenv/vendor/vistir/spin.py", line 265, in ok self._freeze(_text, err=err) File "/usr/local/lib/python3.9/dist-packages/pipenv/vendor/vistir/spin.py", line 364, in _freeze last_frame = self._compose_out(text, mode="last") File "/usr/local/lib/python3.9/dist-packages/pipenv/vendor/vistir/spin.py", line 387, in _compose_out if self._color_func is not None: File "/usr/local/lib/python3.9/dist-packages/pipenv/vendor/vistir/spin.py", line 116, in getattr retval = super(DummySpinner, self).getattribute(k) AttributeError: 'VistirSpinner' object has no attribute '_color_func'

zeroSteiner commented 3 years ago

I was able to reproduce this. It looks like all of the dependencies are failing to install because numpy=1.16.4 is failing and the errors cascade from there. That particular version is required for the basemaps package and I don't have a solution for it yet.

zeroSteiner commented 3 years ago

I pushed up some dependency changes in commit 4da5e82f000f0b1e479ddc2808e4ebc5f2505bc7 that drops the problematic packages around basemaps. Everything should still work except the graphs that provide maps. This was always an optional component anyways, we just tried to install the dependencies by default.

Since King Phisher never fully installed correctly, you probably don't want to run through the update procedure. I suggest you remove your repository, clone down the latest version and try to install it again. Things should go more smoothly this time.

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.