Movatterモバイル変換


[0]ホーム

URL:


Skip to content
DEV Community
Log in Create account

DEV Community

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

Posted on

     

Bandit Level 8 Level 9

Introduction

Bandit9 is the tenth level of the OverTheWire Bandit wargame. In this level, we are given a file calleddata.txt and we have to find the line that occurs only once in the file.

Steps

  1. Open your terminal application.
  2. Enter the following command to ssh into the remote server:
ssh bandit8@bandit.labs.overthewire.org -p 2220
Enter fullscreen modeExit fullscreen mode
  1. Enter the password for Bandit8:z7WtoNQU2XfjmMtWA8u5rN4vzqu4v99S
  2. Now, you are logged in as Bandit8 and can start solving the level.
  3. Use thecat command to read the contents of thedata.txt file:
cat data.txt
Enter fullscreen modeExit fullscreen mode
  1. We need to find the line that occurs only once in the file. To do this, we can use thesort command to sort the lines of the file, and then theuniq -u command to show only the lines that occur once:
cat data.txt | sort | uniq -u
Enter fullscreen modeExit fullscreen mode

Congratulations! You have successfully solved Bandit9 and obtained the password for the next levelEN632PlfYiZbn3PhVK3XOGSlNInNE00t.

Conclusion

In this level, we learned how to use thesort anduniq commands to find a unique line in a file. These are powerful commands that can be used to analyze and manipulate large amounts of data.

Top comments(0)

Subscribe
pic
Create template

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

Dismiss

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