Skip to content

Instantly share code, notes, and snippets.

@DesWurstes
Created February 1, 2021 09:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DesWurstes/ce0e1727a53e4b1f6e808e2ef5801ece to your computer and use it in GitHub Desktop.
Save DesWurstes/ce0e1727a53e4b1f6e808e2ef5801ece to your computer and use it in GitHub Desktop.
Extract WIF private keys from dumpwallet output
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Dumpwallet reader</title>
<link rel="stylesheet" href="css/styles.css?v=1.0">
</head>
<body>
<label for="input">Paste the dumpwallet output:</label>
<br>
<textarea id="input" name="input" rows="5" cols="84" oninput="extract()"></textarea>
<br>
<br>
<label for="input">The WIF private keys will appear here:</label>
<br>
<textarea id="output" name="output" rows="3" cols="52"></textarea>
</body>
<script>
function extract() {
var s = document.getElementById("input").value;
s = s.split("\n");
// Remove comments
s = s.filter(item => !item.startsWith("#"))
s = s.join(" ")
s = s.split(" ")
s = s.filter(item => item.startsWith("K")||item.startsWith("L")||item.startsWith("5"))
document.getElementById("output").value = s.join("\n");
}
</script>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment