This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; ================================================= | |
; Password protected x64 TCP Reverse Shell | |
; Author: Alan Vivona | |
; ================================================= | |
global _start | |
; Syscall numbers | |
syscalls.socket equ 0x29 | |
syscalls.bind equ 0x31 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function ordutf8_step1(string $char) : int | |
{ | |
$code = ord(substr($char, 0, 1)); | |
if ($code >= 128) { | |
if ($code < 224) | |
$bytesnumber = 2; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Convert number given as string to the proper type (int or float). | |
* https://secure.php.net/manual/en/language.types.type-juggling.php | |
* | |
* @param string $string Number as string ex '1.0', '0.9' etc | |
* @return int|float | |
*/ | |
function strtonum(string $string) | |
{ | |
if (fmod((float)$string, 1.0) === 0.0){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Check if value is between given range. | |
* | |
* @param mixed $value | |
* @param mixed $min | |
* @param mixed $max | |
* | |
* @return bool | |
*/ | |
function in_range($value, $min, $max): bool { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import hashlib as hasher | |
import datetime as date | |
# Define what a Snakecoin block is | |
class Block: | |
def __init__(self, index, timestamp, data, previous_hash): | |
self.index = index | |
self.timestamp = timestamp | |
self.data = data | |
self.previous_hash = previous_hash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//change for point to correct directory | |
include '../linna-array/src/TypedArray.php'; | |
include '../linna-array/src/TypedObjectArray.php'; | |
use Linna\TypedArray; | |
use Linna\TypedObjectArray; | |
$cicles = 500000; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Get appropriate cost | |
* | |
* This code will benchmark your server to determine how high of a cost you can | |
* afford. You want to set the highest cost that you can without slowing down | |
* you server too much. | |
* | |
* @param int $time_limit Time limit in milliseconds | |
* @param int $algo Algoritm, default PASSWORD_DEFAULT | |
* @return int |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Flatten an array | |
* Example array [1, [2, 3, 4], [5, 6], [7, [8, 9]], 10] becomes | |
* [1, 2, 3, 4, 5, 6, 7, [8, 9], 10] | |
* Work only for one level | |
* | |
* @param array $array Array to flatten | |
* @return array | |
*/ | |
function array_flatten(array $array): array |