Skip to content

Create Password_cracking.py #11948

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions other/Password_cracking.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
from random import *

Check failure on line 1 in other/Password_cracking.py

View workflow job for this annotation

GitHub Actions / ruff

Ruff (N999)

other/Password_cracking.py:1:1: N999 Invalid module name: 'Password_cracking'

Check failure on line 1 in other/Password_cracking.py

View workflow job for this annotation

GitHub Actions / ruff

Ruff (F403)

other/Password_cracking.py:1:1: F403 `from random import *` used; unable to detect undefined names

Check failure on line 1 in other/Password_cracking.py

View workflow job for this annotation

GitHub Actions / ruff

Ruff (N999)

other/Password_cracking.py:1:1: N999 Invalid module name: 'Password_cracking'

Check failure on line 1 in other/Password_cracking.py

View workflow job for this annotation

GitHub Actions / ruff

Ruff (F403)

other/Password_cracking.py:1:1: F403 `from random import *` used; unable to detect undefined names
import os

u_pwd = input("enter a password")

Check failure on line 4 in other/Password_cracking.py

View workflow job for this annotation

GitHub Actions / ruff

Ruff (I001)

other/Password_cracking.py:1:1: I001 Import block is un-sorted or un-formatted

Check failure on line 4 in other/Password_cracking.py

View workflow job for this annotation

GitHub Actions / ruff

Ruff (I001)

other/Password_cracking.py:1:1: I001 Import block is un-sorted or un-formatted
pwd = [
"a",
"b",
"c",
"d",
"e",
"f",
"1",
"2",
"3",
"4",
"5",
"6",
"g",
"h",
"i",
"j",
"k",
"l",
"m",
"n",
"o",
"p",
"q",
"r",
"s",
"t",
"u",
"w",
"v",
"x",
"y",
"z",
]
pw = ""
while pw != u_pwd:
pw = ""
for letter in range(len(u_pwd)):

Check failure on line 42 in other/Password_cracking.py

View workflow job for this annotation

GitHub Actions / ruff

Ruff (B007)

other/Password_cracking.py:42:9: B007 Loop control variable `letter` not used within loop body

Check failure on line 42 in other/Password_cracking.py

View workflow job for this annotation

GitHub Actions / ruff

Ruff (B007)

other/Password_cracking.py:42:9: B007 Loop control variable `letter` not used within loop body
guess_pwd = pwd[randint(0, 17)]

Check failure on line 43 in other/Password_cracking.py

View workflow job for this annotation

GitHub Actions / ruff

Ruff (F405)

other/Password_cracking.py:43:25: F405 `randint` may be undefined, or defined from star imports

Check failure on line 43 in other/Password_cracking.py

View workflow job for this annotation

GitHub Actions / ruff

Ruff (F405)

other/Password_cracking.py:43:25: F405 `randint` may be undefined, or defined from star imports
pw = str(guess_pwd) + str(pw)
print(pw)
print("cracking password...")
os.system("cls")

Check failure on line 47 in other/Password_cracking.py

View workflow job for this annotation

GitHub Actions / ruff

Ruff (S605)

other/Password_cracking.py:47:9: S605 Starting a process with a shell: seems safe, but may be changed in the future; consider rewriting without `shell`

Check failure on line 47 in other/Password_cracking.py

View workflow job for this annotation

GitHub Actions / ruff

Ruff (S607)

other/Password_cracking.py:47:19: S607 Starting a process with a partial executable path

Check failure on line 47 in other/Password_cracking.py

View workflow job for this annotation

GitHub Actions / ruff

Ruff (S605)

other/Password_cracking.py:47:9: S605 Starting a process with a shell: seems safe, but may be changed in the future; consider rewriting without `shell`

Check failure on line 47 in other/Password_cracking.py

View workflow job for this annotation

GitHub Actions / ruff

Ruff (S607)

other/Password_cracking.py:47:19: S607 Starting a process with a partial executable path
print("your password is-", pw)
Loading