Skip to content

Instantly share code, notes, and snippets.

View skorotkiewicz's full-sized avatar
💻
Programming

Sebastian Korotkiewicz skorotkiewicz

💻
Programming
View GitHub Profile
@skorotkiewicz
skorotkiewicz / App.jsx
Created April 22, 2021 13:01
React Keypress Hook
import useKeypress from "./useKeypress";
useKeypress("Escape", () => {
console.log("<kbd>ESC</kbd> pressed")
})
@skorotkiewicz
skorotkiewicz / vpn.md
Last active February 19, 2021 21:08 — forked from joepie91/vpn.md
Don't use VPN services. (Polska wersja)

Nie korzystaj z usług VPN.

Nie, poważnie, nie. Prawdopodobnie czytasz to, ponieważ spytałeś, z jakiej usługi VPN korzystać i to jest właśnie odpowiedź.

Uwaga: Zawartość tego postu nie ma zastosowania do używania VPN zgodnie z przeznaczeniem, to znaczy jako wirtualna sieć prywatna (wewnętrzna). Dotyczy to tylko używania jej jako proxy, co robi każdy inny "dostawca VPN".

Rosyjskie tłumaczenie tego artykułu można znaleźć tutaj, autorstwa Timura Demina. Jest też ten artykuł o usługach VPN, który jest lepiej napisany (i ma więcej zdjęć kotów!) niż mój artykuł.

Dlaczego nie?

Trying to deploy WPA3 on my home network

Introduction

Recently, news broke about a new possible offline attack on WPA2 using PMKID. To summarize the attack, WPA2 protected APs can end up broadcasting PMKID values which can then be used to offline-brute-force the password.

These PMKID values are computed this way:

PMKID = HMAC-SHA1-128(PMK, "PMK Name" | MAC_AP | MAC_STA)
@skorotkiewicz
skorotkiewicz / README.md
Last active February 11, 2020 14:56
Simple captcha written in php

Simple captcha written in php

Usage:

if ( implode($_SESSION['captcha']) !== $_POST['captcha'] ) {
	die('Captcha incorrect')
} else {
@skorotkiewicz
skorotkiewicz / telnet_server.php
Last active January 25, 2020 20:36
PHP Telnet Server with commands
<?php
set_time_limit(0);
$socketMain = socket_create(AF_INET, SOCK_STREAM, 0) or die();
socket_set_option($socketMain, SOL_SOCKET, SO_REUSEADDR, 1) or die();
socket_bind($socketMain, '127.0.0.1', '1234') or die();
socket_listen($socketMain, 5) or die();
$clients = array();
while(true){
$read = array();
$read[0] = $socketMain;
@skorotkiewicz
skorotkiewicz / imgur-cli.php
Last active January 23, 2020 14:57
A simple and quick way to send a image to Imgur from Terminal. Required php-cli and php-curl.
#!/usr/bin/php
<?php
/**
* Quick info
*
* 1. Replace or use API Key provided by Bart.
* 2. # mv imgur-cli.php imgur
* 3. # chmod +x imgur
* 4. # mv imgur /usr/bin
@skorotkiewicz
skorotkiewicz / README.md
Last active January 22, 2020 23:56
Abfallentsorgungsplan grafischer Kalender Generator in PHP

Abfallentsorgungsplan grafischer Kalender Generator in PHP

Ein einfaches und sehr bequemes Skript, um einen fertigen grafischer Kalender mit Abfallentsorgungsplan zu generieren und ausdrucken.

Jedes Jahr habe ich immer einen solchen Plan erstellt, was ziemlich eintönig und zeitraubend ist. Deshalb habe ich dieses Skript erstellt.

Einfach alle Termine eingeben im Format: TT.MM TT.MM usw.

@skorotkiewicz
skorotkiewicz / archlinux
Created September 17, 2019 21:56
Install Archlinux + LUKS
cgdisk /dev/sdb
# Setup Partitions
# /dev/sdb GPT
# /dev/sdb1 Flags ESP/Boot
# /dev/sdb2 100% size root partiton
cryptsetup luksFormat -v -s 512 -h sha512 /dev/sdb2
cryptsetup open /dev/sdb2 luks_root

Keybase proof

I hereby claim:

  • I am skorotkiewicz on github.
  • I am modinfo (https://keybase.io/modinfo) on keybase.
  • I have a public key ASC5zy1v9Wn4Is9YyYbgWWJjN3yZkPm3IpcOCwNexit21wo

To claim this, I am signing this object: