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 9248457
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T09:56:57+00:00 2026-06-18T09:56:57+00:00

I was just messing around seeing if I could use the ‘crypt’ module and

  • 0

I was just messing around seeing if I could use the ‘crypt’ module and I’ve seem to run into a problem that I can’t for the life of me figure out. The output after I run this is this:

Password Not Found. secret HXXxJi0n6Huro HXXxJi0n6Huro

Which means that cryptWord and cryptPass are the same, so why isn’t the program doing the (if cryptWord == cryptPass:), and print 'Found Password:

I just don’t at all get it.

The dictionary.txt file just has the word secret in it multiple times, all on separate lines. And the evil.txt file has this line it:

test_user:HXXxJi0n6Huro

From what I can tell everything is working correctly? But something is holding this back from working right and I just can’t figure it out. Any help would be appreciated.

import crypt

def testPass(cryptPass):

        salt = cryptPass[0:2]
        dictFile = open('dictionary.txt', 'r')
        for word in dictFile.readlines():
            word = word.strip('\n')
            cryptWord = crypt.crypt(word, salt)
            if cryptWord == cryptPass:
                print "[+] Found Password: "+word+"\n"
                return
        print "[-] Password Not Found. " +word,  cryptWord,  cryptPass+  "\n"
        return


def main():

    passFile= open('evil.txt')
    for line in passFile.readlines():
        if ":" in line:
            user = line.split(':')[0]
            cryptPass = line.split(':')[1]
            print "[*] Cracking Password For: "+user
            testPass(cryptPass)
if __name__ == '__main__':

        main()
  • 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-18T09:56:58+00:00Added an answer on June 18, 2026 at 9:56 am

    Your crypPass value still has a newline attached to it. Strip it first:

    user, cryptPass = line.split(':')
    cryptPass = cryptPass.strip()
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am just messing around with an app that streams audio and I wanted
Just by messing around a little it seems that the video stream is not
Im just messing around with Ruby on Rails and HTML. This question isn't about
I was just messing around to answer someone's question here on Stack Overflow, when
I am just messing around trying to make a game right now, but I
I'm just messing around learning about JavaScript and I wanted to change the color
I'm just messing around with a Ndk tutorial I found. The native code uses
In an effort to learn about synchronization via Java, I'm just messing around with
I've just started messing around with php recently and I was testing my new
I'm just messing around with the skype4com api in c# and I'm a bit

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.