Movatterモバイル変換


[0]ホーム

URL:


Skip to content
DEV Community
Log in Create account

DEV Community

Cover image for Bandit Level 7 Level 8
Christian Paez
Christian Paez

Posted on

     

Bandit Level 7 Level 8

Introduction

Bandit level 8 is all about finding a specific word in a file and extracting its value. In this level, we are given a file calleddata.txt and are tasked with finding the value of a specific word.

Steps

  1. Connect to the Bandit server using SSH with the following command:
ssh bandit7@bandit.labs.overthewire.org -p 2220
Enter fullscreen modeExit fullscreen mode
  1. Enter the password for Bandit level 8 when prompted:z7WtoNQU2XfjmMtWA8u5rN4vzqu4v99S.
  2. We are given a file calleddata.txt. Use thecat command to view the contents of the file:
cat data.txt
Enter fullscreen modeExit fullscreen mode
  1. We are tasked with finding the value of the word "millionth" in the file. To accomplish this, we can use thegrep command to search for the word, and then use theawk command to extract its value. The command to do this is as follows:
cat data.txt | grep millionth | awk -F " " '{print $2}'
Enter fullscreen modeExit fullscreen mode
  1. After running the command, the value of the word "millionth" will be displayed in the terminal.
TESKZC0XvTetK0S9xNwm25STk5iWrBvP
Enter fullscreen modeExit fullscreen mode

Conclusion

In this level, we learned how to search for a specific word in a file using thegrep command and how to extract its value using theawk command. With this knowledge, we were able to successfully complete the level and obtain the password for the next level.

Top comments(2)

Subscribe
pic
Create template

Templates let you quickly answer FAQs or store snippets for re-use.

Dismiss
CollapseExpand
 
batuecas46 profile image
julio cesar batuecas
Estudiando html css y javascript en mis tiempos libres me encanta ....a
  • Education
    Buenos Aires secundaria Luis piedrabuena
  • Work
    Por el.momento desocupado trabajaba de chofer
  • Joined

recien pude entrar con este serial se me trabo mal probe de todo reinstale todo
y buscando pummmmm...probe esta passwd y adentro...

TESKZC0XvTetK0S9xNwm25STk5iWrBvP lo que me llama la atencion que tengo la otra que me da el ejercicio UTcorS4PSCYINhhArZ2KlPSzVbcx8Ri1

pero bueno gracias super

CollapseExpand
 
christianpaez profile image
Christian Paez
Software and Data Science
  • Joined

De nada Julio, si necesitas ayuda con algo de Bandit puedes comentar, saludos.

Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment'spermalink.

For further actions, you may consider blocking this person and/orreporting abuse

Software and Data Science
  • Joined

More fromChristian Paez

DEV Community

We're a place where coders share, stay up-to-date and grow their careers.

Log in Create account

[8]ページ先頭

©2009-2025 Movatter.jp