Skip to content

Instantly share code, notes, and snippets.

View Deathcrash's full-sized avatar
💭
What's happening?

No_name Deathcrash

💭
What's happening?
View GitHub Profile
@Deathcrash
Deathcrash / audio_play.py
Last active June 29, 2023 10:55
audio play python
from gtts import gTTS
import os
import subprocess
from subprocess import check_output
text = "Global warming is the long-term rise in the average temperature of the Earth’s climate system"
language = "en"
speech = gTTS(text=text, lang=language, slow=False)
speech.save("text.mp3")
os.system('nircmd mediaplay 10000 text.mp3')
@Deathcrash
Deathcrash / pyperclip.py
Last active June 29, 2023 10:54
pyperclip
import pyperclip
while True:
pyperclip.waitForNewPaste(666)
x = pyperclip.paste()
print(x)
@Deathcrash
Deathcrash / Proxycheker.py
Last active June 29, 2023 10:54
Proxy cheker
proxies = []
for proxy in proxies:
response = requests.get(proxies=proxy)
if response.status_code == requests.codes['ok']:
break
response.text
@Deathcrash
Deathcrash / currency.py
Last active June 29, 2023 10:54
currency
import requests
url_change = 'https://openexchangerates.org/api/latest.json?app_id=565db73ce703480cb8d8849e32f32035'
r = requests.get(url_change)
r = r.json()
print(r["rates"]["CNY"])
@Deathcrash
Deathcrash / proxy_double.py
Last active June 29, 2023 10:53
proxy double
while True:
r = requests.get(url1, headers=HEADERS, params=PARAMS, proxies=PROXY[pr_count])
print(r.status_code)
if r.status_code == 429:
pr_count += 1
r = requests.get(url1, headers=HEADERS, params=PARAMS, proxies=PROXY[pr_count])
print(r.status_code)
pr_count = 0
if r.status_code == 429:
time.sleep(120)
@Deathcrash
Deathcrash / try_count_loop.py
Last active June 29, 2023 10:53
try count loop
import time
error = 0
while True:
time.sleep(1)
try:
if error == 0:
i = input("input good or bad if ")
@Deathcrash
Deathcrash / port_scanner.py
Last active June 29, 2023 10:53
Port Scanner python
# war 1
import socket
def scan_port(ip,port):
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.settimeout(0.5)
try:
connect = sock.connect((ip,port))
print('Port :',port,' its open.')
sock.close()
@Deathcrash
Deathcrash / list_adden.py
Last active June 29, 2023 10:52
List adden
start_parse_type = input("Select the type of gun to start parsing.\n\n"
"1 - all weapon\n"
"2 - Custom weapon\n"
"Please enter: ")
type_list = ['machinegun', 'smg', 'pistol', 'rifle', 'shotgun']
parse_list = []
if int(start_parse_type) == 1:
for i in type_list:
print(i)
@Deathcrash
Deathcrash / youtube_dll.py
Last active June 29, 2023 10:52
YouTube Dll donwload
format = video_format_id_1
link_mess = video_url_1
print(link_mess)
chat_id = call.message.chat.id # автор сообщения
limit = 0
# код для проверки лимита на скачивание у пользователя
cursor = connect.execute(f'''SELECT day_limit
FROM users
WHERE chat_id = {chat_id}''')
@Deathcrash
Deathcrash / aiogram_sub_cheker.py
Last active June 29, 2023 10:51
Aiogram Sub Checker
async def suber(us_mission_count, cnt, count_channel, user_id, prize_num):
# проверяем количество подписок юзера если 0 выходим из функции
if us_mission_count != 0:
await asyncio.sleep(1)
print(cnt)
cursors = connect.execute(f'''SELECT url, chat_id FROM posts ''')
# проверяем заранее количество каналов для обязательной подписки
ch_count = 0
check_user_subctibe = 0 # проверяем на сколько каналов подписан пользователь
for channel in cursors: