Skip to content

Instantly share code, notes, and snippets.

View Toshakins's full-sized avatar
👽
experience tranquility

Anton Ovinnikov Toshakins

👽
experience tranquility
View GitHub Profile
@Toshakins
Toshakins / PowerView-3.0-tricks.ps1
Created May 28, 2021 20:26 — forked from HarmJ0y/PowerView-3.0-tricks.ps1
PowerView-3.0 tips and tricks
# PowerView's last major overhaul is detailed here: http://www.harmj0y.net/blog/powershell/make-powerview-great-again/
# tricks for the 'old' PowerView are at https://gist.github.com/HarmJ0y/3328d954607d71362e3c
# the most up-to-date version of PowerView will always be in the dev branch of PowerSploit:
# https://github.com/PowerShellMafia/PowerSploit/blob/dev/Recon/PowerView.ps1
# New function naming schema:
# Verbs:
# Get : retrieve full raw data sets
# Find : ‘find’ specific data entries in a data set
@Toshakins
Toshakins / kerberos_attacks_cheatsheet.md
Created May 27, 2021 20:08 — forked from TarlogicSecurity/kerberos_attacks_cheatsheet.md
A cheatsheet with commands that can be used to perform kerberos attacks

Kerberos cheatsheet

Bruteforcing

With kerbrute.py:

python kerbrute.py -domain <domain_name> -users <users_file> -passwords <passwords_file> -outputfile <output_file>

With Rubeus version with brute module:

@Toshakins
Toshakins / destructuring.js
Created March 21, 2021 16:41
домашка
// интро
// например есть
const example = {'question': 'anwer'}
let question;
// тогда можно написать expression
({question} = example);
console.log(question);
@Toshakins
Toshakins / big_migration.py
Created September 18, 2020 17:47
Run big migration with data from CSV file
import csv
from django.core import management
from django.core.management import BaseCommand
class Command(BaseCommand):
def add_arguments(self, parser):
parser.add_argument('csv_path', nargs='?', type=str)
@Toshakins
Toshakins / __main__.py
Created August 7, 2020 12:28
employeefication
import random
from itertools import count, takewhile
names = ["Френк", "Клер", "Зоя", "Питер", "Лукас"]
def employee():
name = random.choice(names)
return name
# Менять можно только код ниже,
# функцию employee() не трогаем
@Toshakins
Toshakins / dj_redis.py
Created June 12, 2020 21:02
django redis test case
from uuid import uuid4
from django.conf import settings
from django.test import SimpleTestCase
from django.utils.decorators import classproperty
def _generate_record(host, port):
return {
@Toshakins
Toshakins / __main__.py
Created May 31, 2020 12:10
Event loop inside threads, Python
import asyncio
import concurrent
import threading
from concurrent.futures import as_completed, ThreadPoolExecutor
from itertools import zip_longest
from random import random
async def subwork(i):
slept = random() % 1
await asyncio.sleep(slept)
@Toshakins
Toshakins / timer.py
Last active May 5, 2020 11:24
Python Benchmark Decorator and Context Manager
import gc
import time
def readable_time():
return time.strftime('%Y %b %d %H:%M:%S +0000',
time.gmtime(time.time()))
class Timer:
def __init__(self, scope):
self.scope = scope or '===='
@Toshakins
Toshakins / architectures.md
Last active February 12, 2020 21:30
FaaS providers thoughts

Architectures

Compute as glue

Glue several services together with FaaS. Example: direct S3 upload triggers a function which invokes Rekognition, after that the result is saved by another function to the DynamoDB.

Backends

Literally the architecture that responds to HTTP calls. Youcan organize it in various ways too.

  • One function for whole service
  • Several functions for the service