Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re^3: Find and replace MD5 hash from file

by philipbailey (Chaplain)
on Jun 29, 2011 at 19:45 UTC ( #912022=note: print w/ replies, xml ) Need Help??


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

We've had this conversation before, ikegami. In this case the OP's base64-encoded strings never contain single quotes.

Update: this is clarified in later nodes in this thread. The OP's output largely consists of base-64 strings together with 4 other (non-quote) characters, explained below.


Comment on Re^3: Find and replace MD5 hash from file
Re^4: Find and replace MD5 hash from file
by ikegami (Pope) on Jun 29, 2011 at 20:19 UTC

    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'");

    over

    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.

      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: http://packages.debian.org/lenny/makepasswd. 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.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (3)
As of 2014-07-31 03:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (244 votes), past polls