volatilityfoundation / volatility

An advanced memory forensics framework
http://volatilityfoundation.org/
GNU General Public License v2.0
7.38k stars 1.28k forks source link

SyntaxError: Missing parentheses in call to 'print'. Did you mean print("\n")? #815

Closed aryanadi-ic closed 2 years ago

aryanadi-ic commented 2 years ago

**Hi there!

Please kindly help me with this, as I think there's something wrong with me or something missing when running the volatility:**

Unsatisfied requirement plugins. Linux kernel Unable to validate the plugin requirements: Volatility Version: Volatility Operating System: Ubuntu 20.04.2 LTS (Mac OS Sierra 10.12 using Virtual Box) Python Version: 3.8.10

Command: /opt# git clone https://github.com/volatilityfoundation/volatility Cloning into 'volatility'... remote: Enumerating objects: 27411, done. remote: Total 27411 (delta 0), reused 0 (delta 0), pack-reused 27411 Receiving objects: 100% (27411/27411), 21.10 MiB | 2.32 MiB/s, done. Resolving deltas: 100% (19758/19758), done.

/opt# ls containerd LiME volatility volatility3

/opt# cd volatility ; ls AUTHORS.txt contrib LEGAL.txt Makefile PKG-INFO pyinstaller.spec resources tools vol.py CHANGELOG.txt CREDITS.txt LICENSE.txt MANIFEST.in pyinstaller README.txt setup.py volatility

/opt/volatility# cd tools/linux/ ; ls kcore Makefile Makefile.enterprise module.c

/opt/volatility/tools/linux# make clean make -C //lib/modules/5.11.0-37-generic/build M="/opt/volatility/tools/linux" clean make[1]: Entering directory '/usr/src/linux-headers-5.11.0-37-generic' make[1]: Leaving directory '/usr/src/linux-headers-5.11.0-37-generic' rm -f module.dwarf root@aryanadi-VirtualBox:/opt/volatility/tools/linux# root@aryanadi-VirtualBox:/opt/volatility/tools/linux# root@aryanadi-VirtualBox:/opt/volatility/tools/linux# apt install dwarfdump Reading package lists... Done Building dependency tree
Reading state information... Done dwarfdump is already the newest version (20200114-1). 0 upgraded, 0 newly installed, 0 to remove and 387 not upgraded. root@aryanadi-VirtualBox:/opt/volatility/tools/linux# root@aryanadi-VirtualBox:/opt/volatility/tools/linux# root@aryanadi-VirtualBox:/opt/volatility/tools/linux# apt install build-essential Reading package lists... Done Building dependency tree
Reading state information... Done build-essential is already the newest version (12.8ubuntu1.1). 0 upgraded, 0 newly installed, 0 to remove and 387 not upgraded.

/opt/volatility/tools/linux# apt install linux-headers-generic Reading package lists... Done Building dependency tree
Reading state information... Done The following packages were automatically installed and are no longer required: linux-headers-5.4.0-91 linux-headers-5.4.0-91-generic Use 'sudo apt autoremove' to remove them. The following additional packages will be installed: linux-headers-5.4.0-92 linux-headers-5.4.0-92-generic The following NEW packages will be installed: linux-headers-5.4.0-92 linux-headers-5.4.0-92-generic The following packages will be upgraded: linux-headers-generic 1 upgraded, 2 newly installed, 0 to remove and 386 not upgraded. Need to get 12,4 MB of archives. After this operation, 86,1 MB of additional disk space will be used. Do you want to continue? [Y/n] y Get:1 http://id.archive.ubuntu.com/ubuntu focal-updates/main amd64 linux-headers-5.4.0-92 all 5.4.0-92.103 [11,0 MB] Get:2 http://id.archive.ubuntu.com/ubuntu focal-updates/main amd64 linux-headers-5.4.0-92-generic amd64 5.4.0-92.103 [1.406 kB] Ign:3 http://id.archive.ubuntu.com/ubuntu focal-updates/main amd64 linux-headers-generic amd64 5.4.0.92.96
Err:3 http://security.ubuntu.com/ubuntu focal-updates/main amd64 linux-headers-generic amd64 5.4.0.92.96
404 Not Found [IP: 91.189.88.152 80] Fetched 12,4 MB in 42s (295 kB/s)
E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/l/linux-meta/linux-headers-generic_5.4.0.92.96_amd64.deb 404 Not Found [IP: 91.189.88.152 80] E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing? root@aryanadi-VirtualBox:/opt/volatility/tools/linux# make make -C //lib/modules/5.11.0-37-generic/build CONFIG_DEBUG_INFO=y M="/opt/volatility/tools/linux" modules make[1]: Entering directory '/usr/src/linux-headers-5.11.0-37-generic' CC [M] /opt/volatility/tools/linux/module.o MODPOST /opt/volatility/tools/linux/Module.symvers ERROR: modpost: missing MODULE_LICENSE() in /opt/volatility/tools/linux/module.o make[2]: [scripts/Makefile.modpost:124: /opt/volatility/tools/linux/Module.symvers] Error 1 make[2]: Deleting file '/opt/volatility/tools/linux/Module.symvers' make[1]: [Makefile:1753: modules] Error 2 make[1]: Leaving directory '/usr/src/linux-headers-5.11.0-37-generic' make: [Makefile:10: dwarf] Error 2

/opt/volatility/tools/linux# ls kcore Makefile Makefile.enterprise module.c module.dwo module.mod module.mod.c module.o modules.order

