immunio 1.0.12 → 1.0.13
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/immunio/version.rb +1 -1
- data/lua-hooks/Makefile +12 -6
- data/lua-hooks/ext/all.c +2 -0
- data/lua-hooks/ext/libinjection/lualib.c +24 -4
- data/lua-hooks/ext/sha2/luasha256.c +75 -0
- data/lua-hooks/ext/sha2/sha256.c +196 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d5de4fe5e22b12a72cb97953b87a947c447f0803
|
4
|
+
data.tar.gz: 3c004b6a90391a8b23fe5d54b48bf770adbd4c01
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5a94e59b6b6e0defbdb18aa08b955de7ce3700c053b2f8f247db61931dd67ff788379584c791503d844d47c220e394aa93e753d7f40953220683199e6a05be1c
|
7
|
+
data.tar.gz: 83ad5fc59f7bd320e2881f11bcbdad261c21a2734645921c4df4ab58e5849b167c0d6e2905d5eb242c6fee76711bb9d215b7ba1a2c37fd6ecfe4c65bb3b00868
|
data/lib/immunio/version.rb
CHANGED
data/lua-hooks/Makefile
CHANGED
@@ -20,8 +20,8 @@ LUA_SRC = \
|
|
20
20
|
lib/date.lua \
|
21
21
|
lib/defence.lua \
|
22
22
|
lib/diag.lua \
|
23
|
-
lib/escape.lua \
|
24
23
|
lib/extensions.lua \
|
24
|
+
lib/hmac.lua \
|
25
25
|
lib/hooks.lua \
|
26
26
|
lib/idn.lua \
|
27
27
|
lib/lexgraph.lua \
|
@@ -59,12 +59,15 @@ LUA_SRC = \
|
|
59
59
|
lib/hooks/http_response_start.lua \
|
60
60
|
lib/hooks/should_report.lua \
|
61
61
|
lib/hooks/sql_execute.lua \
|
62
|
-
lib/hooks/template_render_done.lua
|
62
|
+
lib/hooks/template_render_done.lua \
|
63
|
+
lib/hooks/xss/escape.lua \
|
64
|
+
lib/hooks/xss/escape_js.lua
|
63
65
|
|
64
66
|
OBJ = ${SRC:.c=.o}
|
65
67
|
|
66
68
|
SHA1OBJ = ext/sha1/sha1.o
|
67
|
-
|
69
|
+
SHA2OBJ = ext/sha2/sha256.o
|
70
|
+
OBJ = ${SRC:.c=.o} ${SHA1OBJ} ${SHA2OBJ}
|
68
71
|
|
69
72
|
# Library archive. Used for compiling along agent bindings.
|
70
73
|
SO_OUT = libimmunio.so
|
@@ -99,7 +102,7 @@ endif
|
|
99
102
|
# Build lua, run tests, and create hooks archive
|
100
103
|
all: ${CLI} ${INIT_HOOK} ${HOOKS_TARBALL} ${HOOKS_SRCS_TARBALL}
|
101
104
|
|
102
|
-
|
105
|
+
%.o: %.c
|
103
106
|
MACOSX_DEPLOYMENT_TARGET="10.9" ${CC} ${CFLAGS} -c ${INCS} -o $@ $<
|
104
107
|
|
105
108
|
# There is a huge performance advantage compiling sha1.o with just -O
|
@@ -107,6 +110,9 @@ all: ${CLI} ${INIT_HOOK} ${HOOKS_TARBALL} ${HOOKS_SRCS_TARBALL}
|
|
107
110
|
${SHA1OBJ}:
|
108
111
|
${CC} -O -c ${INCS} -o ${SHA1OBJ} ${SHA1OBJ:.o=.c}
|
109
112
|
|
113
|
+
${SHA2OBJ}:
|
114
|
+
${CC} -O -c ${INCS} -o ${SHA2OBJ} ${SHA2OBJ:.o=.c}
|
115
|
+
|
110
116
|
${SO_OUT}: ${OBJ} ${LUAJIT_OBJ}
|
111
117
|
${CC} -shared ${CFLAGS} ${LIBS} -o $@ -lc $^
|
112
118
|
|
@@ -121,7 +127,7 @@ ${LUAJIT_OBJ}:
|
|
121
127
|
|
122
128
|
# Build lua executable for testing and compilation
|
123
129
|
# Seperate compilation as we need the LUA_UNSAFE_MODE flag set...
|
124
|
-
${CLI}: ${CLI_SRC} ${LUAJIT_OBJ} ${SHA1OBJ}
|
130
|
+
${CLI}: ${CLI_SRC} ${LUAJIT_OBJ} ${SHA1OBJ} ${SHA2OBJ}
|
125
131
|
${CC} ${CFLAGS} -DLUA_UNSAFE_MODE ${INCS} -o $@ $^ ${LIBS}
|
126
132
|
|
127
133
|
# Concatenate init hooks into one __init__.lua hook with two newlines in between
|
@@ -146,7 +152,7 @@ cleanhooks:
|
|
146
152
|
rm -f build/*.lua
|
147
153
|
|
148
154
|
clean: cleanhooks
|
149
|
-
rm -f ${CLI} ${OBJ} ${SO_OUT} ${A_OUT} ${LUAJIT_OUT} ${SHA1OBJ}
|
155
|
+
rm -f ${CLI} ${OBJ} ${SO_OUT} ${A_OUT} ${LUAJIT_OUT} ${SHA1OBJ} ${SHA2OBJ}
|
150
156
|
cd ext/luajit && make clean
|
151
157
|
rm -f test_failed
|
152
158
|
rm -rf build
|
data/lua-hooks/ext/all.c
CHANGED
@@ -16,6 +16,7 @@
|
|
16
16
|
#include "lua-cmsgpack/lua_cmsgpack.c"
|
17
17
|
#include "lua-snapshot/snapshot.c"
|
18
18
|
#include "sha1/luasha1.c"
|
19
|
+
#include "sha2/luasha256.c"
|
19
20
|
|
20
21
|
static const luaL_Reg lj_lib_load[] = {
|
21
22
|
// Default Lua modules
|
@@ -44,6 +45,7 @@ static const luaL_Reg lj_lib_load[] = {
|
|
44
45
|
{LUACMSGPACK_NAME, luaopen_cmsgpack},
|
45
46
|
{"snapshot", luaopen_snapshot},
|
46
47
|
{"sha1", luaopen_sha1},
|
48
|
+
{"sha2", luaopen_sha256},
|
47
49
|
|
48
50
|
{ NULL, NULL }
|
49
51
|
};
|
@@ -1,3 +1,5 @@
|
|
1
|
+
#include <stdlib.h>
|
2
|
+
|
1
3
|
#define LUA_LIB
|
2
4
|
#include "lua.h"
|
3
5
|
#include "lauxlib.h"
|
@@ -5,7 +7,7 @@
|
|
5
7
|
#include "libinjection.h"
|
6
8
|
#include "libinjection_sqli.h"
|
7
9
|
|
8
|
-
#define
|
10
|
+
#define MAX_FINGERPRINT_STACK_SIZE 4096
|
9
11
|
|
10
12
|
int sqli(lua_State *L) {
|
11
13
|
sfilter state;
|
@@ -22,16 +24,31 @@ int sqli(lua_State *L) {
|
|
22
24
|
}
|
23
25
|
|
24
26
|
int fingerprint(lua_State *L) {
|
25
|
-
char
|
27
|
+
char stack_result[MAX_FINGERPRINT_STACK_SIZE];
|
28
|
+
char *result = stack_result;
|
26
29
|
struct libinjection_sqli_state state;
|
27
30
|
size_t slen = 0;
|
28
31
|
const char *input = luaL_checklstring(L, 1, &slen);
|
29
32
|
|
30
33
|
libinjection_sqli_init(&state, input, slen, 0);
|
31
34
|
|
32
|
-
//
|
35
|
+
// libinjection tokenizes in a streaming fashion, meaning we won't know until
|
36
|
+
// the end of the process how long the resulting string of tokens will be. But
|
37
|
+
// we do know that it will be less than or equal to the length of the SQL
|
38
|
+
// string.
|
39
|
+
//
|
40
|
+
// For speed, use stack-allocated fingerprint result strings unless we need
|
41
|
+
// more than 4KB.
|
42
|
+
if (slen > sizeof(stack_result)) {
|
43
|
+
result = malloc(slen + 1);
|
44
|
+
if (!result) {
|
45
|
+
lua_pushstring(L, ""); // Push something at least...
|
46
|
+
return 1;
|
47
|
+
}
|
48
|
+
}
|
49
|
+
|
33
50
|
int fp_idx = 0;
|
34
|
-
while (
|
51
|
+
while (state.pos < state.slen) {
|
35
52
|
libinjection_sqli_tokenize(&state);
|
36
53
|
result[fp_idx++] = state.tokenvec[0].type;
|
37
54
|
}
|
@@ -39,6 +56,9 @@ int fingerprint(lua_State *L) {
|
|
39
56
|
|
40
57
|
lua_pushstring(L, result);
|
41
58
|
|
59
|
+
// If we dynamically allocated the result above, free it
|
60
|
+
if (result != stack_result) free(result);
|
61
|
+
|
42
62
|
return 1;
|
43
63
|
}
|
44
64
|
|
@@ -0,0 +1,75 @@
|
|
1
|
+
#include <stdio.h>
|
2
|
+
|
3
|
+
#define LUA_LIB
|
4
|
+
#include "lua.h"
|
5
|
+
#include "lauxlib.h"
|
6
|
+
|
7
|
+
// Link this program with an external C or x86 compression function
|
8
|
+
extern void sha256_compress(uint32_t state[8], const uint8_t block[64]);
|
9
|
+
|
10
|
+
/* This function is implements the padding and blocking around the SHA2 compression function
|
11
|
+
*
|
12
|
+
* Copyright (c) 2014 Project Nayuki
|
13
|
+
* http://www.nayuki.io/page/fast-sha2-hashes-in-x86-assembly
|
14
|
+
*/
|
15
|
+
static void
|
16
|
+
sha256_hash(const uint8_t *message, uint32_t len, uint32_t hash[8]) {
|
17
|
+
hash[0] = UINT32_C(0x6A09E667);
|
18
|
+
hash[1] = UINT32_C(0xBB67AE85);
|
19
|
+
hash[2] = UINT32_C(0x3C6EF372);
|
20
|
+
hash[3] = UINT32_C(0xA54FF53A);
|
21
|
+
hash[4] = UINT32_C(0x510E527F);
|
22
|
+
hash[5] = UINT32_C(0x9B05688C);
|
23
|
+
hash[6] = UINT32_C(0x1F83D9AB);
|
24
|
+
hash[7] = UINT32_C(0x5BE0CD19);
|
25
|
+
|
26
|
+
uint32_t i;
|
27
|
+
for (i = 0; len - i >= 64; i += 64)
|
28
|
+
sha256_compress(hash, message + i);
|
29
|
+
|
30
|
+
uint8_t block[64];
|
31
|
+
uint32_t rem = len - i;
|
32
|
+
memcpy(block, message + i, rem);
|
33
|
+
|
34
|
+
block[rem] = 0x80;
|
35
|
+
rem++;
|
36
|
+
if (64 - rem >= 8)
|
37
|
+
memset(block + rem, 0, 56 - rem);
|
38
|
+
else {
|
39
|
+
memset(block + rem, 0, 64 - rem);
|
40
|
+
sha256_compress(hash, block);
|
41
|
+
memset(block, 0, 56);
|
42
|
+
}
|
43
|
+
|
44
|
+
uint64_t longLen = ((uint64_t)len) << 3;
|
45
|
+
for (i = 0; i < 8; i++)
|
46
|
+
block[64 - 1 - i] = (uint8_t)(longLen >> (i * 8));
|
47
|
+
sha256_compress(hash, block);
|
48
|
+
}
|
49
|
+
|
50
|
+
/* Immunio Lua bindings */
|
51
|
+
|
52
|
+
static int
|
53
|
+
lua_sha256(lua_State *L) {
|
54
|
+
uint32_t hash[8] = {};
|
55
|
+
char buf[65];
|
56
|
+
size_t slen = 0;
|
57
|
+
|
58
|
+
const char *input = luaL_checklstring(L, 1, &slen);
|
59
|
+
sha256_hash(input, slen, hash);
|
60
|
+
sprintf(buf, "%08x%08x%08x%08x%08x%08x%08x%08x", hash[0], hash[1], hash[2], hash[3], hash[4], hash[5], hash[6], hash[7]);
|
61
|
+
lua_pushlstring(L, buf, 64);
|
62
|
+
return 1;
|
63
|
+
}
|
64
|
+
|
65
|
+
static const luaL_Reg libsha256[] = {
|
66
|
+
{"sha256", lua_sha256},
|
67
|
+
{NULL, NULL}
|
68
|
+
};
|
69
|
+
|
70
|
+
int
|
71
|
+
luaopen_sha256(lua_State *L) {
|
72
|
+
luaL_checkversion(L);
|
73
|
+
luaL_register(L, "sha2", libsha256);
|
74
|
+
return 1;
|
75
|
+
}
|
@@ -0,0 +1,196 @@
|
|
1
|
+
/*
|
2
|
+
* SHA-256 hash in C
|
3
|
+
*
|
4
|
+
* Copyright (c) 2014 Project Nayuki
|
5
|
+
* http://www.nayuki.io/page/fast-sha2-hashes-in-x86-assembly
|
6
|
+
*
|
7
|
+
* (MIT License)
|
8
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
9
|
+
* this software and associated documentation files (the "Software"), to deal in
|
10
|
+
* the Software without restriction, including without limitation the rights to
|
11
|
+
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
12
|
+
* the Software, and to permit persons to whom the Software is furnished to do so,
|
13
|
+
* subject to the following conditions:
|
14
|
+
* - The above copyright notice and this permission notice shall be included in
|
15
|
+
* all copies or substantial portions of the Software.
|
16
|
+
* - The Software is provided "as is", without warranty of any kind, express or
|
17
|
+
* implied, including but not limited to the warranties of merchantability,
|
18
|
+
* fitness for a particular purpose and noninfringement. In no event shall the
|
19
|
+
* authors or copyright holders be liable for any claim, damages or other
|
20
|
+
* liability, whether in an action of contract, tort or otherwise, arising from,
|
21
|
+
* out of or in connection with the Software or the use or other dealings in the
|
22
|
+
* Software.
|
23
|
+
*/
|
24
|
+
|
25
|
+
#include <stdint.h>
|
26
|
+
|
27
|
+
|
28
|
+
void sha256_compress(uint32_t state[8], const uint8_t block[64]) {
|
29
|
+
// 32-bit right rotation
|
30
|
+
#define ROR(x, i) \
|
31
|
+
(((x) << (32 - (i))) | ((x) >> (i)))
|
32
|
+
|
33
|
+
#define LOADSCHEDULE(i) \
|
34
|
+
schedule[i] = \
|
35
|
+
(uint32_t)block[i * 4 + 0] << 24 \
|
36
|
+
| (uint32_t)block[i * 4 + 1] << 16 \
|
37
|
+
| (uint32_t)block[i * 4 + 2] << 8 \
|
38
|
+
| (uint32_t)block[i * 4 + 3];
|
39
|
+
|
40
|
+
#define SCHEDULE(i) \
|
41
|
+
schedule[i] = schedule[i - 16] + schedule[i - 7] \
|
42
|
+
+ (ROR(schedule[i - 15], 7) ^ ROR(schedule[i - 15], 18) ^ (schedule[i - 15] >> 3)) \
|
43
|
+
+ (ROR(schedule[i - 2], 17) ^ ROR(schedule[i - 2], 19) ^ (schedule[i - 2] >> 10));
|
44
|
+
|
45
|
+
#define ROUND(a, b, c, d, e, f, g, h, i, k) \
|
46
|
+
h += (ROR(e, 6) ^ ROR(e, 11) ^ ROR(e, 25)) + (g ^ (e & (f ^ g))) + UINT32_C(k) + schedule[i]; \
|
47
|
+
d += h; \
|
48
|
+
h += (ROR(a, 2) ^ ROR(a, 13) ^ ROR(a, 22)) + ((a & (b | c)) | (b & c));
|
49
|
+
|
50
|
+
uint32_t schedule[64];
|
51
|
+
LOADSCHEDULE( 0)
|
52
|
+
LOADSCHEDULE( 1)
|
53
|
+
LOADSCHEDULE( 2)
|
54
|
+
LOADSCHEDULE( 3)
|
55
|
+
LOADSCHEDULE( 4)
|
56
|
+
LOADSCHEDULE( 5)
|
57
|
+
LOADSCHEDULE( 6)
|
58
|
+
LOADSCHEDULE( 7)
|
59
|
+
LOADSCHEDULE( 8)
|
60
|
+
LOADSCHEDULE( 9)
|
61
|
+
LOADSCHEDULE(10)
|
62
|
+
LOADSCHEDULE(11)
|
63
|
+
LOADSCHEDULE(12)
|
64
|
+
LOADSCHEDULE(13)
|
65
|
+
LOADSCHEDULE(14)
|
66
|
+
LOADSCHEDULE(15)
|
67
|
+
SCHEDULE(16)
|
68
|
+
SCHEDULE(17)
|
69
|
+
SCHEDULE(18)
|
70
|
+
SCHEDULE(19)
|
71
|
+
SCHEDULE(20)
|
72
|
+
SCHEDULE(21)
|
73
|
+
SCHEDULE(22)
|
74
|
+
SCHEDULE(23)
|
75
|
+
SCHEDULE(24)
|
76
|
+
SCHEDULE(25)
|
77
|
+
SCHEDULE(26)
|
78
|
+
SCHEDULE(27)
|
79
|
+
SCHEDULE(28)
|
80
|
+
SCHEDULE(29)
|
81
|
+
SCHEDULE(30)
|
82
|
+
SCHEDULE(31)
|
83
|
+
SCHEDULE(32)
|
84
|
+
SCHEDULE(33)
|
85
|
+
SCHEDULE(34)
|
86
|
+
SCHEDULE(35)
|
87
|
+
SCHEDULE(36)
|
88
|
+
SCHEDULE(37)
|
89
|
+
SCHEDULE(38)
|
90
|
+
SCHEDULE(39)
|
91
|
+
SCHEDULE(40)
|
92
|
+
SCHEDULE(41)
|
93
|
+
SCHEDULE(42)
|
94
|
+
SCHEDULE(43)
|
95
|
+
SCHEDULE(44)
|
96
|
+
SCHEDULE(45)
|
97
|
+
SCHEDULE(46)
|
98
|
+
SCHEDULE(47)
|
99
|
+
SCHEDULE(48)
|
100
|
+
SCHEDULE(49)
|
101
|
+
SCHEDULE(50)
|
102
|
+
SCHEDULE(51)
|
103
|
+
SCHEDULE(52)
|
104
|
+
SCHEDULE(53)
|
105
|
+
SCHEDULE(54)
|
106
|
+
SCHEDULE(55)
|
107
|
+
SCHEDULE(56)
|
108
|
+
SCHEDULE(57)
|
109
|
+
SCHEDULE(58)
|
110
|
+
SCHEDULE(59)
|
111
|
+
SCHEDULE(60)
|
112
|
+
SCHEDULE(61)
|
113
|
+
SCHEDULE(62)
|
114
|
+
SCHEDULE(63)
|
115
|
+
|
116
|
+
uint32_t a = state[0];
|
117
|
+
uint32_t b = state[1];
|
118
|
+
uint32_t c = state[2];
|
119
|
+
uint32_t d = state[3];
|
120
|
+
uint32_t e = state[4];
|
121
|
+
uint32_t f = state[5];
|
122
|
+
uint32_t g = state[6];
|
123
|
+
uint32_t h = state[7];
|
124
|
+
ROUND(a, b, c, d, e, f, g, h, 0, 0x428A2F98)
|
125
|
+
ROUND(h, a, b, c, d, e, f, g, 1, 0x71374491)
|
126
|
+
ROUND(g, h, a, b, c, d, e, f, 2, 0xB5C0FBCF)
|
127
|
+
ROUND(f, g, h, a, b, c, d, e, 3, 0xE9B5DBA5)
|
128
|
+
ROUND(e, f, g, h, a, b, c, d, 4, 0x3956C25B)
|
129
|
+
ROUND(d, e, f, g, h, a, b, c, 5, 0x59F111F1)
|
130
|
+
ROUND(c, d, e, f, g, h, a, b, 6, 0x923F82A4)
|
131
|
+
ROUND(b, c, d, e, f, g, h, a, 7, 0xAB1C5ED5)
|
132
|
+
ROUND(a, b, c, d, e, f, g, h, 8, 0xD807AA98)
|
133
|
+
ROUND(h, a, b, c, d, e, f, g, 9, 0x12835B01)
|
134
|
+
ROUND(g, h, a, b, c, d, e, f, 10, 0x243185BE)
|
135
|
+
ROUND(f, g, h, a, b, c, d, e, 11, 0x550C7DC3)
|
136
|
+
ROUND(e, f, g, h, a, b, c, d, 12, 0x72BE5D74)
|
137
|
+
ROUND(d, e, f, g, h, a, b, c, 13, 0x80DEB1FE)
|
138
|
+
ROUND(c, d, e, f, g, h, a, b, 14, 0x9BDC06A7)
|
139
|
+
ROUND(b, c, d, e, f, g, h, a, 15, 0xC19BF174)
|
140
|
+
ROUND(a, b, c, d, e, f, g, h, 16, 0xE49B69C1)
|
141
|
+
ROUND(h, a, b, c, d, e, f, g, 17, 0xEFBE4786)
|
142
|
+
ROUND(g, h, a, b, c, d, e, f, 18, 0x0FC19DC6)
|
143
|
+
ROUND(f, g, h, a, b, c, d, e, 19, 0x240CA1CC)
|
144
|
+
ROUND(e, f, g, h, a, b, c, d, 20, 0x2DE92C6F)
|
145
|
+
ROUND(d, e, f, g, h, a, b, c, 21, 0x4A7484AA)
|
146
|
+
ROUND(c, d, e, f, g, h, a, b, 22, 0x5CB0A9DC)
|
147
|
+
ROUND(b, c, d, e, f, g, h, a, 23, 0x76F988DA)
|
148
|
+
ROUND(a, b, c, d, e, f, g, h, 24, 0x983E5152)
|
149
|
+
ROUND(h, a, b, c, d, e, f, g, 25, 0xA831C66D)
|
150
|
+
ROUND(g, h, a, b, c, d, e, f, 26, 0xB00327C8)
|
151
|
+
ROUND(f, g, h, a, b, c, d, e, 27, 0xBF597FC7)
|
152
|
+
ROUND(e, f, g, h, a, b, c, d, 28, 0xC6E00BF3)
|
153
|
+
ROUND(d, e, f, g, h, a, b, c, 29, 0xD5A79147)
|
154
|
+
ROUND(c, d, e, f, g, h, a, b, 30, 0x06CA6351)
|
155
|
+
ROUND(b, c, d, e, f, g, h, a, 31, 0x14292967)
|
156
|
+
ROUND(a, b, c, d, e, f, g, h, 32, 0x27B70A85)
|
157
|
+
ROUND(h, a, b, c, d, e, f, g, 33, 0x2E1B2138)
|
158
|
+
ROUND(g, h, a, b, c, d, e, f, 34, 0x4D2C6DFC)
|
159
|
+
ROUND(f, g, h, a, b, c, d, e, 35, 0x53380D13)
|
160
|
+
ROUND(e, f, g, h, a, b, c, d, 36, 0x650A7354)
|
161
|
+
ROUND(d, e, f, g, h, a, b, c, 37, 0x766A0ABB)
|
162
|
+
ROUND(c, d, e, f, g, h, a, b, 38, 0x81C2C92E)
|
163
|
+
ROUND(b, c, d, e, f, g, h, a, 39, 0x92722C85)
|
164
|
+
ROUND(a, b, c, d, e, f, g, h, 40, 0xA2BFE8A1)
|
165
|
+
ROUND(h, a, b, c, d, e, f, g, 41, 0xA81A664B)
|
166
|
+
ROUND(g, h, a, b, c, d, e, f, 42, 0xC24B8B70)
|
167
|
+
ROUND(f, g, h, a, b, c, d, e, 43, 0xC76C51A3)
|
168
|
+
ROUND(e, f, g, h, a, b, c, d, 44, 0xD192E819)
|
169
|
+
ROUND(d, e, f, g, h, a, b, c, 45, 0xD6990624)
|
170
|
+
ROUND(c, d, e, f, g, h, a, b, 46, 0xF40E3585)
|
171
|
+
ROUND(b, c, d, e, f, g, h, a, 47, 0x106AA070)
|
172
|
+
ROUND(a, b, c, d, e, f, g, h, 48, 0x19A4C116)
|
173
|
+
ROUND(h, a, b, c, d, e, f, g, 49, 0x1E376C08)
|
174
|
+
ROUND(g, h, a, b, c, d, e, f, 50, 0x2748774C)
|
175
|
+
ROUND(f, g, h, a, b, c, d, e, 51, 0x34B0BCB5)
|
176
|
+
ROUND(e, f, g, h, a, b, c, d, 52, 0x391C0CB3)
|
177
|
+
ROUND(d, e, f, g, h, a, b, c, 53, 0x4ED8AA4A)
|
178
|
+
ROUND(c, d, e, f, g, h, a, b, 54, 0x5B9CCA4F)
|
179
|
+
ROUND(b, c, d, e, f, g, h, a, 55, 0x682E6FF3)
|
180
|
+
ROUND(a, b, c, d, e, f, g, h, 56, 0x748F82EE)
|
181
|
+
ROUND(h, a, b, c, d, e, f, g, 57, 0x78A5636F)
|
182
|
+
ROUND(g, h, a, b, c, d, e, f, 58, 0x84C87814)
|
183
|
+
ROUND(f, g, h, a, b, c, d, e, 59, 0x8CC70208)
|
184
|
+
ROUND(e, f, g, h, a, b, c, d, 60, 0x90BEFFFA)
|
185
|
+
ROUND(d, e, f, g, h, a, b, c, 61, 0xA4506CEB)
|
186
|
+
ROUND(c, d, e, f, g, h, a, b, 62, 0xBEF9A3F7)
|
187
|
+
ROUND(b, c, d, e, f, g, h, a, 63, 0xC67178F2)
|
188
|
+
state[0] += a;
|
189
|
+
state[1] += b;
|
190
|
+
state[2] += c;
|
191
|
+
state[3] += d;
|
192
|
+
state[4] += e;
|
193
|
+
state[5] += f;
|
194
|
+
state[6] += g;
|
195
|
+
state[7] += h;
|
196
|
+
}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: immunio
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.13
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Immunio
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-02-
|
11
|
+
date: 2016-02-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -417,6 +417,8 @@ files:
|
|
417
417
|
- lua-hooks/ext/luautf8/unidata.h
|
418
418
|
- lua-hooks/ext/sha1/luasha1.c
|
419
419
|
- lua-hooks/ext/sha1/sha1.c
|
420
|
+
- lua-hooks/ext/sha2/luasha256.c
|
421
|
+
- lua-hooks/ext/sha2/sha256.c
|
420
422
|
- lua-hooks/lib/boot.lua
|
421
423
|
homepage: http://immun.io/
|
422
424
|
licenses:
|