Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8587939
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T22:41:37+00:00 2026-06-11T22:41:37+00:00

I have a binary named ./testpassword with syntax as below ./testpassword pass PASSWORD_GOES_HERE if

  • 0

I have a binary named ./testpassword with syntax as below

./testpassword pass PASSWORD_GOES_HERE

if password is correct output will be

pass=correct

if incorrect output will be as below

pass=incorrect

I am brand new to linux and scripting, but with the help of a member on here, made a sample shell script as below

    cat passwords.txt | while read x ; do echo -n "$x: " && ./testpassword pass $x ;
done

where passwords is a wordlist in txt format.

This works nicely,and If i keep an eye on terminal I can see output as below (continuing for every line in the word list)

jordyt: pass=incorrect
dawder: pass=incorrect
LOL12345: pass=incorrect
warcraft: pass=incorrect
solidussnake: pass=incorrect
0005: pass=correct

So in this case, I know 0005 is my password, my question is, Is it possible to stop the program when password is found, or to automatically show the password somewhere?. If I am to walk away from the screen I lose track of what the password was as the screen will continue attempting passwords and scrolling down

the previous way I was doing was like this Shell script password bruteforcing . It worked as I could walk away and come back later and see that the password had been cracked and then ctrl+c the program, except it was a bit of a long winded way of doing things. after I had to manually search for the line number in the wordlist corresponding to the cracked password

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T22:41:38+00:00Added an answer on June 11, 2026 at 10:41 pm

    You can save the execution of ./testpassword pass $x in a variable doing:

    cat passwords.txt | while read x ; do result=`./testpassword pass $x` ; echo -n "$x: $result" ; done
    

    Then, you can compare $result to the string “pass=correct” and break the loop if it finds the string this way:

    if [[ "$result" == *pass=correct ]]; then break; fi
    

    Put all together:

    cat passwords.txt | while read x ; do result=`./testpassword pass $x` ; echo -n "$x: $result" ; if [[ "$result" == *pass=correct ]]; then break; fi ; done
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a binary named A that generates output when called. If I call
I have a binary program named as some thing like mm.out. This program has
I have binary data in my database that I'll have to convert to bitmap
I have binary codes as 10111 , 100011 , 11101111 etc. now what data
I have a Binary Search Tree, I use template to add any class object
I have a binary image that represents a number in MATLAB: I'd like to
I have a binary file that contains blocks of information ( I'll refer to
I have a binary file, that was written in C, which contains a long
i have a binary file which has 4 KB of header information and then
I have a binary tree where each node can have a value. I want

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.