/opt/volatility/tools/linux# ls /boot/ config-5.11.0-37-generic initrd.img-5.11.0-37-generic memtest86+_multiboot.bin vmlinuz-5.8.0-43-generic config-5.8.0-43-generic initrd.img-5.8.0-43-generic System.map-5.11.0-37-generic vmlinuz.old efi initrd.img.old System.map-5.8.0-43-generic grub memtest86+.bin vmlinuz initrd.img memtest86+.elf vmlinuz-5.11.0-37-generic

/opt/volatility/tools/linux# cd ../.. ; ls AUTHORS.txt contrib LEGAL.txt Makefile PKG-INFO pyinstaller.spec resources tools vol.py CHANGELOG.txt CREDITS.txt LICENSE.txt MANIFEST.in pyinstaller README.txt setup.py volatility

/opt/volatility# zip volatility/plugins/linux/Ubuntu 20.04.2 LTS.zip tools/linux/module.dwarf /boot/System.map-5.8.0-43-generic zip warning: name not matched: 20.04.2 zip warning: name not matched: LTS.zip zip warning: name not matched: tools/linux/module.dwarf adding: boot/System.map-5.8.0-43-generic (deflated 80%)

/opt/volatility# zip volatility/plugins/linux/Ubuntu1604-06.zip tools/linux/module.dwarf /boot/System.map-5.8.0-43-generic zip warning: name not matched: tools/linux/module.dwarf adding: boot/System.map-5.8.0-43-generic (deflated 80%)

opt/volatility# zip volatility/plugins/linux/Ubuntu1604-06.zip tools/linux/module.dwo /boot/System.map-5.8.0-43-generic updating: boot/System.map-5.8.0-43-generic (deflated 80%) adding: tools/linux/module.dwo (deflated 45%)

/opt/volatility# python vol.py --info | grep Linux Command 'python' not found, did you mean: command 'python3' from deb python3 command 'python' from deb python-is-python3

/opt/volatility# python3 vol.py --info | grep Linux File "vol.py", line 118 print "\n" ^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print("\n")?

And this was what I got when I ran these command lines: /opt/volatility# ls AUTHORS.txt contrib LEGAL.txt Makefile PKG-INFO pyinstaller.spec resources tools vol.py CHANGELOG.txt CREDITS.txt LICENSE.txt MANIFEST.in pyinstaller README.txt setup.py volatility

/opt/volatility# cd volatility ; ls addrspace.py conf.py dwarf.py init.py poolscan.py renderers utils.py cache.py constants.py exceptions.py obj.py protos.py scan.py validity.py commands.py debug.py fmtspec.py plugins registry.py timefmt.py win32

/opt/volatility/volatility# cd plugins ; ls addrspaces drivermodule.py gui joblinks.py moddump.py patchguard.py ssdt.py volshell.py bigpagepools.py dumpcerts.py handles.py kdbgscan.py modscan.py pooltracker.py strings.py win10cookie.py bioskbd.py dumpfiles.py heaps.py kpcrscan.py modules.py privileges.py taskmods.py cmdline.py envars.py hibinfo.py linux multiscan.py procdump.py tcaudit.py common.py evtlogs.py hpakinfo.py mac netscan.py pstree.py timeliner.py connections.py fileparam.py iehistory.py machoinfo.py notepad.py raw2dmp.py vadinfo.py connscan.py filescan.py imagecopy.py malware objtypescan.py registry vboxinfo.py crashinfo.py getservicesids.py imageinfo.py mbrparser.py overlays sockets.py verinfo.py dlldump.py getsids.py init.py mftparser.py patcher.py sockscan.py vmwareinfo.py

/opt/volatility/volatility/plugins# cd linux ; ls apihooks.py common.py kernel_opened_files.py malfind.py psaux.py arp.py cpuinfo.py keyboard_notifiers.py mount_cache.py psenv.py aslr_shift.py dentry_cache.py ld_env.py mount.py pslist_cache.py banner.py dmesg.py ldrmodules.py netfilter.py pslist.py bash_hash.py dump_map.py libc_env.py netscan.py psscan.py bash.py elfs.py librarydump.py netstat.py pstree.py check_afinfo.py enumerate_files.py library_list.py pidhashtable.py psxview.py check_creds.py find_file.py lime.py pkt_queues.py recover_filesystem.py check_evt_arm.py flags.py linux_strings.py plthook.py route_cache.py check_fops.py getcwd.py linux_truecrypt.py procdump.py sk_buff_cache.py check_idt.py hidden_modules.py linux_volshell.py process_hollow.py slab_info.py check_inline_kernel.py ifconfig.py linux_yarascan.py process_info.py threads.py check_modules.py info_regs.py list_raw.py process_stack.py tmpfs.py check_syscall_arm.py init.py lsmod.py proc_maps.py tty_check.py check_syscall.py iomem.py lsof.py proc_maps_rb.py vma_cache.py

I was trying to figure out what was occuring, what did I miss... but I hvn't got a clue yet. Please kindly help me. Thanks very much!

cmueller-tp commented 2 years ago

SyntaxError: Missing parentheses in call to 'print'. Did you mean print("\n")?

in python 2 it was ok to print something with print "hello world" while you'll need print("hello world") in python 3 - and this is what this error is telling you: volatility 2 is written in python 2 so you'll need a python 2 environment to run it