Skip to content

Instantly share code, notes, and snippets.

Avatar

Viktor Oreshkin stek29

  • None
  • Moscow, Russia
View GitHub Profile
View maze.py
from enum import Enum
class CellState(Enum):
non_visited, block, visited, last_cell = range(4)
def __repr__(self):
return self.name[0].upper()
class Done(Exception):
pass
View spiral.py
from __future__ import print_function
if 3/2 == 1:
input = raw_input
range = xrange
pretty_print = True
N = int(input())
@stek29
stek29 / GDHf-1.cpp
Last active Mar 1, 2017
null created by stek291 - https://repl.it/GDHf/1
View GDHf-1.cpp
#include <iostream>
#include <string>
using namespace std;
int main(void) {
cout <<
"#include <iostream>\n"\
"#include <string>\n"\
"using namespace std;\n"\
"template < size_t N > struct Q { \n"\
View tl_master.py
# for json
import json
from collections import OrderedDict
# for tl
import re
import struct
import binascii
__all__ = [
@stek29
stek29 / SpeakToGo.md
Last active May 2, 2017
SpeakToGo toys
View SpeakToGo.md

remote-control.js and node-server.js

  • npm install websocket, node node-server.js
  • Open your-pc-ip:8980 on mobile phone (lock portrait orientation on it).
  • Paste remote-control.js to Console
  • Tilt to look around, tap to click in center

pure-luck.js

I'm feeling lucky just picks location from 55 hardcoded ones. But with this it would pick random coords, and open them, when you say I'm feeling so lucky.

@stek29
stek29 / pip-alpha.js
Created May 4, 2017
Frida Script to tweak PIP window alpha level on macOS
View pip-alpha.js
'use strict';
const getExport = function (module, name) {
const addr = Module.findExportByName(module, name);
if (!addr) throw ("Can't find export " + name);
else return addr;
}
const getCGFunction = function (name, returnType, argTypes) {
return (new NativeFunction(getExport('CoreGraphics', name), returnType, argTypes));
}
View listwindows.mm
// Very simple program to print all windows
// Obviously needs `-framework CoreGraphics -framework Foundation`
#import "CoreGraphics/CoreGraphics.h"
#import "Foundation/Foundation.h"
int main(void) {
NSArray *arr = [(NSArray *) CGWindowListCopyWindowInfo(kCGWindowListOptionAll, kCGNullWindowID) copy];
NSLog(@"%@", arr);
return 0;
}
@stek29
stek29 / cloner.py
Last active Oct 27, 2017
t.me/stickerclonerbot -- Can somebody host this?
View cloner.py
import requests
import io
from PIL import Image
import re
from queue import Queue
import threading
class BotException(Exception):
pass
View vk_no_cyrillic.php
<?php
if (!isset($_REQUEST)) {
return;
}
class ConfigSomeGroup {
public function shouldDelete($object) {
/* delete cyrillic text */
$comment_text = $object->text;
@stek29
stek29 / ZZZpanic.txt
Last active Dec 15, 2017
setuid(0) with async_wait
View ZZZpanic.txt
panic(cpu 0 caller 0xfffffff00a18b574): "shenanigans!"@/BuildRoot/Library/Caches/com.apple.xbs/Sources/Sandbox_executables/Sandbox-765.20.5.0.1/src/kext/evaluate.c:2674
Debugger message: panic
Memory ID: 0x6
OS version: 15B202
Kernel version: Darwin Kernel Version 17.2.0: Fri Sep 29 18:14:51 PDT 2017; root:xnu-4570.20.62~4/RELEASE_ARM64_T7000
KernelCache UUID: ---who needs dis---
iBoot version: iBoot-4076.20.48
secure boot?: YES
Paniclog version: 8
Kernel slide: 0x0000000003a00000