Suppose one learned that certain developer hardcoded a bunch of usernames and passwords into application, which made it into Production. Oh-oh ..!
You know both username and password – is there a way to scan the bytecode and identify whether in fact username, password was hardcoded?
A simple way to see what String literals are used in a “.class” file is to use the
javaputility in your JDK installation to dump the file using the “-v” option. Thengrepfor text that looks like<String "...">where...is the String you are looking for.UPDATE
The latest documentation for
javapis here, but the old version looks nicer IMO.