Basically I'm making a simple hash converter that converts windows password hashes from the login recovery program to standard lm format or pwdump format....
So I've gotten the program to extract the lines of a hash from a text file specified by the user, but now I need to remove spaces, colons, etc from the string.
Question
PricklyPoo
Well I'm a noobie so go easy on me. :p
Basically I'm making a simple hash converter that converts windows password hashes from the login recovery program to standard lm format or pwdump format....
So I've gotten the program to extract the lines of a hash from a text file specified by the user, but now I need to remove spaces, colons, etc from the string.
For example a hash looks like this:
So I want to remove the space between the 33: and the _
Then I want to remove the colons ":" and the commas...not specifically in that order but w/e.
Right now I'm using:
remove(line1.begin(), line1.end(), ' ');
remove(line1.begin(), line1.end(), '_');
remove(line1.begin(), line1.end(), ':');
remove(line1.begin(), line1.end(), ',');
But for some reason it adds extra characters on to the end of the string, for example instead of the end of the string being:
It removes the colons and everything from the beginning of the string, but the end then looks like this:
Link to comment
Share on other sites
1 answer to this question
Recommended Posts