Skip to content

Instantly share code, notes, and snippets.

View Ruzzz's full-sized avatar

Ruslan Zaporojets Ruzzz

View GitHub Profile
@Ruzzz
Ruzzz / winxp_activation_info.vbs
Created April 26, 2014 11:54
Show WinXP activation info
computer = "." ' Current
set wmiService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & computer & "\root\cimv2")
set products = wmiService.ExecQuery("Select * from Win32_WindowsProductActivation")
for each product in products
text = "Machine name: " & product.ServerName & vbCrLf & _
"ProductID: " & product.ProductID & vbCrLf
if product.ActivationRequired = false then _
text = text & "No activation required!" & vbCrLf
text = text & _
product.RemainingGracePeriod & " days remaining before activation of the system is required" & vbCrLf & _
{
"shell_cmd": "g++.exe \"${file}\" -O2 -std=c++0x -s -static -o \"${file_path}\\\\${file_base_name}\"",
"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
"path" : "%PATH%;c:\\mingw64\\bin\\",
"working_dir": "${file_path}",
"selector": "source.c, source.c++, source.cpp",
"variants":
[
{
"name": "Run",
#include <windows.h>
#include <stdio.h>
#define RVATOVA(base,offset) ((LPVOID)((DWORD)(base)+(DWORD)(offset)))
#define VATORVA(base,offset) ((LPVOID)((DWORD)(offset)-(DWORD)(base)))
BOOL IsDllExistsInExport(IN HMODULE _hModule, const IN PCHAR DllName)
{
HMODULE hModule = _hModule;
if (hModule == NULL)
@Ruzzz
Ruzzz / andrd_prepcert.bat
Created August 24, 2015 17:29
Prepare certificate with public key in PEM (text) or DER (binary) formats for Android /system/etc/security/cacerts
:: Contact: ruzzzua@gmail.com
:: Version: 2015.08.14
:: Dependencies: OpenSSL
@echo off
if "%1"=="" goto :USAGE
if "%1"=="-der" goto :DER
:PEM
@Ruzzz
Ruzzz / convcert.bat
Created August 24, 2015 17:30
Convert x509 certificate from DER or PEM format to another format.
:: Contact: ruzzzua@gmail.com
:: Version: 2015.08.14
:: Dependencies: OpenSSL
@echo off
if "%1"=="" goto :USAGE
if "%2"=="" goto :USAGE
if "%1"=="-toder" goto :TODER
@Ruzzz
Ruzzz / andrd_emltr_root.bat
Last active November 25, 2021 01:01
Root for Android SDK Emulator
:: Contact: ruzzzua@gmail.com
:: Version: 2015.08.17
:: Dependencies: Android Debug Bridge (adb)
@echo off
set path="c:\Program Files\Android\android-sdk\platform-tools\";%path%
set abi=arm
:: adb remount
:: adb shell mount -o rw,remount -t yaffs2 /dev/block/mtdblock03 /system
:: Contact: ruzzzua@gmail.com
:: Version: 2015.08.25
:: Dependencies: Android Debug Bridge (adb), IDA
@echo off
set path="c:\Program Files\Android\android-sdk\platform-tools\";%path%
set port=23946
adb push android_server /system/xbin/android_server
adb shell chmod 06755 /system/xbin/android_server
set APP_NAME=Opera 12 for Safe Browsing
set APP_PATH=%UserProfile%\AppData\LocalLow\Opera 12 for Safe Browsing\opera.exe
set PORT=11011
netsh advfirewall firewall add rule name="%APP_NAME% (TCP-Out) Block All" dir=out action=block program="%APP_PATH%" protocol=tcp
netsh advfirewall firewall add rule name="%APP_NAME% (UDP-Out) Block All" dir=out action=block program="%APP_PATH%" protocol=udp
netsh advfirewall firewall add rule name="%APP_NAME% (TCP-Out)" dir=out action=allow program="%APP_PATH%" remoteip=127.0.0.1 remoteport=%PORT% protocol=tcp
netsh advfirewall firewall add rule name="%APP_NAME% (UDP-Out)" dir=out action=allow program="%APP_PATH%" remoteip=127.0.0.1 remoteport=%PORT% protocol=udp