Skip to content

Instantly share code, notes, and snippets.

View lukifer195's full-sized avatar

Trí lukifer195

View GitHub Profile
@lukifer195
lukifer195 / sample.spec
Created July 30, 2020 07:54
khung installer python
#!/usr/bin/python
#-*- coding:utf-8 -*-
################### EDIT ############################################
block_cipher = None
name = 'Lock' # <o> Name exe
path = 'D:\\Desktop\\PyProject\\Linh tinh\\Lock Folder project\\one file lock\\Lock.py' # <o> Path .py
shell = True # <o> console appear
iconname = 'icon.ico' # name icon make sure type .ico
data = [(iconname,'D:\\Downloads\\icon\\'+iconname,'DATA')] # change path icon if need
@lukifer195
lukifer195 / get POS mouse.py
Created July 30, 2020 07:41
Get current position mouse
import pyautogui
aa = pyautogui.position()
print(aa)
@lukifer195
lukifer195 / Check duplicated.py
Created July 30, 2020 07:40
Check duplicated file by some array bytes
import os,glob
def br(data):
print(data*80)
#==============================================#
folder_path = r'D:\Downloads'
#==============================================#
set_compare = set()
@lukifer195
lukifer195 / TurnOffScreen.py
Created July 30, 2020 07:38
Turn monitor off
import sys
if sys.platform.startswith('linux'):
import os
os.system("xset dpms force off")
elif sys.platform.startswith('win'):
import win32gui
import win32con
@lukifer195
lukifer195 / tool-hwnd.py
Created July 30, 2020 07:36
Enum all window hwnd , title , visible
import win32gui
import win32con
import sys
def get_windows():
def sort_windows(windows):
sorted_windows = []
# Find the first entry
for window in windows:
@lukifer195
lukifer195 / Regconize_command.py
Created July 30, 2020 07:35
Hook mouse & keyboard and hide all interface apps window until recognize pass(5s unlock)
import pythoncom, pyHook
import time
import win32api
import win32gui
import win32con
import threading
import sys
isStop = False
list_wd = []
@lukifer195
lukifer195 / RAMnotification.py
Created July 30, 2020 07:30
Manager CPU and Ram
import psutil
from plyer import notification
import pynput.keyboard as keyboard
from pynput.keyboard import Key, Listener , Controller
from time import sleep as sleep
import subprocess
import os
import threading, pynput, time
def shownoti():
@lukifer195
lukifer195 / md5.py
Created July 30, 2020 07:27
Convert string input to hash via arg
import hashlib
import sys
import os
if __name__ == '__main__':
try:
arg0 = sys.argv[1]
hash_object = hashlib.sha1(arg0.encode())
@lukifer195
lukifer195 / Volcabulary note.py
Created July 30, 2020 07:24
Tra từ điển trên window
#!/usr/bin/env python
#-*- coding: utf-8 -*-
import os
import sys
from time import sleep
import random
def input_more(text):
sys.stdout.write('Meaning: ')
@lukifer195
lukifer195 / clipboard.py
Created July 30, 2020 07:23
Get text clipboard
import ctypes
CF_TEXT = 1
kernel32 = ctypes.windll.kernel32
kernel32.GlobalLock.argtypes = [ctypes.c_void_p]
kernel32.GlobalLock.restype = ctypes.c_void_p
kernel32.GlobalUnlock.argtypes = [ctypes.c_void_p]
user32 = ctypes.windll.user32
user32.GetClipboardData.restype = ctypes.c_void_p