Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #60470

Re: Cracking hashes with Python

References <0a4ae59b-fff8-40dd-b264-823ea596ad82@googlegroups.com>
Date 2013-11-26 10:47 +1100
Subject Re: Cracking hashes with Python
From Chris Angelico <rosuav@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.3207.1385423276.18130.python-list@python.org> (permalink)

Show all headers | View raw


On Tue, Nov 26, 2013 at 10:32 AM, TheRandomPast <wishingforsam@gmail.com> wrote:
> I have a school project to do where I've to download MD5 Hashes from a particular website and write a code that will crack them. Does anyone know where I'll find out more information on how to do this? There's only 4 hashes that I need to do so it doesn't have to be a large script just needs to be able to download the hashes from the website. Can anyone help me out?

Do you actually need to download them from that web site, or can you
simply embed them into your code? The latter would be far easier.

I'm going to assume that you don't need to do anything more
complicated than brute-force these, and I'll also assume that they're
unsalted hashes.

With a cryptographic hash function, you take text, put it into the
function, and get back a number (or a hex or binary string, which
comes to the same thing). You can't go from the number to the string;
however, you can generate a large number of strings to see if any of
them results in the same number. You can take "large number" all the
way, and generate every possible string of a certain length, or you
can go through a dictionary and generate words. Once you find
something that matches, you have a plausible guess that this is the
password.

There's a basic idea of what "cracking" a hash means. Put a bit of
code together, see how you go. If you get stuck, post your code and
how you're stuck, and we'll try to help; but we won't simply write
your code for you. (By the way, thanks for being up-front about it
being a school project. The honesty is appreciated, even though we
would almost certainly be able to tell even if you didn't. :) )

One last thing: Please get off Google Groups. It makes your posts look
ugly, which makes you look bad, and that's (probably!) unfair. Use a
better news client, or subscribe to the mailing list
python-list@python.org and read and post through that. There are a
number of regulars here who simply trash all Google Groups posts
unread, because they're just not worth reading - switching clients
will help you be heard, and will mean you don't annoy people with
form. Of course, if you want to annoy us with substance, that's your
God-given right. :)

ChrisA

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Cracking hashes with Python TheRandomPast <wishingforsam@gmail.com> - 2013-11-25 15:32 -0800
  Re: Cracking hashes with Python Chris Angelico <rosuav@gmail.com> - 2013-11-26 10:47 +1100
    Re: Cracking hashes with Python TheRandomPast <wishingforsam@gmail.com> - 2013-11-25 16:01 -0800
      Re: Cracking hashes with Python Chris Angelico <rosuav@gmail.com> - 2013-11-26 11:19 +1100
  Re: Cracking hashes with Python Steven D'Aprano <steve@pearwood.info> - 2013-11-26 02:55 +0000
    RE: Cracking hashes with Python Frank Cui <ycui@outlook.com> - 2013-11-25 23:46 -0300
      Re: Cracking hashes with Python TheRandomPast <wishingforsam@gmail.com> - 2013-11-26 02:30 -0800
        Re: Cracking hashes with Python Chris Angelico <rosuav@gmail.com> - 2013-11-26 21:39 +1100
        Re: Cracking hashes with Python "TheRandomPast ." <wishingforsam@gmail.com> - 2013-11-26 11:46 +0000
        Re: Cracking hashes with Python Chris Angelico <rosuav@gmail.com> - 2013-11-26 23:48 +1100
        Re: Cracking hashes with Python Robert Kern <robert.kern@gmail.com> - 2013-11-26 13:00 +0000
        Re: Cracking hashes with Python "TheRandomPast ." <wishingforsam@gmail.com> - 2013-11-26 14:18 +0000
          Re: Cracking hashes with Python Denis McMahon <denismfmcmahon@gmail.com> - 2013-11-26 18:33 +0000
        Re: Cracking hashes with Python Chris Angelico <rosuav@gmail.com> - 2013-11-27 01:46 +1100
        Re: Cracking hashes with Python "TheRandomPast ." <wishingforsam@gmail.com> - 2013-11-26 15:13 +0000
        Re: Cracking hashes with Python Denis McMahon <denismfmcmahon@gmail.com> - 2013-11-26 18:17 +0000
          Re: Cracking hashes with Python "TheRandomPast ." <wishingforsam@gmail.com> - 2013-11-26 23:06 +0000
          Re: Cracking hashes with Python Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-11-27 01:04 +0000
          Re: Cracking hashes with Python Chris Angelico <rosuav@gmail.com> - 2013-11-27 13:28 +1100
          Re: Cracking hashes with Python Tim Delaney <timothy.c.delaney@gmail.com> - 2013-11-27 13:55 +1100
          Re: Cracking hashes with Python Chris Angelico <rosuav@gmail.com> - 2013-11-27 13:58 +1100
          Re: Cracking hashes with Python "TheRandomPast ." <wishingforsam@gmail.com> - 2013-11-27 12:40 +0000
            Re: Cracking hashes with Python Denis McMahon <denismfmcmahon@gmail.com> - 2013-11-27 21:18 +0000
          Re: Cracking hashes with Python Chris Angelico <rosuav@gmail.com> - 2013-11-28 00:27 +1100
          Re: Cracking hashes with Python MRAB <python@mrabarnett.plus.com> - 2013-11-27 17:44 +0000

csiph-web