Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

Re^4: Find and replace MD5 hash from file

by ikegami (Patriarch)
on Jun 29, 2011 at 20:19 UTC ( #912029=note: print w/replies, xml ) Need Help??

in reply to Re^3: Find and replace MD5 hash from file
in thread Find and replace MD5 hash from file

The OP doesn't have base64-encoded strings. He's got hashes which include base64 strings. They are not base64 strings, and I don't know if they can contain quotes or not.

As for your comment about having this discussion before, it makes no sense. I'm telling the OP that just adding single quotes is not always acceptable, and I'm sure I've never told this to him before since he's never posted here before.

You are probably referring to the thread where you recommended a buggy version of

my $passwd_lit = $passwd; my $path_lit = $path; s#'#'\\''#g for $passwd_lit, $path_lit; system("mysqldump --add-drop-table -uroot -p'$passwd_lit' mydatabase | + gzip -9c > '$path_lit'");


my ($passwd_lit, $path_lit) = map text_to_shell_lit, $passwd, $path; system("mysqldump --add-drop-table -uroot -p$passwd_lit mydatabase | g +zip -9c > $path_lit");

But that makes no sense either since you didn't use that code.

Replies are listed 'Best First'.
Re^5: Find and replace MD5 hash from file
by philipbailey (Deacon) on Jun 29, 2011 at 20:36 UTC

    This is the format of adroc's output from "makepasswd": "$1$" + base64-encoded string (a salt) + "$" + another base64-encoded string (the hashed password). No quotes there.

    The source for makepasswd on my system is available here: After examining that code, I can't see anything that disagrees with what I said. And this is a standard format, so some other "makepasswd" should produce the same output.

    (Updates made to the text of this node for clarity.)

      And? Did you actually read what I posted? I told him he would have to quote single quote if there's a possibility they are used. Nothing you are saying contradicts that.

      In fact, you are trying to chastise me for mentioning extra work might be needed when you don't even know that the extra work isn't needed. ("I believe this is the format").

      If you want to point out that the extra work isn't needed in this circumstance, fine. But you haven't done that yet.

        I'm saying I have domain knowledge of the format, and that it never contains quotes. I also gave you a URL providing the makepasswd code as evidence. Have you read that?

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://912029]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (1)
As of 2022-05-19 03:25 GMT
Find Nodes?
    Voting Booth?
    Do you prefer to work remotely?

    Results (71 votes). Check out past polls.