w4sp-book / w4sp-lab

Lab environment for the Wireshark for Security Professionals book
https://github.com/w4sp-book/w4sp-lab/wiki/Lab-Installation
70 stars 42 forks source link

Code Error Solved #87

Closed devzerops closed 1 year ago

devzerops commented 1 year ago

https://github.com/slowdodo/w4sp-lab

kali_linux offical docker install doc

useradd -m w4sp-lab -s /bin/bash -G sudo -U
passwd w4sp-lab

user change kali -> w4sp-lap (If you log in from the terminal with su w4sp , even sudo will not run. You need to log out and connect to w4sp.)

git clone https://github.com/slowdodo/w4sp-lab.git
sudo python ./w4sp-lab/w4sp_webapp.py
andreacastelnuovo commented 1 year ago

Hi, I have this problem:

Traceback (most recent call last): File "/home/w4sp-lab/Downloads/w4sp-lab-master/w4sp_webapp.py", line 8, in import w4sp File "/home/w4sp-lab/Downloads/w4sp-lab-master/w4sp.py", line 23 print r('ls -sail /root') ^^^^^^^^^^^^^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?

Do you know what I have to do? Or if you have the right code can share it? Thank you!

devzerops commented 1 year ago

If the basic code problems in w4sp-book/w4sp-lab can be solved by changing the print(r"~~") format. However, there are also many other issues, it is advisable to download the code using

git clone https://github.com/slowdodo/w4sp-lab.git

If you only check the username, login status, root status, and Docker installation, the installation will proceed without any problems.

andreacastelnuovo commented 1 year ago

Ok thank you! I'm trying right now. I hope this solve the problems.

andreacastelnuovo commented 1 year ago

It stopped here:

['which', 'dumpcap'] ['getcap', b'/usr/bin/dumpcap'] [] Error, capabilities not set correctly on dumpcap, setting capabilities ['setcap', '-r', b'/usr/bin/dumpcap'] [] Not enough w4sp/labs images found, building now /home/w4sp-lab/w4sp-lab/images ['docker', 'build', '-t', 'w4sp/labs:base', 'base'] ['docker', 'build', '-t', 'w4sp/labs:ftp_tel', 'ftp_tel'] ['docker', 'build', '-t', 'w4sp/labs:samba', 'samba'] ['docker', 'build', '-t', 'w4sp/labs:elk', 'elk']

Do you know an idea of where is the problem? I'm goin out crazy!!!!!!

devzerops commented 1 year ago

Just install it as is. It looks like nothing is happening because you are downloading the image. It's downloading a Docker image using Python. I tried running Kali Linux as an OVA on a laptop and it worked fine. I will try it again on desktop later and check for errors. Even if an error occurs, it should still work normally. Just wait for about 10 minutes.

devzerops commented 1 year ago

화면 캡처 2023-01-30 090459

Even on the desktop, it runs smoothly. It's the latest version installed as a live VM through OVA or VMK, including Docker installation, user, and Python version. If the installation is not working, try installing the latest Kali Linux through VMware or Virtualbox instead of the original Kali Linux.

It means to install a pre-built version of Kali Linux, not to reinstall it. 화면 캡처 2023-01-30 091303

andreacastelnuovo commented 1 year ago

Ok thank you so much! I try after.

andreacastelnuovo commented 1 year ago

It woooorks! Finally! I think the problem was just my internet connection, it's so slowly in kali. Thank you again!