Skip to content

Instantly share code, notes, and snippets.

View MrZombie69232's full-sized avatar
🎯
Focusing

Satyam Suman MrZombie69232

🎯
Focusing
View GitHub Profile
@MrZombie69232
MrZombie69232 / pass_checker.py
Created February 26, 2021 19:03
A python program to check your password is pwned or not
import requests
import hashlib
import sys
# Creating a function to request api data
def request_api_data(query_char):
url = 'https://api.pwnedpasswords.com/range/'+ query_char
res = requests.get(url) # Sending request to api
if res.status_code != 200:
raise RuntimeError(f'Error fetching:{res.status_code},check the api and try again')
@MrZombie69232
MrZombie69232 / csv_func.py
Created September 1, 2020 18:20
reads csv files
# creating function to split header
def parse_headers(header_line):
return header_line.strip().split(',')
# function to replace missing values
def parse_values(data_line):
values = []
for items in data_line.strip().split(','):
if items == '': # check if there is an empty string
values.append(0.0)
else: