Python Forum
Brute Force Pad Lock Guesser
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Brute Force Pad Lock Guesser
#5
zfill is the answer:

#!/usr/bin/env python3
#PadLockGuesser.py

lockCombo = 1080

#brute force pad lock guesser with while loop:
guess = 0
while guess <= lockCombo:
    #guess += 1#placing the guess incrementor here causes 0 to not be one of the guesses
    if guess == lockCombo:
        print("After " + str(guess) + " guesses, the correct combo is " + str(guess))
        break
    else:
        print(str(guess).zfill(4) + " is not the correct combo. Trying next guess.")
        guess += 1#placing the guess incrementor here causes the program to stop guessing at 1079
        continue
Reply


Messages In This Thread
Brute Force Pad Lock Guesser - by RedSkeleton007 - Feb-25-2018, 06:23 AM
RE: Brute Force Pad Lock Guesser - by ka06059 - Feb-26-2018, 06:48 AM
RE: Brute Force Pad Lock Guesser - by buran - Feb-28-2018, 11:53 AM
RE: Brute Force Pad Lock Guesser - by RedSkeleton007 - Mar-03-2018, 07:42 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Need an alternative to brute force optimization loop jmbonni 5 1,284 Dec-07-2023, 12:28 PM
Last Post: RockBlok
  Solving an equation by brute force within a range alexfrol86 3 2,875 Aug-09-2022, 09:44 AM
Last Post: Gribouillis
  force a program to exit ? Armandito 3 2,607 May-12-2022, 04:03 PM
Last Post: Gribouillis
  How to use scipy.optimization.brute for multivariable function Shiladitya 9 6,380 Oct-28-2020, 10:40 PM
Last Post: scidam
  best way to force an exception Skaperen 2 2,099 Oct-21-2020, 05:59 AM
Last Post: Gribouillis
  I need advise with developing a brute forcing script fatjuicypython 11 5,225 Aug-21-2020, 09:20 PM
Last Post: Marbelous
  Cant find root cause of thread.lock error burlyboys 0 1,577 May-18-2020, 12:51 PM
Last Post: burlyboys
  Force calculation result as decimal vercetty92 4 2,926 Mar-20-2019, 02:27 PM
Last Post: vercetty92
  Password Brute Force 2skywalkers 9 5,469 Oct-18-2018, 02:35 PM
Last Post: buran
  Brute Force Password Guesser 2skywalkers 1 3,219 Oct-05-2018, 08:04 PM
Last Post: ichabod801

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020