This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
from sys import argv, exit as sexy_exit | |
#~ Script to update the password on a NZBget server by finding a very specific username | |
def setPassword(printX, serverURL = None, username = None, password = None, servername = None): | |
r = requests.post(serverURL, json = {'method':'loadconfig','params':[]}) | |
if r.status_code != 200: | |
printX('Assuming auth misconfig') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from UA import firefox | |
from time import sleep | |
import requests | |
class nineKWclientException(Exception): | |
pass | |
class nineKWclient(object): | |
def __init__(self, APIKEY): | |
self.APIKEY = APIKEY |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import configparser | |
s = requests.session() | |
from sys import exit | |
import argparse | |
parser = argparse.ArgumentParser(prog='piTunes',formatter_class=argparse.RawTextHelpFormatter, description='This python script is the work of @spookyahell.\n'+ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'''Licensed under the MIT License :)''' | |
import pefile | |
import pprint | |
pe = pefile.PE('example.exe') | |
string_version_info = {} | |
for fileinfo in pe.FileInfo[0]: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from os import listdir, sep | |
from os.path import isfile, isdir, join | |
import zipfile | |
import time | |
from sys import stdout | |
zip_filename = time.strftime('pythonBackup-%Y%m%d-%H%M%S.zip') | |
zf = zipfile.ZipFile(zip_filename,'w') | |
archive_these = {r'C:\Users\XYZ\Desktop\Python':'PythonFilesOnDesktop'} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pefile | |
import pprint | |
def get_version_info(file): | |
pe = pefile.PE(file) | |
string_version_info = {} | |
for fileinfo in pe.FileInfo[0]: | |
if fileinfo.Key.decode() == 'StringFileInfo': |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from telegram import InlineKeyboardButton, InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove | |
from telegram.ext import CommandHandler, Updater, CallbackQueryHandler, Filters, MessageHandler | |
import os | |
import json | |
import logging | |
import requests | |
import re | |
from urllib.parse import unquote | |
'''Transfer.shBot operating on Telegram: @transfersh2bot |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'''The simplest of all TTML to SRT subtitle converters, might not work in every case but it works for me''' | |
from xmltodict import parse | |
import json | |
def zfillseconds(input): | |
secondsP1, secondsP2 = input.split(',') | |
secondsP1 = secondsP1.zfill(2) | |
while len(secondsP2) != 3: | |
secondsP2 += '0' | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re | |
from copy import copy | |
def convertToDotted(stri): | |
output = '' | |
previous_char = None | |
for char in stri: | |
x = re.fullmatch(r'\w', char) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
def CheckNet(source = 'F'): | |
sources = {'G':'https://www.google.com','F':'http://detectportal.firefox.com/success.txt'} | |
find_in_text = {'G':'maxlength="2048" name="q"','F':'success'} | |
if source in sources: | |
src = sources[source] | |
else: | |
raise NotImplementedError('Source unavailable') | |
try: |