Bitcoin Forum
May 13, 2024, 01:36:29 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Any way to recover wallet just from electrum.dat?  (Read 3484 times)
DarkHyudrA (OP)
Legendary
*
Offline Offline

Activity: 1386
Merit: 1000


English <-> Portuguese translations


View Profile
April 01, 2014, 05:20:42 PM
 #1

I lost the only file I had with the seed after formatting my old PC.
The only thing that I could recover is the electrum file itself, and placing it directly to %APPDATA%\Electrum does nothing, I mean, the program simply don't run at all.
Anyway that I still can get access to at least the privkeys inside of it?

English <-> Brazilian Portuguese translations
1715564189
Hero Member
*
Offline Offline

Posts: 1715564189

View Profile Personal Message (Offline)

Ignore
1715564189
Reply with quote  #2

1715564189
Report to moderator
Each block is stacked on top of the previous one. Adding another block to the top makes all lower blocks more difficult to remove: there is more "weight" above each block. A transaction in a block 6 blocks deep (6 confirmations) will be very difficult to remove.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715564189
Hero Member
*
Offline Offline

Posts: 1715564189

View Profile Personal Message (Offline)

Ignore
1715564189
Reply with quote  #2

1715564189
Report to moderator
1715564189
Hero Member
*
Offline Offline

Posts: 1715564189

View Profile Personal Message (Offline)

Ignore
1715564189
Reply with quote  #2

1715564189
Report to moderator
1715564189
Hero Member
*
Offline Offline

Posts: 1715564189

View Profile Personal Message (Offline)

Ignore
1715564189
Reply with quote  #2

1715564189
Report to moderator
dabura667
Sr. Member
****
Offline Offline

Activity: 475
Merit: 252


View Profile
April 01, 2014, 05:58:10 PM
Last edit: April 01, 2014, 06:38:47 PM by dabura667
 #2

NOTE* : The file I am talking about in step 1# is commonly something like "electrum.dat" or "default_wallet" would be the name of the file. It can usually be found in %APPDATA%/Roaming/Electrum/wallets/ if you're on Windows.

1. open the file using a text editor

2. look for an area (maybe use find function) that says
Code:
'seed': '<some long string of letters and numbers ending in equal signs>',

3. take the string of letters and numbers between the '  ' single quotations. and copy it somewhere readily available. (don't worry, those letters are encrypted, so you won't be too compromised)

4. open Electrum 1.9.8 and click on the console tab.

5. in the console type
Code:
import aes
then hit Enter.

6. type in console
Code:
from electrum import wallet
then hit Enter

7. Let's say your encryped seed was abcdefg== and your password was d0gecoin
Then, type in
Code:
wallet.pw_decode('abcdefg==', 'd0gecoin')

8. if the password is correct, the next line will give you a string of 32 HEX characters (0-9, A-F) between single quotes. THIS IS YOUR UNENCRYPTED SEED! BE CAREFUL WITH THIS INFORMATION, IT WILL RESTORE YOUR WALLET FOR ANYONE WHO SEES IT!

Note for 8: If the password is wrong, it will say "Exception Invalid Password"... pressing up arrow key will re-insert the last command so you won't have to re-type too much besides the password. Also, the console won't hide your password and you will be typing it in plaintext onto the console. Be sure to do this in private.

9. Now you have your HEX based seed. Click "New Wallet" in File menu, then choose second option "Restore from seed", then in the seed box paste your 32 characters HEX seed with NO QUOTATIONS. and hit next.

10. You have now restored your bitcoins.

1QCjHCCaifSFDMqR4KWDAfowZJiiqi7m7U

Here's a tip address if this helped.

Edit: btw if it was me, after doing all this stuff I might just make a NEW wallet and send all my bitcoins there and make a different password for the new wallet... your unencrypted seed was just all over your monitor and stuff, so it might be safer to make a new wallet.

My Tip Address:
1DXcHTJS2DJ3xDoxw22wCt11FeAsgfzdBU
DarkHyudrA (OP)
Legendary
*
Offline Offline

Activity: 1386
Merit: 1000


English <-> Portuguese translations


View Profile
April 02, 2014, 02:45:33 AM
 #3

Many thanks!
But one last detail: there was a imported address in this wallet, that I would like to recover because it has a few bitcents in it. I would glady send something for you as tip ofc.
I saw that there is a "imported_keys" tag, but I don't really know what to do with it...

English <-> Brazilian Portuguese translations
dabura667
Sr. Member
****
Offline Offline

Activity: 475
Merit: 252


View Profile
April 02, 2014, 05:40:49 AM
Last edit: April 02, 2014, 11:35:48 AM by dabura667
 #4

Many thanks!
But one last detail: there was a imported address in this wallet, that I would like to recover because it has a few bitcents in it. I would glady send something for you as tip ofc.
I saw that there is a "imported_keys" tag, but I don't really know what to do with it...
Yea, it's the same process except instead of using the seed you have to do it once for each encrypted key and the output is one unencrypted private key each... Its time consuming.
'imported_keys' is where you want to look, and each encrypted private key is surrounded in single quotes separated by commas.

Then you can just re-import the private keys to your new wallet using the normal interface.

Edit:

I just verified with my electrum, I didn't have imported addresses, but I made three on Bitaddress and put them in just to see how it looks in a test wallet. The imported keys should look like this.

Code:
'imported_keys': {'1QGCxG8cLJQCs5pCMotYBz8PQrA3ZoeXLH': 'h2E+Cbmo/X4ejtwk/jV2FEC6Vop2Kwtz64TKqYXtQPyOHeT7MPKWr7aYu0auPoi9Krnd/ol/cyX9cb0WOcHY4dIRRdmMF+MN3IhaXKEhLL4=', '1BjNG9VwiidPbQJtZvWncLJp5wHWbcQKs2': 'ZTMiqxszvGp8Djgr/bj8zOrgrlOM+Fyu5Zeu0tkjqPt/rrLnciu4WMCmlzBAzQKJ3MYQaHlPrSVMKfPsORlNgInBwXkdrIWgZkDGQaQT/K0=', '1K7sXxxirkpASjsVyVQbqDrqDqXQejaEj1': 'PcXtNIXMfQoeJN5Cx5D1xLQUYFi4aVkYDxq56la0Pq5OnUYsC4VaYijSV1PswHNLKm9vmAgWsyiVqbTIwZMYuO6CTJnWgg893S3GIL1vZt0='}

So the format is:

Code:
'imported_keys': {'address#1': '<encrypted private key for address#1>', 'address#2': '<encrypted private key for address#2>', 'address#3': '<encrypted private key for address#3>'}

So you want to do the steps I explained above and then repeat Step #7 where the first value is the encrypted private key for the address of your choice and the 2nd value is the wallet password. (all imported keys and the seed are protected by the same password.)
(Note: after doing #5 and #6 once, as long as you don't close Electrum, you don't need to do them again)

My Tip Address:
1DXcHTJS2DJ3xDoxw22wCt11FeAsgfzdBU
SirKhaal
Newbie
*
Offline Offline

Activity: 2
Merit: 0


View Profile
February 18, 2021, 04:52:08 AM
 #5

Hi,

I don't know if you are still around dabura667... If so, quick question for you.

I followed your post herto recover an old 2013 electrum.dat file, but I have a small issue:

I remember the password, but the HEX seeds it gives me is not 32 Hex chars (0-9, A-F), but 32 hex codes like "\xc0\x7fR\...." etc. Do you know any way to convert this to chars? I tried the ascii table, etc. but can't find a way to convert it. If I enter this directly in Electrum, it doesn't work.

Please let me know if you know a way to fix this, I would gladly compensate you for your time!

Thanks,

SK
nc50lc
Legendary
*
Offline Offline

Activity: 2408
Merit: 5599


Self-proclaimed Genius


View Profile
February 18, 2021, 06:26:18 AM
 #6

I don't know if you are still around dabura667... If so, quick question for you.
His last login was 2 years ago.

Have you tried to open a copy of it using the latest version? AFAIK, even the latest version 4.0.9 can open old wallets - electrum.dat.
Compatibility issues will arise if it's from very old versions like v0.34 or below.

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
hemzer
Jr. Member
*
Offline Offline

Activity: 43
Merit: 7


View Profile
February 20, 2021, 04:52:33 PM
 #7

Hi,

I don't know if you are still around dabura667... If so, quick question for you.

I followed your post herto recover an old 2013 electrum.dat file, but I have a small issue:

I remember the password, but the HEX seeds it gives me is not 32 Hex chars (0-9, A-F), but 32 hex codes like "\xc0\x7fR\...." etc. Do you know any way to convert this to chars? I tried the ascii table, etc. but can't find a way to convert it. If I enter this directly in Electrum, it doesn't work.

Please let me know if you know a way to fix this, I would gladly compensate you for your time!

Thanks,

SK

"\xc0\x7fR\...."   converts to  "c0 7f        "
Abdussamad
Legendary
*
Offline Offline

Activity: 3612
Merit: 1564



View Profile
February 21, 2021, 01:55:05 PM
 #8

you should use file menu > open in electrum to open a wallet file and not muck about with the json code.
once the file has been opened you can use wallet > seed to get at the seed
SirKhaal
Newbie
*
Offline Offline

Activity: 2
Merit: 0


View Profile
March 17, 2021, 12:11:54 AM
 #9

I think the wallet is too old to be open with the latest version... All I have is an "electrum.dat" file dated im 2013...

If I try to open it with the latest version of electrum, I get this error message:

Code:
Traceback (most recent call last):
  File "electrum\gui\qt\__init__.py", line 245, in wrapper
  File "electrum\gui\qt\__init__.py", line 269, in start_new_window
  File "electrum\gui\qt\__init__.py", line 325, in _start_wizard_to_select_or_create_wallet
  File "electrum\wallet.py", line 2810, in __new__
  File "electrum\wallet.py", line 2654, in __init__
  File "electrum\wallet.py", line 2444, in __init__
  File "electrum\wallet.py", line 273, in __init__
  File "electrum\wallet_db.py", line 1143, in load_addresses
TypeError: list indices must be integers or slices, not str

I tried with the oldest version of the software found on electrum website... It opens but doesn't connect to the server.

Any idea?

Thanks for the help Smiley
nc50lc
Legendary
*
Offline Offline

Activity: 2408
Merit: 5599


Self-proclaimed Genius


View Profile
March 17, 2021, 03:55:58 AM
 #10

I tried with the oldest version of the software found on electrum website... It opens but doesn't connect to the server.

Any idea?
Version 1.8? Try to extract the seed using the menu: "Wallet->Show->Seed", type the password (read the warnings).
Then use that seed phrase to restore your wallet to the latest version.

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
pooya87
Legendary
*
Offline Offline

Activity: 3444
Merit: 10558



View Profile
March 17, 2021, 05:12:59 AM
 #11

I think the wallet is too old to be open with the latest version... All I have is an "electrum.dat" file dated im 2013...
Electrum shouldn't have any problem with any version of its own wallets because the code hasn't changed, it is just updated and when the wallet detects the old wallet version it simply falls back to the old code to use it to decode the file that it was given.
If you have a problem loading that wallet into Electrum then there is a good chance that it is corrupted.

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!