summaryrefslogtreecommitdiff
path: root/other/burneye/src
diff options
context:
space:
mode:
authorRoot THC2026-02-24 12:42:47 +0000
committerRoot THC2026-02-24 12:42:47 +0000
commitc9cbeced5b3f2bdd7407e29c0811e65954132540 (patch)
treeaefc355416b561111819de159ccbd86c3004cf88 /other/burneye/src
parent073fe4bf9fca6bf40cef2886d75df832ef4b6fca (diff)
initial
Diffstat (limited to 'other/burneye/src')
-rw-r--r--other/burneye/src/BANNER12
-rw-r--r--other/burneye/src/BANNER-BURNEYE16
-rw-r--r--other/burneye/src/Makefile116
-rw-r--r--other/burneye/src/burneye.c968
-rw-r--r--other/burneye/src/common.c53
-rw-r--r--other/burneye/src/common.h12
-rw-r--r--other/burneye/src/conf/Makefile21
-rw-r--r--other/burneye/src/conf/config.l50
-rw-r--r--other/burneye/src/conf/config.y27
-rw-r--r--other/burneye/src/conf/tmp/Makefile39
-rw-r--r--other/burneye/src/conf/tmp/branch.c61
-rw-r--r--other/burneye/src/conf/tmp/branch.h74
-rw-r--r--other/burneye/src/conf/tmp/call.c56
-rw-r--r--other/burneye/src/conf/tmp/call.h62
-rw-r--r--other/burneye/src/conf/tmp/compiler-test.c74
-rw-r--r--other/burneye/src/conf/tmp/compiler.h18
-rw-r--r--other/burneye/src/conf/tmp/compiler.l95
-rw-r--r--other/burneye/src/conf/tmp/compiler.y271
-rw-r--r--other/burneye/src/conf/tmp/compiler_main.c127
-rw-r--r--other/burneye/src/conf/tmp/condition.c157
-rw-r--r--other/burneye/src/conf/tmp/condition.h125
-rw-r--r--other/burneye/src/conf/tmp/element.c115
-rw-r--r--other/burneye/src/conf/tmp/element.h85
-rw-r--r--other/burneye/src/conf/tmp/functionlist.h20
-rw-r--r--other/burneye/src/conf/tmp/functions.c66
-rw-r--r--other/burneye/src/conf/tmp/functions.h35
-rw-r--r--other/burneye/src/conf/tmp/script.c154
-rw-r--r--other/burneye/src/conf/tmp/script.h50
-rw-r--r--other/burneye/src/conf/tmp/script116
-rw-r--r--other/burneye/src/conf/tmp/script26218
-rw-r--r--other/burneye/src/conf/tmp/script319
-rw-r--r--other/burneye/src/conf/tmp/script43
-rw-r--r--other/burneye/src/conf/tmp/symbol.c299
-rw-r--r--other/burneye/src/conf/tmp/symbol.h108
-rw-r--r--other/burneye/src/debug/memdump.c249
-rw-r--r--other/burneye/src/debug/memdump.c.old164
-rw-r--r--other/burneye/src/debug/ptrace-legitbin0 -> 7236 bytes
-rw-r--r--other/burneye/src/debug/ptrace-legit.c143
-rw-r--r--other/burneye/src/descr.be36
-rw-r--r--other/burneye/src/foo11
-rw-r--r--other/burneye/src/lsbin0 -> 67036 bytes
-rw-r--r--other/burneye/src/regress.sh58
-rw-r--r--other/burneye/src/rstest.c158
-rw-r--r--other/burneye/src/stub/Makefile111
-rw-r--r--other/burneye/src/stub/callgate.asm71
-rw-r--r--other/burneye/src/stub/cgate.c42
-rw-r--r--other/burneye/src/stub/cipher-glfsr-c.c33
-rw-r--r--other/burneye/src/stub/cipher-glfsr.asm79
-rw-r--r--other/burneye/src/stub/cipher-glfsr.h26
-rw-r--r--other/burneye/src/stub/cipher-rc4.c89
-rw-r--r--other/burneye/src/stub/cipher-rc4.h24
-rw-r--r--other/burneye/src/stub/cipher-sha1.c212
-rw-r--r--other/burneye/src/stub/cipher-sha1.h36
-rw-r--r--other/burneye/src/stub/fingerprint.c593
-rw-r--r--other/burneye/src/stub/fingerprint.h159
-rw-r--r--other/burneye/src/stub/fptest.c27
-rw-r--r--other/burneye/src/stub/helper.c139
-rw-r--r--other/burneye/src/stub/helper.h32
-rw-r--r--other/burneye/src/stub/include/int80-test.c9
-rw-r--r--other/burneye/src/stub/include/int80-test.obin0 -> 716 bytes
-rw-r--r--other/burneye/src/stub/include/int80.h437
-rw-r--r--other/burneye/src/stub/include/unistd.h280
-rw-r--r--other/burneye/src/stub/init.asm158
-rw-r--r--other/burneye/src/stub/lde-testbin0 -> 16627 bytes
-rw-r--r--other/burneye/src/stub/lde-test.c62
-rw-r--r--other/burneye/src/stub/lde32.asm345
-rw-r--r--other/burneye/src/stub/lde32.h31
-rw-r--r--other/burneye/src/stub/rs.c573
-rw-r--r--other/burneye/src/stub/rs.h62
-rw-r--r--other/burneye/src/stub/snprintf.c367
-rw-r--r--other/burneye/src/stub/stub.c1254
-rw-r--r--other/burneye/src/stub/stub.lds41
-rw-r--r--other/burneye/src/stub/stubhdr.h78
-rw-r--r--other/burneye/src/stub/unlink_stub.asm133
-rw-r--r--other/burneye/src/stub/utils/Makefile11
-rw-r--r--other/burneye/src/stub/utils/hdump.c45
-rw-r--r--other/burneye/src/stub/utils/lde32.asm315
-rw-r--r--other/burneye/src/stub/utils/sstrip.c309
78 files changed, 16624 insertions, 0 deletions
diff --git a/other/burneye/src/BANNER b/other/burneye/src/BANNER
new file mode 100644
index 0000000..5a88210
--- /dev/null
+++ b/other/burneye/src/BANNER
@@ -0,0 +1,12 @@
1/*** ***/
2/*** TESO CONFIDENTIAL - BINARY EXECUTEABLE ***/
3/*** ***/
4/*** This is unpublished proprietary code of TESO Security ***/
5/*** ***/
6/*** The contents of these coded instructions, statements ***/
7/*** and computer programs may not be disclosed to third ***/
8/*** parties, copied or duplicated in any form, in whole ***/
9/*** or in part, without the prior written permission of ***/
10/*** TESO Security. ***/
11/*** ***/
12
diff --git a/other/burneye/src/BANNER-BURNEYE b/other/burneye/src/BANNER-BURNEYE
new file mode 100644
index 0000000..6b1b45f
--- /dev/null
+++ b/other/burneye/src/BANNER-BURNEYE
@@ -0,0 +1,16 @@
1***
2*** WARNING
3***
4*** This is program does not guarantee any functionality and may break your
5*** entire system. Do not use it for malicious purposes, but to protect your
6*** stuff from malicious people. Also, please be aware that in the
7*** non-passworded or non-fingerprinted mode (you can combine both for extra
8*** security) any serious reverse engineer is able to unwrap the binary in
9*** minutes. In the passworded binary however, it is hardly possible if the
10*** password is not known. Rule of thumb: if the binary runs, it can be broken.
11*** The binding is still very weak between the encryption engine and the
12*** binary, so unwrapping is possible.
13***
14*** If you have understood the above limitations, enter 'accept' now.
15***
16
diff --git a/other/burneye/src/Makefile b/other/burneye/src/Makefile
new file mode 100644
index 0000000..55cf561
--- /dev/null
+++ b/other/burneye/src/Makefile
@@ -0,0 +1,116 @@
1
2ifeq ($(debug),on)
3CFLAGS += -g -ggdb
4DFLAGS += -DDEBUG -DVDEBUG
5MPASS += debug=on
6endif
7
8CFLAGS += -Wall $(DFLAGS)
9
10CC=gcc
11OBJS = common.o \
12 cipher-glfsr.o cipher-rc4.o cipher-sha1.o fingerprint.o rs.o
13
14# basic targets
15#
16
17all: debug fingerprint stub/stub.bin burneye.c $(OBJS)
18 $(CC) $(CFLAGS) -o burneye burneye.c $(OBJS)
19
20harddist: clean stub/stub.bin burneye.c $(OBJS)
21 diet $(CC) -DSTANDALONE $(CFLAGS) -o fingerprint -static \
22 stub/fingerprint.c rs.o cipher-sha1.o
23 strip fingerprint
24 stub/utils/sstrip fingerprint
25
26 diet $(CC) $(CFLAGS) -o burneye burneye.c -static $(OBJS)
27 strip burneye
28 stub/utils/sstrip burneye
29
30 ./burneye fingerprint
31 mv output fingerprint
32 chmod 700 fingerprint
33 readelf -l fingerprint
34
35 # burneye itself should be the last binary, for that it will
36 # modify itself
37 ./burneye -B BANNER-BURNEYE -p accept burneye
38 mv output burneye
39 chmod 700 burneye
40 readelf -l burneye
41
42
43# release=release-string should be set ;)
44release: clean harddist
45 mkdir ../dist/burneye-$(release)/
46 cp burneye fingerprint ../dist/burneye-$(release)/
47 cp ../doc/DIST-README ../dist/burneye-$(release)/README
48 chmod 600 ../dist/burneye-$(release)/README
49 chmod 700 ../dist/burneye-$(release)/burneye \
50 ../dist/burneye-$(release)/fingerprint
51
52# clean targets
53#
54
55clean:
56 rm -f debug/memdump
57 rm -f *.o burneye
58 rm -f fingerprint
59 rm -f rstest
60 rm -f output date.eye
61 make -C stub clean
62
63
64# debug targets
65#
66
67debug: debug/memdump
68
69debug/memdump: debug/memdump.c
70 $(CC) $(CFLAGS) -o debug/memdump debug/memdump.c
71
72regress: regress-clean all date.eye regress.sh
73 ./regress.sh
74
75regress-clean: clean
76 rm -f date.eye
77 rm -f date.*.0x* date.*.regs
78
79date.eye: date all
80 ./burneye date
81 mv output date.eye
82 chmod 700 date.eye
83
84
85# sub object-targets
86#
87
88cipher-glfsr.o: stub/cipher-glfsr.asm
89 nasm $(DFLAGS) -f elf -o cipher-glfsr.o stub/cipher-glfsr.asm
90
91cipher-rc4.o: stub/cipher-rc4.c
92 $(CC) $(CFLAGS) -c stub/cipher-rc4.c -o cipher-rc4.o
93
94cipher-sha1.o: stub/cipher-sha1.c
95 $(CC) $(CFLAGS) -c stub/cipher-sha1.c -o cipher-sha1.o
96
97fingerprint.o: stub/fingerprint.c
98 $(CC) $(CFLAGS) -c stub/fingerprint.c -o fingerprint.o
99
100rs.o: stub/rs.c
101 $(CC) $(CFLAGS) -c stub/rs.c -o rs.o
102
103stub/stub.bin:
104 make -C stub rel=on $(MPASS) clean all
105
106
107# testing tool targets
108#
109
110fingerprint: stub/fingerprint.c cipher-sha1.o rs.o
111 $(CC) -DSTANDALONE $(CFLAGS) -o fingerprint \
112 stub/fingerprint.c rs.o cipher-sha1.o
113
114rstest: rstest.c rs.o
115 $(CC) $(CFLAGS) -o rstest rstest.c rs.o
116
diff --git a/other/burneye/src/burneye.c b/other/burneye/src/burneye.c
new file mode 100644
index 0000000..bfef2e7
--- /dev/null
+++ b/other/burneye/src/burneye.c
@@ -0,0 +1,968 @@
1/* burneye - main wrapping functions
2 */
3
4#define VERSION "1.0.1"
5
6#include <sys/types.h>
7#include <sys/stat.h>
8#include <elf.h>
9#include <stdio.h>
10#include <stdlib.h>
11#include <string.h>
12#include <unistd.h> /* getopt */
13#include "stub/stubhdr.h"
14#include "stub/cipher-rc4.h"
15#include "stub/cipher-sha1.h"
16#include "stub/cipher-glfsr.h"
17#include "stub/fingerprint.h"
18
19
20/* prototypes
21 */
22void usage (char *progname);
23
24void wrap (char *program, unsigned char *stub_data,
25 unsigned long int stub_len);
26
27unsigned long int getmaxbrk (unsigned char *elf);
28
29unsigned char * file_read (char *pathname);
30
31void prepare_fingerprint (fp_fin *f);
32void read_fingerprint (fp_s *fp, char *pathname);
33
34
35/*** global variables
36 */
37unsigned long int entry_vaddr = 0;
38unsigned long int enc_start = 0;
39unsigned long int entry_next = 0;
40
41/* file to pull randomness from */
42#define RANDOM_DEV "/dev/urandom"
43FILE * frandom = NULL;
44
45
46char * inputname = NULL;
47
48
49/* output file options
50 */
51char * outputname = "output";
52
53unsigned char * unlink_env = NULL;
54
55stubhdr * shdr;
56int pw_enc = 0; /* do password encryption */
57char * pw_pass = NULL; /* password used */
58char * pw_env = NULL; /* environment variable with pass */
59int pw_check = 1; /* check for correct decryption */
60
61unsigned char * banner = NULL; /* points to banner string or NULL */
62int banner_tty = 0; /* show it on tty */
63
64int do_fp = 0; /* do fingerprinting */
65int do_seal = 0; /* SEAL mode flag */
66int fp_len = 0;
67int fp_check = 1;
68int fp_fromhost = 0; /* use current host for fp */
69unsigned long int fp_tests = FP_TEMPLATE; /* tests to do on -F */
70char * fp_name = NULL; /* filename of fp file */
71FILE * fp_in = NULL; /* stream pointer */
72int fp_tolerance = 0; /* tolerance or zero */
73int fp_WARN = 1; /* erasure warning */
74fp_fin fp; /* fingerprint structure */
75
76int tag_used = 0; /* whether a tag is present */
77unsigned char tag_env[16]; /* tag environment variable */
78unsigned char tag_key[16]; /* tag key (not stored in bin) */
79unsigned char tag_value[64]; /* tag value/string */
80
81
82#define FILE_OFFSET(addr) (((unsigned char *)(addr)) - stub_data)
83#define SEAL_STORE(to,addr) { \
84 if (do_seal) { (to) = (unsigned long int) (FILE_OFFSET(addr)); } \
85}
86
87
88/* real stub included here, this is no common include, but a one-time include
89 * it defines some very important values, which can be overwritten by .be
90 * definition files though (TODO: not yet implemented, of course ;)
91 */
92#include "stub/stub-bin.h"
93
94unsigned long int be_layer0_start = BE_LAYER0_START;
95unsigned long int be_layer0_size = BE_LAYER0_SIZE;
96unsigned long int be_layer0_cont = BE_LAYER0_CONT;
97
98
99void
100usage (char *progname)
101{
102 fprintf (stderr, "usage: %s [options] <program>\n\n", progname);
103
104 fprintf (stderr,
105 "banner options\n"
106 "\t-b file\t\tdisplay banner from 'file' before start\n"
107 "\t-B file\t\tdisplay banner from 'file' on tty before start\n"
108 "\n"
109 "password protect options\n"
110 "\t-p pass\t\tuse password encryption with 'pass' as password\n"
111 "\t-P env\t\tfirst try to read password from environment 'env',\n"
112 "\t\t\twill use password from 'env' now, too, if its there\n"
113 "\t-i\t\tignore invalid entered password and execute junk\n"
114 "\t\t\tnot recommended (default: off)\n"
115 "\n"
116 "fingerprinting options\n"
117 "\t-S\t\tSEAL mode (options F,f,t are ignored)\n"
118 "\t-f file\t\tuse fingerprint from 'file' to protect binary\n"
119 "\t-F\t\tuse fingerprint of current host (do not use -f and -F)\n"
120 "\t-t num\t\ttolerate 'num' deviations in fingerprint\n"
121 "\t-q\t\tbe quiet about wrong fingerprint, just exit\n"
122 "\t\t\t(default: 0)\n"
123 "\t-E\t\tdo tolerance even if erasure warning is given\n"
124 "\t-l\t\tlist fingerprint tests that can be done\n"
125 "\t-e test\t\tenable fingerprint test 'test'\n"
126 "\t-d test\t\tdisable fingerprint test 'test'\n"
127 "\n"
128 "generic options\n"
129 "\t-o out\t\tspecify another output file name (default: output)\n"
130 "\n"
131 "minor features\n"
132 "\t-U env\t\tunlink file securely if 'env' is in the environment\n"
133 "\t-T tag\t\tstore a string as tag to the binary. 'tag' is an\n"
134 "\t\t\tenvironment variable: tag=%%env:%%key:%%string, see README\n"
135 "\n"
136 "example: %s -B aint.for.hack.co.za.txt \\\n"
137 "\t\t-p gov-boi-cant-code -o ls /bin/ls\n"
138 "\n"
139 " would encrypt /bin/ls to ./ls with password "
140 "\"gov-boi-cant-code\" and\n"
141 " displays the content of aint.for.hack.co.za.txt before "
142 "asking for pass.\n", progname);
143
144 fprintf (stderr, "\n");
145
146 exit (EXIT_FAILURE);
147}
148
149
150int
151main (int argc, char *argv[])
152{
153 char c;
154 char * progname = argv[0];
155
156 unsigned long int stub_len;
157 unsigned char * stub_data;
158
159
160 printf ("burneye - TESO ELF Encryption Engine\n"
161 "version "VERSION"\n"
162 "------------------------------------------------------------"
163 "-------------------\n\n");
164
165 if (argc < 2)
166 usage (progname);
167
168 while ((c = getopt (argc, argv, "T:B:b:p:P:iSf:Ft:qEle:d:o:U:")) != EOF) {
169 switch (c) {
170 /* UNDOCUMENTED TAG OPTION */
171 case 'T':
172 if (getenv (optarg) != NULL) {
173 sscanf (getenv (optarg),
174 "%15[^:]:%15[^:]:%63s",
175 tag_env, tag_key, tag_value);
176 tag_used = 1;
177 }
178 break;
179 case 'B':
180 banner_tty = 1;
181 /* FALLTHROUGH */
182 case 'b':
183 banner = file_read (optarg);
184 if (banner == NULL) {
185 fprintf (stderr, "failed to read content "
186 "from banner file\n");
187
188 exit (EXIT_FAILURE);
189 }
190 break;
191 case 'p':
192 pw_enc = 1;
193 pw_pass = optarg;
194 break;
195 case 'P':
196 pw_enc = 1;
197 pw_env = optarg;
198 break;
199 case 'i':
200 pw_check = 0;
201 break;
202 case 'S':
203 do_seal = 1;
204 break;
205 case 'f':
206 do_fp = 1;
207 fp_name = optarg;
208 break;
209 case 'F':
210 do_fp = 1;
211 fp_fromhost = 1;
212 break;
213 case 't':
214 if (sscanf (optarg, "%d", &fp_tolerance) != 1 ||
215 fp_tolerance < 0)
216 {
217 fprintf (stderr, "invalid tolerance value\n");
218 exit (EXIT_FAILURE);
219 }
220 break;
221 case 'q':
222 fp_check = 0;
223 break;
224 case 'E':
225 fp_WARN = 0;
226 break;
227 case 'l':
228 fp_tlist (fp_tests);
229 exit (EXIT_SUCCESS);
230 break;
231 case 'e':
232 fp_tests |= fp_tlookup (optarg);
233 break;
234 case 'd':
235 fp_tests &= ~(fp_tlookup (optarg));
236 break;
237 case 'o':
238 outputname = optarg;
239 break;
240 case 'U':
241 unlink_env = optarg;
242 break;
243 default:
244 usage (progname);
245 break;
246 }
247 }
248
249 inputname = argv[argc - 1];
250 if (inputname[0] == '-')
251 usage (progname);
252
253 if (do_seal) {
254 if (do_fp != 0 || fp_name != NULL || fp_fromhost != 0) {
255 fprintf (stderr, "SEAL mode overwrote "
256 "fingerprint options\n");
257 }
258 do_fp = 0;
259 fp_name = NULL;
260 fp_fromhost = 0;
261 }
262
263 if (do_fp && fp_name != NULL && fp_fromhost != 0) {
264 fprintf (stderr, "cannot use both, fingerprint from file and "
265 "host (multiple fingerprints not impl. yet)\n");
266
267 exit (EXIT_FAILURE);
268 }
269
270 frandom = fopen (RANDOM_DEV, "rb");
271 if (frandom == NULL) {
272 fprintf (stderr, "could not gain access to random device\n");
273 exit (EXIT_FAILURE);
274 }
275
276 if (do_seal || do_fp)
277 memset (&fp, '\x00', sizeof (fp));
278
279 if (do_fp)
280 prepare_fingerprint (&fp);
281
282 if (do_seal) {
283 fp.fp.tests = fp_tests;
284 }
285
286 stub_len = sizeof (stub_bin) - 1;
287 stub_data = malloc (stub_len + SHDR_MAXSIZE);
288 memcpy (stub_data, stub_bin, stub_len);
289
290 printf ("loaded %lu bytes @ 0x%08lx\n",
291 stub_len, (unsigned long int) stub_data);
292
293 if (be_layer0_size == 0) {
294 printf ("doing no entire pre-stub encryption\n");
295 } else {
296 if (stub_len < be_layer0_size) {
297 fprintf (stderr, "first layer encryption start is "
298 "greater than stub length\n");
299
300 exit (EXIT_FAILURE);
301 }
302
303 printf ("doing pre-stub encryption (@ 0x%08lx) from "
304 "offset 0x%08lx\n", be_layer0_start, be_layer0_size);
305 printf ("next entry point is 0x%08lx\n", be_layer0_cont);
306 }
307
308 wrap (inputname, stub_data, stub_len);
309 free (stub_data);
310
311 fclose (frandom);
312
313 printf ("\n---------------------------------------------------------"
314 "----------------------\n\n");
315
316
317 exit (EXIT_SUCCESS);
318}
319
320
321void
322wrap (char *program, unsigned char *stub_data, unsigned long int stub_len)
323{
324 FILE * fexe;
325 unsigned char * exe_data;
326 unsigned long int exe_len;
327 Elf32_Ehdr * ehdr;
328 Elf32_Phdr * phdr;
329 unsigned long int maxbrk;
330 unsigned char * output;
331 unsigned char * shdr_sub;
332
333 stubhdr_pass sp_save;
334 fp_fin * seal; /* where the SEAL stored */
335
336
337
338 ehdr = (Elf32_Ehdr *) stub_data;
339 phdr = (Elf32_Phdr *) (stub_data + ehdr->e_phoff);
340 if (ehdr->e_phnum != 2) {
341 fprintf (stderr, "stub.bin must have exactly two program "
342 "headers, aborting.\n");
343 exit (EXIT_FAILURE);
344 }
345 if (ehdr->e_shoff != 0) {
346 fprintf (stderr, "stub.bin contains section headers, "
347 "aborting.\n");
348 exit (EXIT_FAILURE);
349 }
350 if (phdr[0].p_memsz != phdr[0].p_filesz) {
351 fprintf (stderr, "first segment in stub.bin has diverging "
352 "file/mem sizes, aborting.\n");
353 exit (EXIT_FAILURE);
354 }
355
356 printf ("end of segment 1: 0x%08lx\n",
357 (unsigned long int) (phdr[0].p_offset + phdr[0].p_memsz));
358
359 if (stub_len != phdr[0].p_offset + phdr[0].p_memsz) {
360 fprintf (stderr, "bogus bytes at the end, i.e. something "
361 "between segments end and file end.\n");
362 exit (EXIT_FAILURE);
363 }
364
365 fexe = fopen (program, "rb");
366 if (fexe == NULL) {
367 fprintf (stderr, "failed to open %s\n", program);
368 exit (EXIT_FAILURE);
369 }
370
371 fseek (fexe, 0, SEEK_END);
372 exe_len = ftell (fexe);
373 fseek (fexe, 0, SEEK_SET);
374
375 exe_data = malloc (exe_len);
376 if (fread (exe_data, exe_len, 1, fexe) != 1) {
377 fprintf (stderr, "failed to read %s into memory\n", program);
378 exit (EXIT_FAILURE);
379 }
380 fclose (fexe);
381
382
383 /* get maximum brk call we have to enforce. do this before the
384 * executeable is getting encrypted ;)
385 */
386 maxbrk = getmaxbrk (exe_data);
387 printf ("brk(0) to force is 0x%08lx\n", maxbrk);
388
389
390 /* sizeof (unsigned long int), because we have the dummy magic value
391 * in there to detect the stub-running-on-its-own case */
392 stub_len -= sizeof (unsigned long int); /* dummy, be_stubhdr_u */
393 shdr = (stubhdr *) (stub_data + stub_len);
394 shdr->flags = 0x00000000;
395 SEAL_STORE (fp.stubhdr_flags_ofs, &shdr->flags);
396 shdr->payload_len = exe_len;
397
398 shdr_sub = ((unsigned char *) shdr) + sizeof (stubhdr);
399
400
401 /* stubhdr_size contains the minimum size now, any optional/dynamic
402 * data that is following. 'shdr_sub' walks with the header end, so
403 * you can/must add/append to it and move it.
404 */
405
406 if (unlink_env != NULL) {
407 stubhdr_unlink * su;
408
409 su = (stubhdr_unlink *) shdr_sub;
410 shdr_sub += sizeof (stubhdr_unlink);
411
412 if (strlen (unlink_env) >= sizeof (su->ul_env)) {
413 fprintf (stderr, "too long unlink environment "
414 "variable\n");
415
416 exit (EXIT_FAILURE);
417 }
418
419 memset (su->ul_env, '\0', sizeof (su->ul_env));
420 memcpy (su->ul_env, unlink_env, strlen (unlink_env));
421
422 shdr->flags |= BE_FLAG_UNLINK;
423 fprintf (stderr, "added self deletion on environment "
424 "variable '%s'\n", unlink_env);
425 }
426
427 if (tag_used) {
428 stubhdr_tag * st;
429 unsigned int tw;
430 unsigned char tag_hash[20];
431 rc4_key key_t;
432
433
434 st = (stubhdr_tag *) shdr_sub;
435 shdr_sub += sizeof (stubhdr_tag);
436
437 /* obfuscate the environment variable a bit (strings !)
438 */
439 for (tw = 0 ; tw < sizeof (tag_env) ; ++tw) {
440 st->tag_env[tw] = (0xaa + (~tw << (tw % 4))) ^
441 tag_env[tw];
442 }
443
444 /* encrypt tag value
445 */
446 SHA1HashLen (tag_key, strlen (tag_key), tag_hash);
447 rc4_prepare_key (tag_hash, sizeof (tag_hash), &key_t);
448 rc4_cipher (tag_value, sizeof (tag_value), &key_t);
449 memcpy (st->tag_value, tag_value, sizeof (tag_value));
450
451 shdr->flags |= BE_FLAG_TAGGED;
452 }
453
454 if (banner != NULL) {
455 stubhdr_banner * sb;
456
457 if (strlen (banner) >= MAX_BANNER) {
458 fprintf (stderr, "banner size exceeded.\n");
459 exit (EXIT_FAILURE);
460 }
461
462 shdr->flags |= BE_FLAG_BANNER;
463 if (banner_tty)
464 shdr->flags |= BE_FLAG_BANNER_TTY;
465
466 sb = (stubhdr_banner *) shdr_sub;
467 sb->banner_len = strlen (banner);
468
469 shdr_sub += sizeof (stubhdr_banner);
470 memcpy ((unsigned char *) shdr_sub, banner, sb->banner_len);
471 shdr_sub += sb->banner_len;
472 }
473
474 /* do password encryption ? */
475 if (pw_enc) {
476 /* add a random 20 byte block to add some dynamic element, i.e.
477 * to generate two completely different outputs, even if the
478 * same input key is used
479 */
480 unsigned char xor_hash[20]; /* xor hash */
481 unsigned char pw_hash[20]; /* real hash */
482 int key_n;
483 rc4_key key_r;
484 stubhdr_pass * sp = &sp_save;
485
486
487 memset (sp, '\x00', sizeof (stubhdr_pass));
488
489 /* if we should check for correct decryption (recommended),
490 * then hash decrypted data before and store first four bytes
491 * of hash for verification
492 */
493 if (pw_check) {
494 unsigned char hash[20];
495
496 SHA1HashLen (exe_data, exe_len, hash);
497 shdr->flags |= BE_FLAG_PASSWORD_CHECK;
498 memcpy (sp->pw_check, hash, 4);
499 }
500
501 if (fread (&xor_hash, sizeof (xor_hash), 1, frandom) != 1) {
502 fprintf (stderr, "seeding xor_hash key failed\n");
503
504 exit (EXIT_FAILURE);
505 }
506
507 /* add infos to stub header */
508 shdr->flags |= BE_FLAG_PASSWORD;
509 memcpy (sp->pw_xor, xor_hash, sizeof (xor_hash));
510
511 /* password from environment ?
512 */
513 memset (sp->pw_env, '\0', sizeof (sp->pw_env));
514
515 if (pw_env != NULL) {
516 /* check if it fits into the structure */
517 if (strlen (pw_env) >= sizeof (sp->pw_env)) {
518 fprintf (stderr, "password environment "
519 "variable '%s' too long, aborting\n",
520 pw_env);
521
522 exit (EXIT_FAILURE);
523 }
524
525 memcpy (sp->pw_env, pw_env, strlen (pw_env) + 1);
526
527 /* little magic: overwrite currently set password with
528 * the one in the environment variable, this is what
529 * you want, usually. really, you want it :)
530 */
531 if (getenv (sp->pw_env) != NULL)
532 pw_pass = getenv (sp->pw_env);
533 }
534
535 if (pw_pass == NULL) {
536 fprintf (stderr, "you want password encryption, so "
537 "set a password, jerk!\n");
538
539 exit (EXIT_FAILURE);
540 }
541
542 /* merge keys and encrypt */
543 /* key = H (H (P) ^ xor_hash) */
544 SHA1HashLen (pw_pass, strlen (pw_pass), pw_hash);
545 for (key_n = 0 ; key_n < sizeof (pw_hash) ; ++key_n)
546 pw_hash[key_n] ^= xor_hash[key_n];
547 SHA1HashLen (pw_hash, sizeof (pw_hash), pw_hash);
548
549 rc4_prepare_key (pw_hash, sizeof (pw_hash), &key_r);
550 rc4_cipher (exe_data, exe_len, &key_r);
551 }
552
553 /* do fingerprint layer now, password header will follow us
554 */
555 if (do_fp) {
556 int n;
557 unsigned char key[20];
558 rc4_key key_r;
559 fp_fin * fp_target; /* where it is stored */
560
561
562 if (fp_check) {
563 unsigned char chk_hash[20];
564
565 shdr->flags |= BE_FLAG_FINGERPRINT_CHK;
566
567 SHA1HashLen (exe_data, exe_len, chk_hash);
568 memcpy (fp.fp_check, chk_hash, 4);
569 }
570
571 shdr->flags |= BE_FLAG_FINGERPRINT;
572
573#ifdef DEBUG
574 fprintf (stderr, " fp: %02x %02x %02x %02x\n",
575 fp.fp.hash_arr[0], fp.fp.hash_arr[1],
576 fp.fp.hash_arr[2], fp.fp.hash_arr[3]);
577#endif
578 SHA1HashLen (fp.fp.hash_arr, fp_len, key);
579#ifdef DEBUG
580 fprintf (stderr, "mkey: %02x %02x %02x %02x\n",
581 key[0], key[1], key[2], key[3]);
582#endif
583
584 for (n = 0 ; n < sizeof (key) ; ++n)
585 key[n] ^= fp.fp_xor[n];
586
587 SHA1HashLen (key, sizeof (key), key);
588 rc4_prepare_key (key, sizeof (key), &key_r);
589 rc4_cipher (exe_data, exe_len, &key_r);
590
591 /* do the real installation now
592 */
593 fp_target = (fp_fin *) shdr_sub;
594 memcpy (fp_target, &fp, sizeof (fp_fin));
595 shdr_sub += sizeof (fp_fin);
596
597 if (fp.par_len > 0) {
598 memcpy (shdr_sub, fp.par_data, fp.par_len);
599 shdr_sub += fp.par_len;
600 free (fp_target->par_data);
601 }
602
603 /* now clean data, which was allocated by prepate_fingerprint
604 */
605 free (fp_target->fp.hash_arr);
606 fp_target->fp.hash_arr = NULL;
607 fp_target->par_data = NULL;
608
609 /* seal and fingerprinting cannot co-exist, for that the seal header
610 * is a fingerprint header which is not activated yet, but will be in
611 * the sealed executeable, where it will become a full fingerprint
612 * header
613 */
614 } else if (do_seal) {
615
616 seal = (fp_fin *) shdr_sub;
617 shdr_sub += sizeof (fp_fin);
618
619 memcpy (seal, &fp, sizeof (fp_fin));
620
621 SEAL_STORE (seal->sealhdr_ofs, seal);
622 seal->be_layer0_filestart = BE_LAYER0_FILESTART;
623 seal->be_layer0_size = BE_LAYER0_SIZE;
624 seal->be_layer0_cont = BE_LAYER0_CONT;
625
626 shdr->flags |= BE_FLAG_SEALNOW;
627 }
628
629 /* we have to write the header in reverse order for decryption
630 */
631 if (pw_enc) {
632 stubhdr_pass * sp;
633
634 sp = (stubhdr_pass *) shdr_sub;
635 shdr_sub += sizeof (stubhdr_pass);
636
637 memcpy (sp, &sp_save, sizeof (stubhdr_pass));
638 }
639
640 /* XXX: add other layers here
641 */
642
643 /* this is the real final lenght of the stub header, it does not
644 * change from below here
645 */
646 shdr->stubhdr_size = (unsigned char *) shdr_sub -
647 (unsigned char *) shdr;
648
649 /* do not change anything here */
650 stub_len += shdr->stubhdr_size;
651 fprintf (stderr, "XXX: stub_len = 0x%08lx\n", stub_len);
652
653 /* XXX: no further additions to the stub from here, only modifications
654 */
655 if (do_seal) {
656 seal->payload_ofs = stub_len;
657 seal->payload_len = exe_len;
658
659 /* XXX: DEBUG */
660 fprintf (stderr, "exe_data: %02x %02x %02x %02x %02x\n",
661 exe_data[0], exe_data[1], exe_data[2],
662 exe_data[3], exe_data[4]);
663 }
664
665 fprintf (stderr, "phdr 1 @ 0x%08lx\n", (unsigned long int) phdr[0].p_vaddr);
666 fprintf (stderr, "phdr 2 @ 0x%08lx\n", (unsigned long int) phdr[1].p_vaddr);
667
668
669 /* fixup program headers */
670 phdr[0].p_filesz -= sizeof (unsigned long int);
671 phdr[0].p_filesz += shdr->stubhdr_size;
672 phdr[0].p_filesz += exe_len;
673
674 phdr[0].p_memsz += exe_len;
675 phdr[0].p_memsz += 0x1000 - (phdr[0].p_memsz % 0x1000);
676
677 /* patch a zero sized second header to fix brk(0) value set by kernel.
678 * make it use the byte directly behind the first header.
679 */
680 phdr[1].p_memsz = phdr[1].p_filesz = 0;
681 phdr[1].p_vaddr = maxbrk;
682 phdr[1].p_paddr = maxbrk;
683 phdr[1].p_offset = phdr[0].p_offset + phdr[0].p_filesz;
684
685
686 /* merge stub and executeable */
687 output = malloc (stub_len + exe_len);
688 memcpy (output, stub_data, stub_len);
689 memcpy (output + stub_len, exe_data, exe_len);
690 free (exe_data);
691
692
693 /* simple outer obfuscation layer */
694 if (be_layer0_size != 0) {
695 unsigned long int * lp;
696 unsigned long int chunk_data,
697 crypt_len,
698 crypt_key;
699
700 /* relative pointer at place where to encrypt */
701 chunk_data = be_layer0_start - phdr[0].p_vaddr +
702 be_layer0_size;
703
704 /* pointer to store key and length in binary */
705 lp = (unsigned long int *) (be_layer0_start - phdr[0].p_vaddr +
706 output);
707
708 /* length of data to en/decrypt */
709 crypt_len = phdr[0].p_filesz - chunk_data;
710
711 if (do_seal == 0) {
712 if (fread (&crypt_key, sizeof (crypt_key), 1, frandom) != 1) {
713 fprintf (stderr, "seeding crypto key failed\n");
714 exit (EXIT_FAILURE);
715 }
716 printf ("obfuscation layer: key = 0x%08lx\n", crypt_key);
717
718 glfsr_crypt (output + chunk_data, output + chunk_data,
719 crypt_len, crypt_key);
720 } else {
721 crypt_len = crypt_key = 0;
722 }
723
724 *lp++ = crypt_len;
725 *lp++ = crypt_key;
726 *lp++ = be_layer0_cont;
727 }
728
729
730 /* dump new executeable to disk */
731 fexe = fopen (outputname, "wb");
732 if (fwrite (output, stub_len + exe_len, 1, fexe) != 1) {
733 fprintf (stderr, "failed to write %lu output bytes to file 'output'\n",
734 stub_len + exe_len);
735
736 exit (EXIT_FAILURE);
737 }
738
739 fclose (fexe);
740 chmod (outputname, S_IRUSR | S_IWUSR | S_IXUSR);
741
742 free (output);
743
744 return;
745}
746
747
748unsigned long int
749getmaxbrk (unsigned char *elf)
750{
751 int n;
752 unsigned long int mbrk = 0;
753 Elf32_Ehdr * ehdr = (Elf32_Ehdr *) elf;
754 Elf32_Phdr * phdr = (Elf32_Phdr *) (elf + ehdr->e_phoff);
755
756 for (n = 0 ; n < ehdr->e_phnum ; ++n) {
757 if (phdr[n].p_type != PT_LOAD)
758 continue;
759
760 if ((phdr[n].p_vaddr + phdr[n].p_memsz) > mbrk)
761 mbrk = phdr[n].p_vaddr + phdr[n].p_memsz;
762 }
763
764 return (mbrk);
765}
766
767
768unsigned char *
769file_read (char *pathname)
770{
771 FILE * bf;
772 unsigned char c;
773 unsigned int cont_len;
774 unsigned char * cont = NULL;
775
776
777 bf = fopen (pathname, "r");
778 if (bf == NULL)
779 return (NULL);
780
781 /* yepp, its slow. f* caches internally though */
782 for (cont_len = 0 ; fread (&c, 1, 1, bf) == 1 ; ++cont_len) {
783 cont = realloc (cont, cont_len + 1);
784 cont[cont_len] = c;
785 }
786 fclose (bf);
787
788 cont = realloc (cont, cont_len + 1);
789 cont[cont_len] = '\0';
790
791 return (cont);
792}
793
794
795void
796prepare_fingerprint (fp_fin *f)
797{
798 unsigned int ha_len;
799 unsigned char * ha =
800 malloc ((N_TEST * N_SUBHASH) + 4);
801
802
803 if (fread (f->fp_xor, sizeof (f->fp_xor), 1, frandom) != 1) {
804 fprintf (stderr, "failed to read fingerprint xor block\n");
805 exit (EXIT_FAILURE);
806 }
807
808 /* read fingerprint and tests into fp, either from file or from
809 * current host
810 */
811 f->fp.hash_arr = ha;
812 if (fp_fromhost) {
813 f->fp.tests = fp_tests;
814 fp_get (&f->fp);
815 } else {
816 read_fingerprint (&f->fp, fp_name);
817 }
818 ha_len = fp_len = fp_counttests (&f->fp) * N_SUBHASH;
819#ifdef DEBUG
820 fprintf (stderr, "test: 0x%08lx\n", f->fp.tests);
821#endif
822
823 if (fp_len == 0) {
824 fprintf (stderr, "no fingerprints given\n");
825
826 exit (EXIT_FAILURE);
827 }
828
829 /* warn on erasure possible attack
830 */
831 if (fp_tolerance != 0 &&
832 (fp_tolerance * N_SUBHASH) >= (fp_len - N_SUBHASH))
833 {
834 printf ("WARNING: erasure attack on fingerprint deviation "
835 "algorithm possible\n");
836 printf (" decrease tolerance or use more tests !\n");
837 printf ("\n");
838
839 if (fp_WARN) {
840 printf ("ABORTING: use -E to overwrite. do this only "
841 "if you are absolutely\n"
842 " mentally stable and know exactly "
843 "what you are doing!)\n\n");
844
845 exit (EXIT_FAILURE);
846 }
847 }
848
849 printf ("prepared fingerprint (%d %s, %d bytes)\n",
850 fp_counttests (&f->fp),
851 fp_counttests (&f->fp) == 1 ? "test" : "tests",
852 fp_len);
853
854 /* generate correction pad for fingerprint
855 */
856 if (fp_tolerance != 0) {
857 unsigned char * par_tmp_data =
858 malloc (N_TEST * N_SUBHASH * 2);
859
860 f->par_len = fp_padgen (ha, ha_len, par_tmp_data,
861 N_TEST * N_SUBHASH * 2, fp_tolerance * N_SUBHASH);
862
863 /* strip unneeded bytes and store pad. this pad will be stored
864 * into the stub header of the wrapped executeable. but the
865 * pointer par_data is used only temporarily and will be
866 * NULL'ed out. the stub does recreate the pointer itself
867 */
868 par_tmp_data = realloc (par_tmp_data, f->par_len);
869 f->par_data = par_tmp_data;
870
871 printf ("using parity block of %lu bytes to restore %d "
872 "bytes (%d tests) in subhashes\n",
873 f->par_len, fp_tolerance * N_SUBHASH,
874 fp_tolerance);
875 } else
876 printf ("using no parity block, fingerprint has "
877 "no tolerance\n");
878
879 printf ("\n");
880
881
882 return;
883}
884
885
886/* yah, you're right, it looks a bit messy, originally i wanted to put a
887 * small .y parse in, will come at some time, if the complexity of the
888 * possible configuration options exceed commandline/file freedom. ;-)
889 */
890
891void
892read_fingerprint (fp_s *fp, char *pathname)
893{
894 int in_fp = 0;
895 FILE * inf;
896 unsigned char line[128];
897 unsigned char keyword[64];
898 unsigned char * ha_p;
899 unsigned char * ha_p_end;
900
901
902 inf = fopen (pathname, "r");
903 if (inf == NULL) {
904 fprintf (stderr, "failed to open fingerprint file \"%s\"\n",
905 pathname);
906 exit (EXIT_FAILURE);
907 }
908
909 fp->tests = 0; /* file is going to tell us what to enable */
910
911 /* read in test values and fingerprint raw data
912 * all the enable statements must preceed the fingerprint data !
913 */
914 ha_p = fp->hash_arr;
915 ha_p_end = ha_p + (N_TEST * N_SUBHASH);
916
917 while (fgets (line, sizeof (line), inf) != NULL) {
918 if (in_fp && strcmp (line, "end\n") == 0) {
919 if ((ha_p - fp->hash_arr) !=
920 (fp_counttests (fp) * N_SUBHASH))
921 {
922 fprintf (stderr, "test count and fingerprint "
923 "do not match (%d to file: %d) !\n",
924 fp_counttests (fp) * N_SUBHASH,
925 ha_p - fp->hash_arr);
926
927 exit (EXIT_FAILURE);
928 }
929
930 fclose (inf);
931 return;
932 }
933 if (in_fp) {
934 unsigned char * lp;
935
936#define HEXCHECK(c) { if (strchr(hexarr,(c)) == NULL) {\
937 fprintf(stderr, "invalid character \\x%02x in fingerprint data\n", (c));\
938 exit (EXIT_FAILURE);}}
939#define HEXTRANS(c) ((unsigned int)(strchr(hexarr,(c)) - hexarr))
940
941 for (lp = line ; strlen (lp) > 2 && ha_p < ha_p_end ; lp += 2) {
942 char hexarr[] = "0123456789abcdef";
943
944 HEXCHECK(lp[0]); HEXCHECK(lp[1]);
945 ha_p[0] = (HEXTRANS(lp[0]) << 4) |
946 HEXTRANS(lp[1]);
947 ha_p += 1;
948 }
949 } else if (strcmp (line, "begin\n") == 0) {
950 in_fp = 1;
951 } else if (sscanf (line, "enable %64s\n", keyword) == 1) {
952 keyword[sizeof (keyword) - 1] = '\0';
953 fp_tenable (fp, keyword);
954 } else if (sscanf (line, "disable %64s\n", keyword) == 1) {
955 keyword[sizeof (keyword) - 1] = '\0';
956 fp_tdisable (fp, keyword);
957 } else if (strlen (line) != 1 && line[0] != '#') {
958 goto bail;
959 }
960 }
961
962bail:
963 fprintf (stderr, "syntax error in fingerprint file\n");
964
965 exit (EXIT_FAILURE);
966}
967
968
diff --git a/other/burneye/src/common.c b/other/burneye/src/common.c
new file mode 100644
index 0000000..51eabad
--- /dev/null
+++ b/other/burneye/src/common.c
@@ -0,0 +1,53 @@
1
2#include <stdio.h>
3#include <string.h>
4#include <stdlib.h>
5#include "common.h"
6
7
8void *
9xrealloc (void *m_ptr, size_t newsize)
10{
11 void *n_ptr;
12
13 n_ptr = realloc (m_ptr, newsize);
14 if (n_ptr == NULL) {
15 fprintf (stderr, "realloc failed\n");
16 exit (EXIT_FAILURE);
17 }
18
19 return (n_ptr);
20}
21
22
23char *
24xstrdup (char *str)
25{
26 char *b;
27
28 b = strdup (str);
29 if (b == NULL) {
30 fprintf (stderr, "strdup failed\n");
31 exit (EXIT_FAILURE);
32 }
33
34 return (b);
35}
36
37
38void *
39xcalloc (int factor, size_t size)
40{
41 void *bla;
42
43 bla = calloc (factor, size);
44
45 if (bla == NULL) {
46 fprintf (stderr, "no memory left\n");
47 exit (EXIT_FAILURE);
48 }
49
50 return (bla);
51}
52
53
diff --git a/other/burneye/src/common.h b/other/burneye/src/common.h
new file mode 100644
index 0000000..1a58e61
--- /dev/null
+++ b/other/burneye/src/common.h
@@ -0,0 +1,12 @@
1
2#ifndef COMMON_H
3#define COMMON_H
4
5#include <sys/types.h>
6
7void * xrealloc (void *m_ptr, size_t newsize);
8char * xstrdup (char *str);
9void * xcalloc (int factor, size_t size);
10
11#endif
12
diff --git a/other/burneye/src/conf/Makefile b/other/burneye/src/conf/Makefile
new file mode 100644
index 0000000..b6ff8b2
--- /dev/null
+++ b/other/burneye/src/conf/Makefile
@@ -0,0 +1,21 @@
1
2CFLAGS = -Wall
3ifeq ($(debug),on)
4CFLAGS += -ggdb
5DFLAGS += -DDEBUG
6else
7CFLAGS += -O2
8endif
9
10YACC = bison
11YACCOPT = -b conf-parser -p cf -d -t -v
12LEX = flex
13LEXOPT = -pcf -oconf-lexer.c
14
15
16conf-lexer.c: config.l
17 $(LEX) $(LEXOPT) config.l
18
19clean:
20# rm -f conf-parser.[ch] conf-parser.output
21# rm -f conf-lexer.c
diff --git a/other/burneye/src/conf/config.l b/other/burneye/src/conf/config.l
new file mode 100644
index 0000000..ee7db57
--- /dev/null
+++ b/other/burneye/src/conf/config.l
@@ -0,0 +1,50 @@
1/* burneye - configuration file lexer
2 *
3 * -scut
4 */
5
6%{
7
8#include <string.h>
9#include "../common.h"
10
11%}
12
13%%
14
15[\n\t ]+ ;
16
17\{ {
18 return (EXPR_BLOCK_BEGIN);
19 }
20
21\} {
22 return (EXPR_BLOCK_END);
23 }
24
25\"[^\"]*\" {
26 cflval.str = xstrdup (cftext + 1);
27 cflval.str[strlen (cflval.str) - 1] = '\0';
28
29 return (QSTRING);
30 }
31
32function {
33 return (FUNCTION);
34 }
35
360x[0123456789abcdef]+ {
37 sscanf (cftext, "0x%lx", &cflval.num);
38
39 return (NUM);
40 }
41
42[0123456789]+ {
43 sscanf (cftext, "%lu", &cflval.num);
44
45 return (NUM);
46}
47
48. return (cftext[0]);
49
50
diff --git a/other/burneye/src/conf/config.y b/other/burneye/src/conf/config.y
new file mode 100644
index 0000000..4285e75
--- /dev/null
+++ b/other/burneye/src/conf/config.y
@@ -0,0 +1,27 @@
1/* burneye - configuration file parser
2 *
3 * -scut
4 */
5
6%{
7
8%}
9
10%union {
11 unsigned char * str;
12 unsigned long int num;
13}
14
15%token <str> EXPR_BLOCK_BEGIN
16%token <str> EXPR_BLOCK_END
17%token <str> QSTRING
18%token <str> FUNCTION
19%token <num> NUM
20
21/* types here */
22/* %type <pp_element> script */
23
24%%
25
26configuration:
27
diff --git a/other/burneye/src/conf/tmp/Makefile b/other/burneye/src/conf/tmp/Makefile
new file mode 100644
index 0000000..035b9c1
--- /dev/null
+++ b/other/burneye/src/conf/tmp/Makefile
@@ -0,0 +1,39 @@
1CC = gcc
2#CFLAGS = -Wall -O2 -static
3CFLAGS = -Wall -ggdb
4#CFLAGS = -Wall -ggdb -DDEBUG
5#CFLAGS = -Wall -ggdb -DYYDEBUG -DDEBUG
6
7LIBS =
8
9YACC = yacc
10YACCOPT = -d -v -t
11LEX = lex
12LEXOPT =
13
14OBJS = ../../shared/common.o condition.o compiler_main.o branch.o call.o \
15 element.o functions.o script.o symbol.o y.tab.o lex.yy.o
16
17
18all: compiler-test
19
20link: $(OBJS)
21
22dist: lex.yy.c y.tab.h
23
24compiler-test: $(OBJS) compiler-test.c
25 $(CC) -o compiler-test compiler-test.c $(OBJS) $(CFLAGS) $(LIBS)
26
27lex.yy.o: lex.yy.c y.tab.h
28
29lex.yy.c: compiler.l
30 $(LEX) $(LEXOPT) compiler.l
31
32y.tab.c y.tab.h: compiler.y
33 $(YACC) $(YACCOPT) compiler.y
34
35clean:
36 rm -f y.tab.c y.tab.h y.output lex.yy.c
37 rm -f compiler-test
38 rm -f *.o
39
diff --git a/other/burneye/src/conf/tmp/branch.c b/other/burneye/src/conf/tmp/branch.c
new file mode 100644
index 0000000..3e0f336
--- /dev/null
+++ b/other/burneye/src/conf/tmp/branch.c
@@ -0,0 +1,61 @@
1/* fornax - distributed network
2 *
3 * by team teso
4 *
5 * scripting branching routines
6 */
7
8#include <stdlib.h>
9#include "../../shared/common.h"
10#include "condition.h"
11#include "branch.h"
12
13
14branch *
15br_create (void)
16{
17 branch * new = xcalloc (1, sizeof (branch));
18
19 return (new);
20}
21
22
23void
24br_free (branch *br)
25{
26 elem_list_free (br->b_true);
27 elem_list_free (br->b_false);
28 cond_free (br->cond);
29 free (br);
30
31 return;
32}
33
34
35branch *
36br_set_condition (branch *br, condition *cond)
37{
38 br->cond = cond;
39
40 return (br);
41}
42
43
44branch *
45br_set_block_if (branch *br, element **bl)
46{
47 br->b_true = bl;
48
49 return (br);
50}
51
52
53branch *
54br_set_block_else (branch *br, element **bl)
55{
56 br->b_false = bl;
57
58 return (br);
59}
60
61
diff --git a/other/burneye/src/conf/tmp/branch.h b/other/burneye/src/conf/tmp/branch.h
new file mode 100644
index 0000000..8fdf9a4
--- /dev/null
+++ b/other/burneye/src/conf/tmp/branch.h
@@ -0,0 +1,74 @@
1/* fornax - distributed network
2 *
3 * by team teso
4 *
5 * scripting branching includes
6 */
7
8#ifndef FNX_BRANCH_H
9#define FNX_BRANCH_H
10
11#include "condition.h"
12#include "element.h"
13
14
15typedef struct {
16 condition * cond;
17 element ** b_true;
18 element ** b_false;
19} branch;
20
21
22/* br_create
23 *
24 * branch constructor. create a new branch structure
25 *
26 * return a pointer to the new structure
27 */
28
29branch * br_create (void);
30
31
32/* br_free
33 *
34 * free the whole branch pointed to by `br'
35 *
36 * return in any case
37 */
38
39void br_free (branch *br);
40
41
42/* br_set_condition
43 *
44 * set condition `cond' for branch `br'
45 *
46 * return pointer to structure
47 */
48
49branch * br_set_condition (branch *br, condition *cond);
50
51
52/* br_set_block_if
53 *
54 * set block `bl' for branch `br' on true case
55 *
56 * return pointer to structure
57 */
58
59branch * br_set_block_if (branch *br, element **bl);
60
61
62/* br_set_block_else
63 *
64 * set block `bl' for branch `br' on false case
65 *
66 * return pointer to structure
67 */
68
69branch * br_set_block_else (branch *br, element **bl);
70
71
72#endif
73
74
diff --git a/other/burneye/src/conf/tmp/call.c b/other/burneye/src/conf/tmp/call.c
new file mode 100644
index 0000000..a4bf073
--- /dev/null
+++ b/other/burneye/src/conf/tmp/call.c
@@ -0,0 +1,56 @@
1/* fornax - distributed network
2 *
3 * by team teso
4 *
5 * scripting call routines
6 */
7
8
9#include <stdlib.h>
10#include "../../shared/common.h"
11#include "symbol.h"
12#include "call.h"
13
14
15call *
16call_create (void)
17{
18 call * new = xcalloc (1, sizeof (call));
19
20 return (new);
21}
22
23
24void
25call_free (call *c)
26{
27 if (c == NULL)
28 return;
29
30 sym_free (c->parameters);
31 if (c->name != NULL)
32 free (c->name);
33 free (c);
34
35 return;
36}
37
38
39call *
40call_set_name (call *c, char *name)
41{
42 c->name = name;
43
44 return (c);
45}
46
47
48call *
49call_set_parameters (call *c, sym_elem **par)
50{
51 c->parameters = par;
52
53 return (c);
54}
55
56
diff --git a/other/burneye/src/conf/tmp/call.h b/other/burneye/src/conf/tmp/call.h
new file mode 100644
index 0000000..33d2b8f
--- /dev/null
+++ b/other/burneye/src/conf/tmp/call.h
@@ -0,0 +1,62 @@
1/* fornax - distributed network
2 *
3 * by team teso
4 *
5 * scripting call includes
6 */
7
8#ifndef FNX_CALL_H
9#define FNX_CALL_H
10
11#include "symbol.h"
12
13
14typedef struct {
15 char * name;
16 sym_elem ** parameters;
17} call;
18
19
20/* call_create
21 *
22 * call constructor.
23 *
24 * return a pointer to a new call structure
25 */
26
27call * call_create (void);
28
29
30/* call_free
31 *
32 * free a call structure pointed to by `c' completely, including any symbol
33 * information
34 *
35 * return in any case
36 */
37
38void call_free (call *c);
39
40
41/* call_set_name
42 *
43 * set the name `name' for a call structure pointed to by `c'
44 *
45 * return pointer to the structure
46 */
47
48call * call_set_name (call *c, char *name);
49
50
51/* call_set_parameters
52 *
53 * set parameters `par' for a call structure pointed to by `c'
54 *
55 * return pointer to the structure
56 */
57
58call * call_set_parameters (call *c, sym_elem **par);
59
60
61#endif
62
diff --git a/other/burneye/src/conf/tmp/compiler-test.c b/other/burneye/src/conf/tmp/compiler-test.c
new file mode 100644
index 0000000..969ae4d
--- /dev/null
+++ b/other/burneye/src/conf/tmp/compiler-test.c
@@ -0,0 +1,74 @@
1/* fornax - distributed network
2 *
3 * by team teso
4 *
5 * compiler test program
6 */
7
8#include <stdio.h>
9#include <stdlib.h>
10#include <string.h>
11#include "../../shared/common.h"
12#include "element.h"
13#include "compiler.h"
14#include "script.h"
15
16
17extern void scr_elem_exec (element **el);
18char * file_read (char *filename);
19
20
21char *
22file_read (char *filename)
23{
24 FILE *fp;
25 char *array = NULL;
26 unsigned long int readbytes = 0;
27 size_t rb;
28
29 fp = fopen (filename, "r");
30 if (fp == NULL)
31 return (NULL);
32
33 do {
34 array = xrealloc (array, readbytes + 1024);
35 rb = fread (array + readbytes, 1, 1024, fp);
36 readbytes += rb;
37 } while (rb > 0);
38
39 fclose (fp);
40
41 return (array);
42}
43
44
45int
46main (int argc, char **argv)
47{
48 element ** script_c;
49 char * script;
50
51 if (argc != 2) {
52 printf ("usage: %s <inputfile>\n\n", argv[0]);
53 exit (EXIT_FAILURE);
54 }
55
56 script = file_read (argv[1]);
57 if (script == NULL) {
58 fprintf (stderr, "couldn't open %s, aborting\n", argv[1]);
59 exit (EXIT_FAILURE);
60 }
61
62 script_c = cp_compile (script, strlen (script));
63 printf ("-------------------------------------------------------------------------------\n");
64 printf ("compilation of script %s %s.\n\n", argv[1], (script_c == NULL) ? "failed" : "successful");
65
66 printf ("\ntrying to run it...\n");
67 scr_elem_exec (script_c);
68
69 elem_list_free (script_c);
70
71 exit (EXIT_SUCCESS);
72}
73
74
diff --git a/other/burneye/src/conf/tmp/compiler.h b/other/burneye/src/conf/tmp/compiler.h
new file mode 100644
index 0000000..db49e1f
--- /dev/null
+++ b/other/burneye/src/conf/tmp/compiler.h
@@ -0,0 +1,18 @@
1/* fornax - distributed network
2 *
3 * by team teso
4 *
5 * compiler include file
6 */
7
8#ifndef FNX_COMPILER_H
9#define FNX_COMPILER_H
10
11int yyerror (char *str);
12int yywrap (void);
13element ** cp_compile (char *buf, int buf_len);
14int cp_yyinput (char *buf, int size_max);
15
16#endif
17
18
diff --git a/other/burneye/src/conf/tmp/compiler.l b/other/burneye/src/conf/tmp/compiler.l
new file mode 100644
index 0000000..1dbb21b
--- /dev/null
+++ b/other/burneye/src/conf/tmp/compiler.l
@@ -0,0 +1,95 @@
1/* fornax - distributed packet network
2 *
3 * by team teso
4 *
5 * lex command lexical analyzer
6 */
7
8
9%{
10#undef yywrap
11
12#include <string.h>
13#include "../../shared/common.h"
14#include "branch.h"
15#include "call.h"
16#include "compiler.h"
17#include "condition.h"
18#include "element.h"
19#include "symbol.h"
20#include "y.tab.h"
21
22#undef ECHO
23#undef YY_INPUT
24#define YY_INPUT(b, r, ms) (r = cp_yyinput (b, ms))
25
26%}
27
28%%
29
30[\n\t ]+ ; /* strip any whitespaces */
31
32\{ {
33 return (EXPR_BLOCK_BEGIN);
34 }
35
36\} {
37 return (EXPR_BLOCK_END);
38 }
39
40\"[^\"]*\" {
41 yylval.str = xstrdup (yytext + 1);
42 yylval.str[strlen (yylval.str) - 1] = '\x00';
43
44 return (ASTRING);
45 }
46
47[iI][fF] {
48 return (IF);
49 }
50
51[eE][lL][sS][eE] {
52 return (ELSE);
53 }
54
55\$[a-zA-Z\_]+[a-zA-Z0-9\_]* {
56 yylval.str = xstrdup (yytext);
57
58 return (VARIABLE);
59 }
60
61(\&\&)|(\|\|) {
62 if (strcmp (yytext, "&&") == 0)
63 yylval.logoper = LO_AND;
64 else if (strcmp (yytext, "||") == 0)
65 yylval.logoper = LO_OR;
66
67 return (LOG_OPER);
68 }
69
70(\=\=)|(\>\=)|(\<\=)|(\!\=) {
71 if (strcmp (yytext, "==") == 0)
72 yylval.eq = EQ_EQUAL;
73 else if (strcmp (yytext, ">=") == 0)
74 yylval.eq = EQ_GREATEQ;
75 else if (strcmp (yytext, "<=") == 0)
76 yylval.eq = EQ_LOWEREQ;
77 else if (strcmp (yytext, "!=") == 0)
78 yylval.eq = EQ_NOTEQ;
79
80 return (EQ_OP);
81 }
82
83[a-zA-Z0-9\.\_]+ {
84 yylval.str = xstrdup (yytext);
85
86 return (STRING);
87 }
88
89[=] {
90 return (EQ);
91 }
92
93. return (yytext[0]);
94
95
diff --git a/other/burneye/src/conf/tmp/compiler.y b/other/burneye/src/conf/tmp/compiler.y
new file mode 100644
index 0000000..d33ca67
--- /dev/null
+++ b/other/burneye/src/conf/tmp/compiler.y
@@ -0,0 +1,271 @@
1/* fornax - distributed packet network
2 *
3 * by team teso
4 *
5 * yacc command parser
6 */
7
8%{
9#ifdef DEBUG
10#include <stdio.h>
11#endif
12#include <stdlib.h>
13#include "branch.h"
14#include "call.h"
15#include "compiler.h"
16#include "condition.h"
17#include "element.h"
18#include "symbol.h"
19
20extern element ** gl_script;
21
22%}
23
24
25%union {
26 int eq; /* equality test operator */
27 int logoper; /* logical operator */
28 char * str; /* generic string pointer */
29 element ** pp_element;
30 element * p_element;
31 call * p_call;
32 branch * p_branch;
33 condition * p_condition;
34 sym_elem * p_sym_elem;
35 sym_elem ** pp_sym_elem;
36}
37
38
39%token <eq> EQ
40%token <eq> EQ_OP
41%token <logoper> LOG_OPER
42%token <str> STRING
43%token <str> ASTRING
44%token <str> VARIABLE
45%token <str> SET
46%token <str> IF
47%token <str> ELSE
48%token <str> EXPR_BLOCK_BEGIN
49%token <str> EXPR_BLOCK_END
50
51%type <pp_element> script
52%type <pp_element> block
53%type <pp_element> elementlist
54%type <p_element> element
55%type <p_call> call
56%type <p_branch> branch
57%type <p_condition> condition
58%type <p_sym_elem> set
59%type <pp_sym_elem> setlist
60
61%%
62
63
64script:
65 block
66 {
67 gl_script = $1;
68 }
69
70 ;
71
72/* a block is a list of expression elements. the block is started with a
73 * `{' bracket and terminated by a `}' bracket. the simplest block just
74 * consists out of "{}"
75 */
76
77block:
78 EXPR_BLOCK_BEGIN elementlist EXPR_BLOCK_END
79 {
80 $$ = $2;
81 }
82
83 | EXPR_BLOCK_BEGIN EXPR_BLOCK_END
84 {
85 $$ = NULL;
86 }
87
88 ;
89
90/* an elementlist is a concatation of single elements, which could be either
91 * expressions, settings or blocks
92 */
93
94elementlist:
95 elementlist element
96 {
97#ifdef DEBUG
98 printf ("element %08x added to elementlist %08x\n", $2, $1);
99#endif
100 $$ = elem_add ($1, $2);
101 }
102
103 | element
104 {
105#ifdef DEBUG
106 printf ("element %08x added to elementlist NULL\n", $1);
107#endif
108 $$ = NULL;
109 $$ = elem_add ($$, $1);
110 }
111
112 ;
113
114
115/* an element is actually the gut of a program. elements are the pieces that
116 * are executed in a linear way, but an element can contain a block of other
117 * elements *shrug*
118 */
119
120element:
121 call
122 {
123#ifdef DEBUG
124 printf ("call element %08x experienced \n", $1);
125#endif
126 $$ = elem_create ();
127 $$ = elem_set_type ($$, ELEM_TYPE_CALL);
128 $$ = elem_set_data ($$, $1);
129 }
130
131 | branch
132 {
133#ifdef DEBUG
134 printf ("branch element %08x experienced \n", $1);
135#endif
136 $$ = elem_create ();
137 $$ = elem_set_type ($$, ELEM_TYPE_BRANCH);
138 $$ = elem_set_data ($$, $1);
139 }
140
141 | set
142 {
143#ifdef DEBUG
144 printf ("set element %08x experienced \n", $1);
145#endif
146 $$ = elem_create ();
147 $$ = elem_set_type ($$, ELEM_TYPE_SET);
148 $$ = elem_set_data ($$, $1);
149 }
150
151 ;
152
153call:
154 STRING '(' setlist ')'
155 {
156#ifdef DEBUG
157 printf ("call with parameters to symbol \"%s\" experienced \n", $1);
158#endif
159 $$ = call_create ();
160 $$ = call_set_name ($$, $1);
161 $$ = call_set_parameters ($$, $3);
162 }
163
164 | STRING '(' ')'
165 {
166#ifdef DEBUG
167 printf ("call without parameters to symbol \"%s\" experienced \n", $1);
168#endif
169 $$ = call_create ();
170 $$ = call_set_name ($$, $1);
171 $$ = call_set_parameters ($$, NULL);
172 }
173
174 ;
175
176setlist:
177 setlist set
178 {
179#ifdef DEBUG
180 printf ("symbol %08x added to symbol table at %08x\n", $2, $1);
181#endif
182 $$ = sym_elem_add ($1, $2);
183 }
184
185 | set
186 {
187#ifdef DEBUG
188 printf ("symbol %08x added to NULL symbol table\n", $1);
189#endif
190 $$ = NULL;
191 $$ = sym_elem_add ($$, $1);
192 }
193
194 ;
195
196set:
197 STRING EQ ASTRING
198 {
199#ifdef DEBUG
200 printf ("symbol pair (%s = \"%s\") created\n", $1, $3);
201#endif
202 $$ = sym_elem_create ($1, $3);
203 }
204
205 ;
206
207branch:
208 IF '(' condition ')' block
209 {
210#ifdef DEBUG
211 printf ("if block with condition at %08x and block at %08x created\n", $3, $5);
212#endif
213 $$ = br_create ();
214 $$ = br_set_condition ($$, $3);
215 $$ = br_set_block_if ($$, $5);
216 $$ = br_set_block_else ($$, NULL);
217 }
218
219 | IF '(' condition ')' block ELSE block
220 {
221#ifdef DEBUG
222 printf ("if block with condition at %08x and blocks at %08x/%08x created\n", $3, $5, $7);
223#endif
224 $$ = br_create ();
225 $$ = br_set_condition ($$, $3);
226 $$ = br_set_block_if ($$, $5);
227 $$ = br_set_block_else ($$, $7);
228 }
229
230 ;
231
232condition:
233 '(' condition LOG_OPER condition ')'
234 {
235#ifdef DEBUG
236 printf ("condition1 at %08x LOG_OPER condition2 at %08x created\n", $2, $4);
237#endif
238 $$ = cond_create ();
239 $$ = cond_set_cond1 ($$, $2);
240 $$ = cond_set_logoper ($$, $3);
241 $$ = cond_set_cond2 ($$, $4);
242 $$ = cond_set_val1 ($$, NULL);
243 $$ = cond_set_val2 ($$, NULL);
244 }
245
246 | STRING EQ_OP ASTRING
247 {
248#ifdef DEBUG
249 printf ("%s EQ_OP \"%s\"\n", $1, $3);
250#endif
251 $$ = cond_create ();
252 $$ = cond_set_cond1 ($$, NULL);
253 $$ = cond_set_cond1 ($$, NULL);
254 $$ = cond_set_val1 ($$, $1);
255 $$ = cond_set_eqop ($$, $2);
256 $$ = cond_set_val2 ($$, $3);
257 }
258
259 ;
260
261%%
262
263#include "script.h"
264#include "branch.h"
265#include "call.h"
266#include "compiler.h"
267#include "condition.h"
268#include "element.h"
269#include "symbol.h"
270
271
diff --git a/other/burneye/src/conf/tmp/compiler_main.c b/other/burneye/src/conf/tmp/compiler_main.c
new file mode 100644
index 0000000..7a75786
--- /dev/null
+++ b/other/burneye/src/conf/tmp/compiler_main.c
@@ -0,0 +1,127 @@
1/* fornax distributed packet network
2 *
3 * by team teso
4 *
5 * scripting compiler routines
6 */
7
8#include <setjmp.h>
9#include <stdio.h>
10#include <stdlib.h>
11#include <sys/time.h>
12#include <unistd.h>
13#include <string.h>
14#include "../../shared/common.h"
15#include "branch.h"
16#include "call.h"
17#include "compiler.h"
18#include "condition.h"
19#include "element.h"
20#include "script.h"
21#include "symbol.h"
22
23
24extern int yydebug;
25extern FILE * yyout;
26
27element ** gl_script;
28
29char * cp_input_ptr;
30int cp_input_lim;
31
32jmp_buf cp_yy_error_jmp;
33
34extern int yyparse (void);
35
36
37/* yacc functions
38 */
39
40int
41yyerror (char *str)
42{
43 /* to handle that errors, go to compiler
44 */
45 longjmp (cp_yy_error_jmp, 1);
46
47 exit (EXIT_FAILURE);
48}
49
50
51int
52yywrap (void)
53{
54#ifdef YYDEBUG
55 printf ("yywrap called\n");
56#endif
57 return (1);
58}
59
60
61/* input functions
62 *
63 * cp_input_lim is the number of bytes stored in the buffer pointed to by
64 * cp_input_ptr. the pointer and the value of cp_input_lim will change while
65 * parsing the input
66 */
67
68/* cp_parse
69 *
70 * parse a action string pointed to by `buf' with a length of `buf_len'
71 *
72 * return the parsed action structure
73 */
74
75element **
76cp_compile (char *buf, int buf_len)
77{
78 gl_script = NULL;
79 cp_input_ptr = buf;
80 cp_input_lim = buf_len;
81
82#ifdef YYDEBUG
83 yydebug = 1;
84#endif
85
86 /* set compilation error jump point, if called handle the errors
87 */
88 if (setjmp (cp_yy_error_jmp) != 0) {
89 if (gl_script != NULL)
90 elem_list_free (gl_script);
91
92 return (NULL);
93 }
94
95 yyparse ();
96
97
98 return (gl_script);
99}
100
101
102/* cp_yyinput
103 *
104 * input functions for the yacc parser to feed strings into it
105 *
106 * return number of bytes "read"
107 */
108
109int
110cp_yyinput (char *buf, int size_max)
111{
112 int n = 0;
113
114 n = (size_max >= cp_input_lim) ?
115 (cp_input_lim) :
116 (size_max);
117
118 if (n > 0) {
119 memmove (buf, cp_input_ptr, n);
120 cp_input_ptr += n;
121 cp_input_lim -= n;
122 }
123
124 return (n);
125}
126
127
diff --git a/other/burneye/src/conf/tmp/condition.c b/other/burneye/src/conf/tmp/condition.c
new file mode 100644
index 0000000..368aa73
--- /dev/null
+++ b/other/burneye/src/conf/tmp/condition.c
@@ -0,0 +1,157 @@
1/* fornax - distributed network
2 *
3 * by team teso
4 *
5 * scripting condition routines
6 */
7
8#include <stdlib.h>
9#include <string.h>
10#include "../../shared/common.h"
11#include "condition.h"
12#include "symbol.h"
13
14extern sym_elem ** gl_ns;
15
16
17int
18cond_verify (condition *cnd)
19{
20 /* condition is invalid and hence cannot be met
21 */
22 if (cnd->cond1 == NULL && cnd->val1 == NULL)
23 return (0);
24
25 /* pair condition
26 */
27 if (cnd->cond1 != NULL) {
28 int c1_ret, c2_ret;
29
30 c1_ret = cond_verify (cnd->cond1);
31 c2_ret = cond_verify (cnd->cond2);
32
33 if (cnd->logoper == LO_OR) {
34 return ((c1_ret == 1 || c2_ret == 1) ? 1 : 0);
35 } else if (cnd->logoper == LO_AND) {
36 return ((c1_ret == 1 && c2_ret == 1) ? 1 : 0);
37 }
38
39 /* shouldn't happen
40 */
41 return (0);
42 } else {
43 int eq_val = 0;
44 char * val1_s;
45 char * val2_s;
46
47 /* normal equality test (broken-down-case)
48 * first substitute each side then compare according to the
49 * equality operator
50 */
51 val1_s = (char *) sym_resolve (gl_ns, cnd->val1);
52 val2_s = sym_subst (gl_ns, cnd->val2);
53
54 switch (cnd->eqop) {
55 case (EQ_EQUAL):
56 eq_val = (strcasecmp (val1_s, val2_s) == 0) ? 1 : 0;
57 break;
58 case (EQ_NOTEQ):
59 eq_val = (strcasecmp (val1_s, val2_s) == 0) ? 0 : 1;
60 break;
61 /* to be implemented
62 */
63 case (EQ_GREATEQ):
64 case (EQ_LOWEREQ):
65 break;
66 default:
67 break;
68 }
69
70 free (val2_s);
71
72 return (eq_val);
73 }
74}
75
76
77condition *
78cond_create (void)
79{
80 condition * new = xcalloc (1, sizeof (condition));
81
82 return (new);
83}
84
85
86void
87cond_free (condition *c)
88{
89 if (c->val1 != NULL)
90 free (c->val1);
91 if (c->val2 != NULL)
92 free (c->val2);
93 if (c->cond1 != NULL)
94 cond_free (c->cond1);
95 if (c->cond2 != NULL)
96 cond_free (c->cond2);
97 free (c);
98
99 return;
100}
101
102
103condition *
104cond_set_cond1 (condition *c, condition *c1)
105{
106 c->cond1 = c1;
107
108 return (c);
109}
110
111
112condition *
113cond_set_cond2 (condition *c, condition *c2)
114{
115 c->cond2 = c2;
116
117 return (c);
118}
119
120
121condition *
122cond_set_logoper (condition *c, int lo)
123{
124 c->logoper = lo;
125
126 return (c);
127}
128
129
130condition *
131cond_set_eqop (condition *c, int eo)
132{
133 c->eqop = eo;
134
135 return (c);
136}
137
138
139condition *
140cond_set_val1 (condition *c, char *val)
141{
142 c->val1 = val;
143
144 return (c);
145}
146
147
148condition *
149cond_set_val2 (condition *c, char *val)
150{
151 c->val2 = val;
152
153 return (c);
154}
155
156
157
diff --git a/other/burneye/src/conf/tmp/condition.h b/other/burneye/src/conf/tmp/condition.h
new file mode 100644
index 0000000..fffc486
--- /dev/null
+++ b/other/burneye/src/conf/tmp/condition.h
@@ -0,0 +1,125 @@
1/* fornax - distributed network
2 *
3 * by team teso
4 *
5 * scripting condition includes
6 */
7
8#ifndef FNX_CONDITION_H
9#define FNX_CONDITION_H
10
11
12#define LO_OR 1
13#define LO_AND 2
14
15#define EQ_EQUAL 1
16#define EQ_GREATEQ 2
17#define EQ_LOWEREQ 3
18#define EQ_NOTEQ 4
19
20
21typedef struct condition {
22 struct condition * cond1;
23 int logoper;
24 struct condition * cond2;
25
26 char * val1;
27 int eqop;
28 char * val2;
29} condition;
30
31
32/* cond_verify
33 *
34 * verify whether a condition is met or not
35 *
36 * return 1 if the condition is met
37 * return 0 if not or an error was experienced during parsing
38 */
39
40int cond_verify (condition *cnd);
41
42
43/* cond_create
44 *
45 * condition constructor. create a new condition structure
46 *
47 * return a pointer to the new structure
48 */
49
50condition * cond_create (void);
51
52
53/* cond_free
54 *
55 * free the whole condition pointed to by `c'
56 *
57 * return in any case
58 */
59
60void cond_free (condition *c);
61
62
63/* cond_set_cond1
64 *
65 * set subcondition condition `c1' for condition `c'
66 *
67 * return pointer to structure
68 */
69
70condition * cond_set_cond1 (condition *c, condition *c1);
71
72
73/* cond_set_cond2
74 *
75 * set subcondition condition `c2' for condition `c'
76 *
77 * return pointer to structure
78 */
79
80condition * cond_set_cond2 (condition *c, condition *c2);
81
82
83/* cond_set_logoper
84 *
85 * set logical operator `lo' for the two subconditions in condition `c'.
86 *
87 * return pointer to structure
88 */
89
90condition * cond_set_logoper (condition *c, int lo);
91
92
93/* cond_set_eqop
94 *
95 * set equeality operator `eo' for the comparison in condition `c'.
96 *
97 * return pointer to structure
98 */
99
100condition * cond_set_eqop (condition *c, int eo);
101
102
103/* cond_set_val1
104 *
105 * set first value `val' in condition `c'
106 *
107 * return pointer to structure
108 */
109
110condition * cond_set_val1 (condition *c, char *val);
111
112
113/* cond_set_val2
114 *
115 * set second value `val' in condition `c'
116 *
117 * return pointer to structure
118 */
119
120condition * cond_set_val2 (condition *c, char *val);
121
122
123#endif
124
125
diff --git a/other/burneye/src/conf/tmp/element.c b/other/burneye/src/conf/tmp/element.c
new file mode 100644
index 0000000..ee7633e
--- /dev/null
+++ b/other/burneye/src/conf/tmp/element.c
@@ -0,0 +1,115 @@
1/* fornax - distributed network
2 *
3 * by team teso
4 *
5 * scripting element routines
6 */
7
8#include <string.h>
9#include <stdlib.h>
10#include "../../shared/common.h"
11#include "call.h"
12#include "branch.h"
13#include "element.h"
14#include "symbol.h"
15
16
17/* static function declarations
18 */
19static int elem_count (element **el);
20
21
22void
23elem_list_free (element **el)
24{
25 if (el == NULL)
26 return;
27
28 while (elem_count (el) > 0) {
29 elem_free (el[0]);
30 memmove (&el[0], &el[1], (elem_count (&el[1]) + 1) * sizeof (element *));
31 }
32
33 if (el != NULL)
34 free (el);
35}
36
37
38static int
39elem_count (element **el)
40{
41 int count;
42
43 if (el == NULL)
44 return (0);
45
46 for (count = 0 ; el[count] != NULL ; ++count)
47 ;
48
49 return (count);
50}
51
52
53element **
54elem_add (element **el, element *e)
55{
56 int ec = elem_count (el);
57
58 el = xrealloc (el, (ec + 2) * sizeof (element *));
59 el[ec] = e;
60 el[ec + 1] = NULL;
61
62 return (el);
63}
64
65
66element *
67elem_create (void)
68{
69 element * new = xcalloc (1, sizeof (element));
70
71 return (new);
72}
73
74
75void
76elem_free (element *e)
77{
78 switch (e->type) {
79 case (ELEM_TYPE_CALL):
80 call_free ((call *) e->data);
81 break;
82 case (ELEM_TYPE_BRANCH):
83 br_free ((branch *) e->data);
84 break;
85 case (ELEM_TYPE_SET):
86 sym_elem_free ((sym_elem *) e->data);
87 break;
88 default:
89 break;
90 }
91
92 free (e);
93
94 return;
95}
96
97
98element *
99elem_set_type (element *e, int type)
100{
101 e->type = type;
102
103 return (e);
104}
105
106
107element *
108elem_set_data (element *e, void *data)
109{
110 e->data = data;
111
112 return (e);
113}
114
115
diff --git a/other/burneye/src/conf/tmp/element.h b/other/burneye/src/conf/tmp/element.h
new file mode 100644
index 0000000..36b9a23
--- /dev/null
+++ b/other/burneye/src/conf/tmp/element.h
@@ -0,0 +1,85 @@
1/* fornax - distributed network
2 *
3 * by team teso
4 *
5 * scripting element includes
6 */
7
8#ifndef FNX_ELEMENT_H
9#define FNX_ELEMENT_H
10
11
12#define ELEM_TYPE_CALL 1
13#define ELEM_TYPE_BRANCH 2
14#define ELEM_TYPE_SET 3
15
16typedef struct {
17 int type;
18 void * data;
19} element;
20
21
22/* elem_list_free
23 *
24 * free a list of elements pointed to by `el'
25 *
26 * return in any case
27 */
28
29void elem_list_free (element **el);
30
31
32/* elem_add
33 *
34 * add element pointed to by `e' to the element list pointed to by `el'. if the
35 * element list is empty, create a new one
36 *
37 * return a pointer to the modified/created element list
38 */
39
40element ** elem_add (element **el, element *e);
41
42
43/* elem_create
44 *
45 * element constructor. create a new element structure
46 *
47 * return a pointer to the new structure
48 */
49
50element * elem_create (void);
51
52
53/* elem_free
54 *
55 * free the whole element pointed to by `e'
56 *
57 * return in any case
58 */
59
60void elem_free (element *e);
61
62
63/* elem_set_type
64 *
65 * set element type `type' for element pointed to by `e'
66 *
67 * return pointer to structure
68 */
69
70element * elem_set_type (element *e, int type);
71
72
73/* elem_set_data
74 *
75 * set element data to `data' for element pointed to by `e'
76 *
77 * return pointer to structure
78 */
79
80element * elem_set_data (element *e, void *data);
81
82
83#endif
84
85
diff --git a/other/burneye/src/conf/tmp/functionlist.h b/other/burneye/src/conf/tmp/functionlist.h
new file mode 100644
index 0000000..67d062f
--- /dev/null
+++ b/other/burneye/src/conf/tmp/functionlist.h
@@ -0,0 +1,20 @@
1/* fornax - distributed network
2 *
3 * by team teso
4 *
5 * script functions
6 */
7
8#ifndef FNX_FUNCTIONLIST_H
9#define FNX_FUNCTIONLIST_H
10
11#include "symbol.h"
12
13int f_listen (sym_elem **sl); /* net.listen */
14int node_self (sym_elem **stab); /* sys.self */
15int tt_schedule (sym_elem **stab); /* time.schedule */
16int tt_erase (sym_elem **stab); /* time.erase */
17
18#endif
19
20
diff --git a/other/burneye/src/conf/tmp/functions.c b/other/burneye/src/conf/tmp/functions.c
new file mode 100644
index 0000000..96af53c
--- /dev/null
+++ b/other/burneye/src/conf/tmp/functions.c
@@ -0,0 +1,66 @@
1/* fornax - distributed network
2 *
3 * by team teso
4 *
5 * function routines
6 */
7
8#include <stdio.h>
9#include <string.h>
10#include "functions.h"
11#include "functionlist.h"
12#include "symbol.h"
13
14
15int fnc_debug (sym_elem **stab);
16
17function gl_fnc[] = {
18 /* primitives */
19 { "nop", NULL },
20 { "debug", fnc_debug },
21
22 /* network */
23 { "net.listen", f_listen },
24
25 /* fornax system */
26 { "sys.self", node_self },
27
28 /* time management */
29 { "time.schedule", tt_schedule },
30 { "time.erase", tt_erase },
31
32 /* end of list */
33 { NULL, NULL },
34};
35
36
37fnc_handler
38fnc_find (function ftab[], char *name)
39{
40 int stp_p; /* step pointer */
41
42 for (stp_p = 0 ; ftab[stp_p].name != NULL ; ++stp_p) {
43 if (strcasecmp (ftab[stp_p].name, name) == 0)
44 return (ftab[stp_p].f_handler);
45 }
46
47 return (NULL);
48}
49
50
51int
52fnc_debug (sym_elem **stab)
53{
54 int n;
55
56 if (stab == NULL)
57 return (0);
58
59 for (n = 0 ; stab[n] != NULL ; ++n) {
60 printf ("%s . %s\n", (stab[n]->key == NULL) ? "NULL" : stab[n]->key,
61 (stab[n]->value == NULL) ? "NULL" : stab[n]->value);
62 }
63
64 return (0);
65}
66
diff --git a/other/burneye/src/conf/tmp/functions.h b/other/burneye/src/conf/tmp/functions.h
new file mode 100644
index 0000000..4626c1c
--- /dev/null
+++ b/other/burneye/src/conf/tmp/functions.h
@@ -0,0 +1,35 @@
1/* fornax - distributed network
2 *
3 * by team teso
4 *
5 * function definitions
6 */
7
8#ifndef FNX_FUNCTION_H
9#define FNX_FUNCTION_H
10
11#include "symbol.h"
12
13typedef int (* fnc_handler)(sym_elem **par);
14
15typedef struct {
16 char * name; /* symbolic function name */
17 fnc_handler f_handler; /* function handler */
18} function;
19
20
21/* fnc_find
22 *
23 * find a function with the function name `name' from the function table
24 * pointed to by `ftab'
25 *
26 * return fnc_handler pointer on success
27 * return NULL on failure
28 */
29
30fnc_handler fnc_find (function ftab[], char *name);
31
32
33#endif
34
35
diff --git a/other/burneye/src/conf/tmp/script.c b/other/burneye/src/conf/tmp/script.c
new file mode 100644
index 0000000..3fc7634
--- /dev/null
+++ b/other/burneye/src/conf/tmp/script.c
@@ -0,0 +1,154 @@
1/* fornax - distributed network
2 *
3 * by team teso
4 *
5 * scripting capabilities routines
6 */
7
8#include <stdio.h>
9#include "branch.h"
10#include "call.h"
11#include "compiler.h"
12#include "element.h"
13#include "functions.h"
14#include "script.h"
15#include "symbol.h"
16
17sym_elem ** gl_ns = NULL;
18extern function gl_fnc[];
19
20
21/* static functions
22 */
23
24void scr_elem_exec (element **el);
25static void scr_call (call *c);
26static void scr_branch (branch * br);
27
28
29/* scr_elem_exec
30 *
31 * execute the element list pointed to by `el'
32 *
33 * return in any case
34 */
35
36void
37scr_elem_exec (element **el)
38{
39 int el_ptr;
40 element * ec;
41
42 if (el == NULL || el[0] == NULL)
43 return;
44
45 for (el_ptr = 0 ; el[el_ptr] != NULL ; ++el_ptr) {
46 ec = el[el_ptr];
47
48 switch (ec->type) {
49 case (ELEM_TYPE_CALL):
50 scr_call ((call *) ec->data);
51 break;
52
53 case (ELEM_TYPE_BRANCH):
54 scr_branch ((branch *) ec->data);
55 break;
56
57 /* in case it is a set element, just add the symbol element
58 * to the global namespace
59 */
60 case (ELEM_TYPE_SET):
61 gl_ns = scr_ns_add (gl_ns, (sym_elem *) ec->data);
62 break;
63
64 /* should never happen
65 */
66 default:
67 break;
68 }
69 }
70
71 return;
72}
73
74
75/* scr_call
76 *
77 * make a call, just like et did when he phoned home. well, not really, but
78 * quite similar
79 *
80 * return in any case
81 */
82
83static void
84scr_call (call *c)
85{
86 fnc_handler f_h;
87
88 /* nothing to execute today, baby
89 */
90 if (c == NULL || c->name == NULL)
91 return;
92
93 f_h = fnc_find (gl_fnc, c->name);
94
95 /* no function found or nop -> return
96 */
97 if (f_h == NULL)
98 return;
99
100 (void) f_h (c->parameters);
101
102 return;
103}
104
105
106static void
107scr_branch (branch * br)
108{
109 if (cond_verify (br->cond) == 1) {
110 scr_elem_exec (br->b_true);
111 } else {
112 scr_elem_exec (br->b_false);
113 }
114
115 return;
116}
117
118
119sym_elem **
120scr_ns_add (sym_elem **ns, sym_elem *elem)
121{
122 return (sym_elem_add (ns, elem));
123}
124
125
126int
127scr_exec (char *script)
128{
129 element ** scr;
130
131 scr = cp_compile (script, strlen (script));
132 if (scr == NULL)
133 return (0);
134
135 scr_elem_exec (scr);
136
137 elem_list_free (scr);
138
139 return (1);
140}
141
142
143element **
144scr_compile (char *script)
145{
146 element ** scr = NULL;
147
148 if (script != NULL)
149 scr = cp_compile (script, strlen (script));
150
151 return (scr);
152}
153
154
diff --git a/other/burneye/src/conf/tmp/script.h b/other/burneye/src/conf/tmp/script.h
new file mode 100644
index 0000000..7235218
--- /dev/null
+++ b/other/burneye/src/conf/tmp/script.h
@@ -0,0 +1,50 @@
1/* fornax - distributed network
2 *
3 * by team teso
4 *
5 * scripting capabilities
6 */
7
8#ifndef FNX_SCRIPT_H
9#define FNX_SCRIPT_H
10
11#include "element.h"
12#include "symbol.h"
13
14
15/* scr_exec
16 *
17 * compile and execute a script pointed to by `script'. after execution,
18 * free the compiled script
19 *
20 * return 1 if the execution was successful (ie compilation succeeded)
21 * return 0 on error (compilation/interpreter failed)
22 */
23
24int scr_exec (char *script);
25
26
27/* scr_ns_add
28 *
29 * add a symbol element `elem' to the namespace pointed to by `ns'
30 *
31 * return pointer to modified namespace
32 */
33
34sym_elem ** scr_ns_add (sym_elem **ns, sym_elem *elem);
35
36
37/* scr_compile
38 *
39 * compile a script pointed to by `script'
40 *
41 * return a pointer to the readily compiled parse tree on success
42 * return NULL on failure
43 */
44
45element ** scr_compile (char *script);
46
47
48#endif
49
50
diff --git a/other/burneye/src/conf/tmp/script1 b/other/burneye/src/conf/tmp/script1
new file mode 100644
index 0000000..dcc359e
--- /dev/null
+++ b/other/burneye/src/conf/tmp/script1
@@ -0,0 +1,16 @@
1{
2 net.icmp.sendrate = "25"
3 net.icmp.packetsize = "650"
4
5 net.icmp.send ( forked = "yes" )
6
7 if (net.icmp.packetsize >= "600") {
8 if (net.icmp.sendrate >= "20") {
9 } else {
10 net.msg ( node = "$masternode" content = "too fast" )
11 }
12 } else {
13 net.msg ( node = "$masternode" content = "done" )
14 net.msg ( node = "$self" content = "foo" )
15 }
16}
diff --git a/other/burneye/src/conf/tmp/script2 b/other/burneye/src/conf/tmp/script2
new file mode 100644
index 0000000..a7d8e0a
--- /dev/null
+++ b/other/burneye/src/conf/tmp/script2
@@ -0,0 +1,6218 @@
1{
2 net.icmp.sendrate = "25"
3 net.icmp.packetsize = "650"
4 net.icmp.send ( forked = "yes" )
5 if (net.icmp.packetsize >= "600") {
6 if (net.icmp.sendrate >= "20") {
7 } else {
8 net.msg ( node = "$masternode" content = "too fast" )
9 }
10 } else {
11 net.msg ( node = "$masternode" content = "done" )
12 net.msg ( node = "$self" content = "foo" )
13 }
14 net.icmp.sendrate = "25"
15 net.icmp.packetsize = "650"
16 net.icmp.send ( forked = "yes" )
17 if (net.icmp.packetsize >= "600") {
18 if (net.icmp.sendrate >= "20") {
19 } else {
20 net.msg ( node = "$masternode" content = "too fast" )
21 }
22 } else {
23 net.msg ( node = "$masternode" content = "done" )
24 net.msg ( node = "$self" content = "foo" )
25 }
26 net.icmp.sendrate = "25"
27 net.icmp.packetsize = "650"
28 net.icmp.send ( forked = "yes" )
29 if (net.icmp.packetsize >= "600") {
30 if (net.icmp.sendrate >= "20") {
31 } else {
32 net.msg ( node = "$masternode" content = "too fast" )
33 }
34 } else {
35 net.msg ( node = "$masternode" content = "done" )
36 net.msg ( node = "$self" content = "foo" )
37 }
38 net.icmp.sendrate = "25"
39 net.icmp.packetsize = "650"
40 net.icmp.send ( forked = "yes" )
41 if (net.icmp.packetsize >= "600") {
42 if (net.icmp.sendrate >= "20") {
43 } else {
44 net.msg ( node = "$masternode" content = "too fast" )
45 }
46 } else {
47 net.msg ( node = "$masternode" content = "done" )
48 net.msg ( node = "$self" content = "foo" )
49 }
50 net.icmp.sendrate = "25"
51 net.icmp.packetsize = "650"
52 net.icmp.send ( forked = "yes" )
53 if (net.icmp.packetsize >= "600") {
54 if (net.icmp.sendrate >= "20") {
55 } else {
56 net.msg ( node = "$masternode" content = "too fast" )
57 }
58 } else {
59 net.msg ( node = "$masternode" content = "done" )
60 net.msg ( node = "$self" content = "foo" )
61 }
62 net.icmp.sendrate = "25"
63 net.icmp.packetsize = "650"
64 net.icmp.send ( forked = "yes" )
65 if (net.icmp.packetsize >= "600") {
66 if (net.icmp.sendrate >= "20") {
67 } else {
68 net.msg ( node = "$masternode" content = "too fast" )
69 }
70 } else {
71 net.msg ( node = "$masternode" content = "done" )
72 net.msg ( node = "$self" content = "foo" )
73 }
74 net.icmp.sendrate = "25"
75 net.icmp.packetsize = "650"
76 net.icmp.send ( forked = "yes" )
77 if (net.icmp.packetsize >= "600") {
78 if (net.icmp.sendrate >= "20") {
79 } else {
80 net.msg ( node = "$masternode" content = "too fast" )
81 }
82 } else {
83 net.msg ( node = "$masternode" content = "done" )
84 net.msg ( node = "$self" content = "foo" )
85 }
86 net.icmp.sendrate = "25"
87 net.icmp.packetsize = "650"
88 net.icmp.send ( forked = "yes" )
89 if (net.icmp.packetsize >= "600") {
90 if (net.icmp.sendrate >= "20") {
91 } else {
92 net.msg ( node = "$masternode" content = "too fast" )
93 }
94 } else {
95 net.msg ( node = "$masternode" content = "done" )
96 net.msg ( node = "$self" content = "foo" )
97 }
98 net.icmp.sendrate = "25"
99 net.icmp.packetsize = "650"
100 net.icmp.send ( forked = "yes" )
101 if (net.icmp.packetsize >= "600") {
102 if (net.icmp.sendrate >= "20") {
103 } else {
104 net.msg ( node = "$masternode" content = "too fast" )
105 }
106 } else {
107 net.msg ( node = "$masternode" content = "done" )
108 net.msg ( node = "$self" content = "foo" )
109 }
110 net.icmp.sendrate = "25"
111 net.icmp.packetsize = "650"
112 net.icmp.send ( forked = "yes" )
113 if (net.icmp.packetsize >= "600") {
114 if (net.icmp.sendrate >= "20") {
115 } else {
116 net.msg ( node = "$masternode" content = "too fast" )
117 }
118 } else {
119 net.msg ( node = "$masternode" content = "done" )
120 net.msg ( node = "$self" content = "foo" )
121 }
122 net.icmp.sendrate = "25"
123 net.icmp.packetsize = "650"
124 net.icmp.send ( forked = "yes" )
125 if (net.icmp.packetsize >= "600") {
126 if (net.icmp.sendrate >= "20") {
127 } else {
128 net.msg ( node = "$masternode" content = "too fast" )
129 }
130 } else {
131 net.msg ( node = "$masternode" content = "done" )
132 net.msg ( node = "$self" content = "foo" )
133 }
134 net.icmp.sendrate = "25"
135 net.icmp.packetsize = "650"
136 net.icmp.send ( forked = "yes" )
137 if (net.icmp.packetsize >= "600") {
138 if (net.icmp.sendrate >= "20") {
139 } else {
140 net.msg ( node = "$masternode" content = "too fast" )
141 }
142 } else {
143 net.msg ( node = "$masternode" content = "done" )
144 net.msg ( node = "$self" content = "foo" )
145 }
146 net.icmp.sendrate = "25"
147 net.icmp.packetsize = "650"
148 net.icmp.send ( forked = "yes" )
149 if (net.icmp.packetsize >= "600") {
150 if (net.icmp.sendrate >= "20") {
151 } else {
152 net.msg ( node = "$masternode" content = "too fast" )
153 }
154 } else {
155 net.msg ( node = "$masternode" content = "done" )
156 net.msg ( node = "$self" content = "foo" )
157 }
158 net.icmp.sendrate = "25"
159 net.icmp.packetsize = "650"
160 net.icmp.send ( forked = "yes" )
161 if (net.icmp.packetsize >= "600") {
162 if (net.icmp.sendrate >= "20") {
163 } else {
164 net.msg ( node = "$masternode" content = "too fast" )
165 }
166 } else {
167 net.msg ( node = "$masternode" content = "done" )
168 net.msg ( node = "$self" content = "foo" )
169 }
170 net.icmp.sendrate = "25"
171 net.icmp.packetsize = "650"
172 net.icmp.send ( forked = "yes" )
173 if (net.icmp.packetsize >= "600") {
174 if (net.icmp.sendrate >= "20") {
175 } else {
176 net.msg ( node = "$masternode" content = "too fast" )
177 }
178 } else {
179 net.msg ( node = "$masternode" content = "done" )
180 net.msg ( node = "$self" content = "foo" )
181 }
182 net.icmp.sendrate = "25"
183 net.icmp.packetsize = "650"
184 net.icmp.send ( forked = "yes" )
185 if (net.icmp.packetsize >= "600") {
186 if (net.icmp.sendrate >= "20") {
187 } else {
188 net.msg ( node = "$masternode" content = "too fast" )
189 }
190 } else {
191 net.msg ( node = "$masternode" content = "done" )
192 net.msg ( node = "$self" content = "foo" )
193 }
194 net.icmp.sendrate = "25"
195 net.icmp.packetsize = "650"
196 net.icmp.send ( forked = "yes" )
197 if (net.icmp.packetsize >= "600") {
198 if (net.icmp.sendrate >= "20") {
199 } else {
200 net.msg ( node = "$masternode" content = "too fast" )
201 }
202 } else {
203 net.msg ( node = "$masternode" content = "done" )
204 net.msg ( node = "$self" content = "foo" )
205 }
206 net.icmp.sendrate = "25"
207 net.icmp.packetsize = "650"
208 net.icmp.send ( forked = "yes" )
209 if (net.icmp.packetsize >= "600") {
210 if (net.icmp.sendrate >= "20") {
211 } else {
212 net.msg ( node = "$masternode" content = "too fast" )
213 }
214 } else {
215 net.msg ( node = "$masternode" content = "done" )
216 net.msg ( node = "$self" content = "foo" )
217 }
218 net.icmp.sendrate = "25"
219 net.icmp.packetsize = "650"
220 net.icmp.send ( forked = "yes" )
221 if (net.icmp.packetsize >= "600") {
222 if (net.icmp.sendrate >= "20") {
223 } else {
224 net.msg ( node = "$masternode" content = "too fast" )
225 }
226 } else {
227 net.msg ( node = "$masternode" content = "done" )
228 net.msg ( node = "$self" content = "foo" )
229 }
230 net.icmp.sendrate = "25"
231 net.icmp.packetsize = "650"
232 net.icmp.send ( forked = "yes" )
233 if (net.icmp.packetsize >= "600") {
234 if (net.icmp.sendrate >= "20") {
235 } else {
236 net.msg ( node = "$masternode" content = "too fast" )
237 }
238 } else {
239 net.msg ( node = "$masternode" content = "done" )
240 net.msg ( node = "$self" content = "foo" )
241 }
242 net.icmp.sendrate = "25"
243 net.icmp.packetsize = "650"
244 net.icmp.send ( forked = "yes" )
245 if (net.icmp.packetsize >= "600") {
246 if (net.icmp.sendrate >= "20") {
247 } else {
248 net.msg ( node = "$masternode" content = "too fast" )
249 }
250 } else {
251 net.msg ( node = "$masternode" content = "done" )
252 net.msg ( node = "$self" content = "foo" )
253 }
254 net.icmp.sendrate = "25"
255 net.icmp.packetsize = "650"
256 net.icmp.send ( forked = "yes" )
257 if (net.icmp.packetsize >= "600") {
258 if (net.icmp.sendrate >= "20") {
259 } else {
260 net.msg ( node = "$masternode" content = "too fast" )
261 }
262 } else {
263 net.msg ( node = "$masternode" content = "done" )
264 net.msg ( node = "$self" content = "foo" )
265 }
266 net.icmp.sendrate = "25"
267 net.icmp.packetsize = "650"
268 net.icmp.send ( forked = "yes" )
269 if (net.icmp.packetsize >= "600") {
270 if (net.icmp.sendrate >= "20") {
271 } else {
272 net.msg ( node = "$masternode" content = "too fast" )
273 }
274 } else {
275 net.msg ( node = "$masternode" content = "done" )
276 net.msg ( node = "$self" content = "foo" )
277 }
278 net.icmp.sendrate = "25"
279 net.icmp.packetsize = "650"
280 net.icmp.send ( forked = "yes" )
281 if (net.icmp.packetsize >= "600") {
282 if (net.icmp.sendrate >= "20") {
283 } else {
284 net.msg ( node = "$masternode" content = "too fast" )
285 }
286 } else {
287 net.msg ( node = "$masternode" content = "done" )
288 net.msg ( node = "$self" content = "foo" )
289 }
290 net.icmp.sendrate = "25"
291 net.icmp.packetsize = "650"
292 net.icmp.send ( forked = "yes" )
293 if (net.icmp.packetsize >= "600") {
294 if (net.icmp.sendrate >= "20") {
295 } else {
296 net.msg ( node = "$masternode" content = "too fast" )
297 }
298 } else {
299 net.msg ( node = "$masternode" content = "done" )
300 net.msg ( node = "$self" content = "foo" )
301 }
302 net.icmp.sendrate = "25"
303 net.icmp.packetsize = "650"
304 net.icmp.send ( forked = "yes" )
305 if (net.icmp.packetsize >= "600") {
306 if (net.icmp.sendrate >= "20") {
307 } else {
308 net.msg ( node = "$masternode" content = "too fast" )
309 }
310 } else {
311 net.msg ( node = "$masternode" content = "done" )
312 net.msg ( node = "$self" content = "foo" )
313 }
314 net.icmp.sendrate = "25"
315 net.icmp.packetsize = "650"
316 net.icmp.send ( forked = "yes" )
317 if (net.icmp.packetsize >= "600") {
318 if (net.icmp.sendrate >= "20") {
319 } else {
320 net.msg ( node = "$masternode" content = "too fast" )
321 }
322 } else {
323 net.msg ( node = "$masternode" content = "done" )
324 net.msg ( node = "$self" content = "foo" )
325 }
326 net.icmp.sendrate = "25"
327 net.icmp.packetsize = "650"
328 net.icmp.send ( forked = "yes" )
329 if (net.icmp.packetsize >= "600") {
330 if (net.icmp.sendrate >= "20") {
331 } else {
332 net.msg ( node = "$masternode" content = "too fast" )
333 }
334 } else {
335 net.msg ( node = "$masternode" content = "done" )
336 net.msg ( node = "$self" content = "foo" )
337 }
338 net.icmp.sendrate = "25"
339 net.icmp.packetsize = "650"
340 net.icmp.send ( forked = "yes" )
341 if (net.icmp.packetsize >= "600") {
342 if (net.icmp.sendrate >= "20") {
343 } else {
344 net.msg ( node = "$masternode" content = "too fast" )
345 }
346 } else {
347 net.msg ( node = "$masternode" content = "done" )
348 net.msg ( node = "$self" content = "foo" )
349 }
350 net.icmp.sendrate = "25"
351 net.icmp.packetsize = "650"
352 net.icmp.send ( forked = "yes" )
353 if (net.icmp.packetsize >= "600") {
354 if (net.icmp.sendrate >= "20") {
355 } else {
356 net.msg ( node = "$masternode" content = "too fast" )
357 }
358 } else {
359 net.msg ( node = "$masternode" content = "done" )
360 net.msg ( node = "$self" content = "foo" )
361 }
362 net.icmp.sendrate = "25"
363 net.icmp.packetsize = "650"
364 net.icmp.send ( forked = "yes" )
365 if (net.icmp.packetsize >= "600") {
366 if (net.icmp.sendrate >= "20") {
367 } else {
368 net.msg ( node = "$masternode" content = "too fast" )
369 }
370 } else {
371 net.msg ( node = "$masternode" content = "done" )
372 net.msg ( node = "$self" content = "foo" )
373 }
374 net.icmp.sendrate = "25"
375 net.icmp.packetsize = "650"
376 net.icmp.send ( forked = "yes" )
377 if (net.icmp.packetsize >= "600") {
378 if (net.icmp.sendrate >= "20") {
379 } else {
380 net.msg ( node = "$masternode" content = "too fast" )
381 }
382 } else {
383 net.msg ( node = "$masternode" content = "done" )
384 net.msg ( node = "$self" content = "foo" )
385 }
386 net.icmp.sendrate = "25"
387 net.icmp.packetsize = "650"
388 net.icmp.send ( forked = "yes" )
389 if (net.icmp.packetsize >= "600") {
390 if (net.icmp.sendrate >= "20") {
391 } else {
392 net.msg ( node = "$masternode" content = "too fast" )
393 }
394 } else {
395 net.msg ( node = "$masternode" content = "done" )
396 net.msg ( node = "$self" content = "foo" )
397 }
398 net.icmp.sendrate = "25"
399 net.icmp.packetsize = "650"
400 net.icmp.send ( forked = "yes" )
401 if (net.icmp.packetsize >= "600") {
402 if (net.icmp.sendrate >= "20") {
403 } else {
404 net.msg ( node = "$masternode" content = "too fast" )
405 }
406 } else {
407 net.msg ( node = "$masternode" content = "done" )
408 net.msg ( node = "$self" content = "foo" )
409 }
410 net.icmp.sendrate = "25"
411 net.icmp.packetsize = "650"
412 net.icmp.send ( forked = "yes" )
413 if (net.icmp.packetsize >= "600") {
414 if (net.icmp.sendrate >= "20") {
415 } else {
416 net.msg ( node = "$masternode" content = "too fast" )
417 }
418 } else {
419 net.msg ( node = "$masternode" content = "done" )
420 net.msg ( node = "$self" content = "foo" )
421 }
422 net.icmp.sendrate = "25"
423 net.icmp.packetsize = "650"
424 net.icmp.send ( forked = "yes" )
425 if (net.icmp.packetsize >= "600") {
426 if (net.icmp.sendrate >= "20") {
427 } else {
428 net.msg ( node = "$masternode" content = "too fast" )
429 }
430 } else {
431 net.msg ( node = "$masternode" content = "done" )
432 net.msg ( node = "$self" content = "foo" )
433 }
434 net.icmp.sendrate = "25"
435 net.icmp.packetsize = "650"
436 net.icmp.send ( forked = "yes" )
437 if (net.icmp.packetsize >= "600") {
438 if (net.icmp.sendrate >= "20") {
439 } else {
440 net.msg ( node = "$masternode" content = "too fast" )
441 }
442 } else {
443 net.msg ( node = "$masternode" content = "done" )
444 net.msg ( node = "$self" content = "foo" )
445 }
446 net.icmp.sendrate = "25"
447 net.icmp.packetsize = "650"
448 net.icmp.send ( forked = "yes" )
449 if (net.icmp.packetsize >= "600") {
450 if (net.icmp.sendrate >= "20") {
451 } else {
452 net.msg ( node = "$masternode" content = "too fast" )
453 }
454 } else {
455 net.msg ( node = "$masternode" content = "done" )
456 net.msg ( node = "$self" content = "foo" )
457 }
458 net.icmp.sendrate = "25"
459 net.icmp.packetsize = "650"
460 net.icmp.send ( forked = "yes" )
461 if (net.icmp.packetsize >= "600") {
462 if (net.icmp.sendrate >= "20") {
463 } else {
464 net.msg ( node = "$masternode" content = "too fast" )
465 }
466 } else {
467 net.msg ( node = "$masternode" content = "done" )
468 net.msg ( node = "$self" content = "foo" )
469 }
470 net.icmp.sendrate = "25"
471 net.icmp.packetsize = "650"
472 net.icmp.send ( forked = "yes" )
473 if (net.icmp.packetsize >= "600") {
474 if (net.icmp.sendrate >= "20") {
475 } else {
476 net.msg ( node = "$masternode" content = "too fast" )
477 }
478 } else {
479 net.msg ( node = "$masternode" content = "done" )
480 net.msg ( node = "$self" content = "foo" )
481 }
482 net.icmp.sendrate = "25"
483 net.icmp.packetsize = "650"
484 net.icmp.send ( forked = "yes" )
485 if (net.icmp.packetsize >= "600") {
486 if (net.icmp.sendrate >= "20") {
487 } else {
488 net.msg ( node = "$masternode" content = "too fast" )
489 }
490 } else {
491 net.msg ( node = "$masternode" content = "done" )
492 net.msg ( node = "$self" content = "foo" )
493 }
494 net.icmp.sendrate = "25"
495 net.icmp.packetsize = "650"
496 net.icmp.send ( forked = "yes" )
497 if (net.icmp.packetsize >= "600") {
498 if (net.icmp.sendrate >= "20") {
499 } else {
500 net.msg ( node = "$masternode" content = "too fast" )
501 }
502 } else {
503 net.msg ( node = "$masternode" content = "done" )
504 net.msg ( node = "$self" content = "foo" )
505 }
506 net.icmp.sendrate = "25"
507 net.icmp.packetsize = "650"
508 net.icmp.send ( forked = "yes" )
509 if (net.icmp.packetsize >= "600") {
510 if (net.icmp.sendrate >= "20") {
511 } else {
512 net.msg ( node = "$masternode" content = "too fast" )
513 }
514 } else {
515 net.msg ( node = "$masternode" content = "done" )
516 net.msg ( node = "$self" content = "foo" )
517 }
518 net.icmp.sendrate = "25"
519 net.icmp.packetsize = "650"
520 net.icmp.send ( forked = "yes" )
521 if (net.icmp.packetsize >= "600") {
522 if (net.icmp.sendrate >= "20") {
523 } else {
524 net.msg ( node = "$masternode" content = "too fast" )
525 }
526 } else {
527 net.msg ( node = "$masternode" content = "done" )
528 net.msg ( node = "$self" content = "foo" )
529 }
530 net.icmp.sendrate = "25"
531 net.icmp.packetsize = "650"
532 net.icmp.send ( forked = "yes" )
533 if (net.icmp.packetsize >= "600") {
534 if (net.icmp.sendrate >= "20") {
535 } else {
536 net.msg ( node = "$masternode" content = "too fast" )
537 }
538 } else {
539 net.msg ( node = "$masternode" content = "done" )
540 net.msg ( node = "$self" content = "foo" )
541 }
542 net.icmp.sendrate = "25"
543 net.icmp.packetsize = "650"
544 net.icmp.send ( forked = "yes" )
545 if (net.icmp.packetsize >= "600") {
546 if (net.icmp.sendrate >= "20") {
547 } else {
548 net.msg ( node = "$masternode" content = "too fast" )
549 }
550 } else {
551 net.msg ( node = "$masternode" content = "done" )
552 net.msg ( node = "$self" content = "foo" )
553 }
554 net.icmp.sendrate = "25"
555 net.icmp.packetsize = "650"
556 net.icmp.send ( forked = "yes" )
557 if (net.icmp.packetsize >= "600") {
558 if (net.icmp.sendrate >= "20") {
559 } else {
560 net.msg ( node = "$masternode" content = "too fast" )
561 }
562 } else {
563 net.msg ( node = "$masternode" content = "done" )
564 net.msg ( node = "$self" content = "foo" )
565 }
566 net.icmp.sendrate = "25"
567 net.icmp.packetsize = "650"
568 net.icmp.send ( forked = "yes" )
569 if (net.icmp.packetsize >= "600") {
570 if (net.icmp.sendrate >= "20") {
571 } else {
572 net.msg ( node = "$masternode" content = "too fast" )
573 }
574 } else {
575 net.msg ( node = "$masternode" content = "done" )
576 net.msg ( node = "$self" content = "foo" )
577 }
578 net.icmp.sendrate = "25"
579 net.icmp.packetsize = "650"
580 net.icmp.send ( forked = "yes" )
581 if (net.icmp.packetsize >= "600") {
582 if (net.icmp.sendrate >= "20") {
583 } else {
584 net.msg ( node = "$masternode" content = "too fast" )
585 }
586 } else {
587 net.msg ( node = "$masternode" content = "done" )
588 net.msg ( node = "$self" content = "foo" )
589 }
590 net.icmp.sendrate = "25"
591 net.icmp.packetsize = "650"
592 net.icmp.send ( forked = "yes" )
593 if (net.icmp.packetsize >= "600") {
594 if (net.icmp.sendrate >= "20") {
595 } else {
596 net.msg ( node = "$masternode" content = "too fast" )
597 }
598 } else {
599 net.msg ( node = "$masternode" content = "done" )
600 net.msg ( node = "$self" content = "foo" )
601 }
602 net.icmp.sendrate = "25"
603 net.icmp.packetsize = "650"
604 net.icmp.send ( forked = "yes" )
605 if (net.icmp.packetsize >= "600") {
606 if (net.icmp.sendrate >= "20") {
607 } else {
608 net.msg ( node = "$masternode" content = "too fast" )
609 }
610 } else {
611 net.msg ( node = "$masternode" content = "done" )
612 net.msg ( node = "$self" content = "foo" )
613 }
614 net.icmp.sendrate = "25"
615 net.icmp.packetsize = "650"
616 net.icmp.send ( forked = "yes" )
617 if (net.icmp.packetsize >= "600") {
618 if (net.icmp.sendrate >= "20") {
619 } else {
620 net.msg ( node = "$masternode" content = "too fast" )
621 }
622 } else {
623 net.msg ( node = "$masternode" content = "done" )
624 net.msg ( node = "$self" content = "foo" )
625 }
626 net.icmp.sendrate = "25"
627 net.icmp.packetsize = "650"
628 net.icmp.send ( forked = "yes" )
629 if (net.icmp.packetsize >= "600") {
630 if (net.icmp.sendrate >= "20") {
631 } else {
632 net.msg ( node = "$masternode" content = "too fast" )
633 }
634 } else {
635 net.msg ( node = "$masternode" content = "done" )
636 net.msg ( node = "$self" content = "foo" )
637 }
638 net.icmp.sendrate = "25"
639 net.icmp.packetsize = "650"
640 net.icmp.send ( forked = "yes" )
641 if (net.icmp.packetsize >= "600") {
642 if (net.icmp.sendrate >= "20") {
643 } else {
644 net.msg ( node = "$masternode" content = "too fast" )
645 }
646 } else {
647 net.msg ( node = "$masternode" content = "done" )
648 net.msg ( node = "$self" content = "foo" )
649 }
650 net.icmp.sendrate = "25"
651 net.icmp.packetsize = "650"
652 net.icmp.send ( forked = "yes" )
653 if (net.icmp.packetsize >= "600") {
654 if (net.icmp.sendrate >= "20") {
655 } else {
656 net.msg ( node = "$masternode" content = "too fast" )
657 }
658 } else {
659 net.msg ( node = "$masternode" content = "done" )
660 net.msg ( node = "$self" content = "foo" )
661 }
662 net.icmp.sendrate = "25"
663 net.icmp.packetsize = "650"
664 net.icmp.send ( forked = "yes" )
665 if (net.icmp.packetsize >= "600") {
666 if (net.icmp.sendrate >= "20") {
667 } else {
668 net.msg ( node = "$masternode" content = "too fast" )
669 }
670 } else {
671 net.msg ( node = "$masternode" content = "done" )
672 net.msg ( node = "$self" content = "foo" )
673 }
674 net.icmp.sendrate = "25"
675 net.icmp.packetsize = "650"
676 net.icmp.send ( forked = "yes" )
677 if (net.icmp.packetsize >= "600") {
678 if (net.icmp.sendrate >= "20") {
679 } else {
680 net.msg ( node = "$masternode" content = "too fast" )
681 }
682 } else {
683 net.msg ( node = "$masternode" content = "done" )
684 net.msg ( node = "$self" content = "foo" )
685 }
686 net.icmp.sendrate = "25"
687 net.icmp.packetsize = "650"
688 net.icmp.send ( forked = "yes" )
689 if (net.icmp.packetsize >= "600") {
690 if (net.icmp.sendrate >= "20") {
691 } else {
692 net.msg ( node = "$masternode" content = "too fast" )
693 }
694 } else {
695 net.msg ( node = "$masternode" content = "done" )
696 net.msg ( node = "$self" content = "foo" )
697 }
698 net.icmp.sendrate = "25"
699 net.icmp.packetsize = "650"
700 net.icmp.send ( forked = "yes" )
701 if (net.icmp.packetsize >= "600") {
702 if (net.icmp.sendrate >= "20") {
703 } else {
704 net.msg ( node = "$masternode" content = "too fast" )
705 }
706 } else {
707 net.msg ( node = "$masternode" content = "done" )
708 net.msg ( node = "$self" content = "foo" )
709 }
710 net.icmp.sendrate = "25"
711 net.icmp.packetsize = "650"
712 net.icmp.send ( forked = "yes" )
713 if (net.icmp.packetsize >= "600") {
714 if (net.icmp.sendrate >= "20") {
715 } else {
716 net.msg ( node = "$masternode" content = "too fast" )
717 }
718 } else {
719 net.msg ( node = "$masternode" content = "done" )
720 net.msg ( node = "$self" content = "foo" )
721 }
722 net.icmp.sendrate = "25"
723 net.icmp.packetsize = "650"
724 net.icmp.send ( forked = "yes" )
725 if (net.icmp.packetsize >= "600") {
726 if (net.icmp.sendrate >= "20") {
727 } else {
728 net.msg ( node = "$masternode" content = "too fast" )
729 }
730 } else {
731 net.msg ( node = "$masternode" content = "done" )
732 net.msg ( node = "$self" content = "foo" )
733 }
734 net.icmp.sendrate = "25"
735 net.icmp.packetsize = "650"
736 net.icmp.send ( forked = "yes" )
737 if (net.icmp.packetsize >= "600") {
738 if (net.icmp.sendrate >= "20") {
739 } else {
740 net.msg ( node = "$masternode" content = "too fast" )
741 }
742 } else {
743 net.msg ( node = "$masternode" content = "done" )
744 net.msg ( node = "$self" content = "foo" )
745 }
746 net.icmp.sendrate = "25"
747 net.icmp.packetsize = "650"
748 net.icmp.send ( forked = "yes" )
749 if (net.icmp.packetsize >= "600") {
750 if (net.icmp.sendrate >= "20") {
751 } else {
752 net.msg ( node = "$masternode" content = "too fast" )
753 }
754 } else {
755 net.msg ( node = "$masternode" content = "done" )
756 net.msg ( node = "$self" content = "foo" )
757 }
758 net.icmp.sendrate = "25"
759 net.icmp.packetsize = "650"
760 net.icmp.send ( forked = "yes" )
761 if (net.icmp.packetsize >= "600") {
762 if (net.icmp.sendrate >= "20") {
763 } else {
764 net.msg ( node = "$masternode" content = "too fast" )
765 }
766 } else {
767 net.msg ( node = "$masternode" content = "done" )
768 net.msg ( node = "$self" content = "foo" )
769 }
770 net.icmp.sendrate = "25"
771 net.icmp.packetsize = "650"
772 net.icmp.send ( forked = "yes" )
773 if (net.icmp.packetsize >= "600") {
774 if (net.icmp.sendrate >= "20") {
775 } else {
776 net.msg ( node = "$masternode" content = "too fast" )
777 }
778 } else {
779 net.msg ( node = "$masternode" content = "done" )
780 net.msg ( node = "$self" content = "foo" )
781 }
782 net.icmp.sendrate = "25"
783 net.icmp.packetsize = "650"
784 net.icmp.send ( forked = "yes" )
785 if (net.icmp.packetsize >= "600") {
786 if (net.icmp.sendrate >= "20") {
787 } else {
788 net.msg ( node = "$masternode" content = "too fast" )
789 }
790 } else {
791 net.msg ( node = "$masternode" content = "done" )
792 net.msg ( node = "$self" content = "foo" )
793 }
794 net.icmp.sendrate = "25"
795 net.icmp.packetsize = "650"
796 net.icmp.send ( forked = "yes" )
797 if (net.icmp.packetsize >= "600") {
798 if (net.icmp.sendrate >= "20") {
799 } else {
800 net.msg ( node = "$masternode" content = "too fast" )
801 }
802 } else {
803 net.msg ( node = "$masternode" content = "done" )
804 net.msg ( node = "$self" content = "foo" )
805 }
806 net.icmp.sendrate = "25"
807 net.icmp.packetsize = "650"
808 net.icmp.send ( forked = "yes" )
809 if (net.icmp.packetsize >= "600") {
810 if (net.icmp.sendrate >= "20") {
811 } else {
812 net.msg ( node = "$masternode" content = "too fast" )
813 }
814 } else {
815 net.msg ( node = "$masternode" content = "done" )
816 net.msg ( node = "$self" content = "foo" )
817 }
818 net.icmp.sendrate = "25"
819 net.icmp.packetsize = "650"
820 net.icmp.send ( forked = "yes" )
821 if (net.icmp.packetsize >= "600") {
822 if (net.icmp.sendrate >= "20") {
823 } else {
824 net.msg ( node = "$masternode" content = "too fast" )
825 }
826 } else {
827 net.msg ( node = "$masternode" content = "done" )
828 net.msg ( node = "$self" content = "foo" )
829 }
830 net.icmp.sendrate = "25"
831 net.icmp.packetsize = "650"
832 net.icmp.send ( forked = "yes" )
833 if (net.icmp.packetsize >= "600") {
834 if (net.icmp.sendrate >= "20") {
835 } else {
836 net.msg ( node = "$masternode" content = "too fast" )
837 }
838 } else {
839 net.msg ( node = "$masternode" content = "done" )
840 net.msg ( node = "$self" content = "foo" )
841 }
842 net.icmp.sendrate = "25"
843 net.icmp.packetsize = "650"
844 net.icmp.send ( forked = "yes" )
845 if (net.icmp.packetsize >= "600") {
846 if (net.icmp.sendrate >= "20") {
847 } else {
848 net.msg ( node = "$masternode" content = "too fast" )
849 }
850 } else {
851 net.msg ( node = "$masternode" content = "done" )
852 net.msg ( node = "$self" content = "foo" )
853 }
854 net.icmp.sendrate = "25"
855 net.icmp.packetsize = "650"
856 net.icmp.send ( forked = "yes" )
857 if (net.icmp.packetsize >= "600") {
858 if (net.icmp.sendrate >= "20") {
859 } else {
860 net.msg ( node = "$masternode" content = "too fast" )
861 }
862 } else {
863 net.msg ( node = "$masternode" content = "done" )
864 net.msg ( node = "$self" content = "foo" )
865 }
866 net.icmp.sendrate = "25"
867 net.icmp.packetsize = "650"
868 net.icmp.send ( forked = "yes" )
869 if (net.icmp.packetsize >= "600") {
870 if (net.icmp.sendrate >= "20") {
871 } else {
872 net.msg ( node = "$masternode" content = "too fast" )
873 }
874 } else {
875 net.msg ( node = "$masternode" content = "done" )
876 net.msg ( node = "$self" content = "foo" )
877 }
878 net.icmp.sendrate = "25"
879 net.icmp.packetsize = "650"
880 net.icmp.send ( forked = "yes" )
881 if (net.icmp.packetsize >= "600") {
882 if (net.icmp.sendrate >= "20") {
883 } else {
884 net.msg ( node = "$masternode" content = "too fast" )
885 }
886 } else {
887 net.msg ( node = "$masternode" content = "done" )
888 net.msg ( node = "$self" content = "foo" )
889 }
890 net.icmp.sendrate = "25"
891 net.icmp.packetsize = "650"
892 net.icmp.send ( forked = "yes" )
893 if (net.icmp.packetsize >= "600") {
894 if (net.icmp.sendrate >= "20") {
895 } else {
896 net.msg ( node = "$masternode" content = "too fast" )
897 }
898 } else {
899 net.msg ( node = "$masternode" content = "done" )
900 net.msg ( node = "$self" content = "foo" )
901 }
902 net.icmp.sendrate = "25"
903 net.icmp.packetsize = "650"
904 net.icmp.send ( forked = "yes" )
905 if (net.icmp.packetsize >= "600") {
906 if (net.icmp.sendrate >= "20") {
907 } else {
908 net.msg ( node = "$masternode" content = "too fast" )
909 }
910 } else {
911 net.msg ( node = "$masternode" content = "done" )
912 net.msg ( node = "$self" content = "foo" )
913 }
914 net.icmp.sendrate = "25"
915 net.icmp.packetsize = "650"
916 net.icmp.send ( forked = "yes" )
917 if (net.icmp.packetsize >= "600") {
918 if (net.icmp.sendrate >= "20") {
919 } else {
920 net.msg ( node = "$masternode" content = "too fast" )
921 }
922 } else {
923 net.msg ( node = "$masternode" content = "done" )
924 net.msg ( node = "$self" content = "foo" )
925 }
926 net.icmp.sendrate = "25"
927 net.icmp.packetsize = "650"
928 net.icmp.send ( forked = "yes" )
929 if (net.icmp.packetsize >= "600") {
930 if (net.icmp.sendrate >= "20") {
931 } else {
932 net.msg ( node = "$masternode" content = "too fast" )
933 }
934 } else {
935 net.msg ( node = "$masternode" content = "done" )
936 net.msg ( node = "$self" content = "foo" )
937 }
938 net.icmp.sendrate = "25"
939 net.icmp.packetsize = "650"
940 net.icmp.send ( forked = "yes" )
941 if (net.icmp.packetsize >= "600") {
942 if (net.icmp.sendrate >= "20") {
943 } else {
944 net.msg ( node = "$masternode" content = "too fast" )
945 }
946 } else {
947 net.msg ( node = "$masternode" content = "done" )
948 net.msg ( node = "$self" content = "foo" )
949 }
950 net.icmp.sendrate = "25"
951 net.icmp.packetsize = "650"
952 net.icmp.send ( forked = "yes" )
953 if (net.icmp.packetsize >= "600") {
954 if (net.icmp.sendrate >= "20") {
955 } else {
956 net.msg ( node = "$masternode" content = "too fast" )
957 }
958 } else {
959 net.msg ( node = "$masternode" content = "done" )
960 net.msg ( node = "$self" content = "foo" )
961 }
962 net.icmp.sendrate = "25"
963 net.icmp.packetsize = "650"
964 net.icmp.send ( forked = "yes" )
965 if (net.icmp.packetsize >= "600") {
966 if (net.icmp.sendrate >= "20") {
967 } else {
968 net.msg ( node = "$masternode" content = "too fast" )
969 }
970 } else {
971 net.msg ( node = "$masternode" content = "done" )
972 net.msg ( node = "$self" content = "foo" )
973 }
974 net.icmp.sendrate = "25"
975 net.icmp.packetsize = "650"
976 net.icmp.send ( forked = "yes" )
977 if (net.icmp.packetsize >= "600") {
978 if (net.icmp.sendrate >= "20") {
979 } else {
980 net.msg ( node = "$masternode" content = "too fast" )
981 }
982 } else {
983 net.msg ( node = "$masternode" content = "done" )
984 net.msg ( node = "$self" content = "foo" )
985 }
986 net.icmp.sendrate = "25"
987 net.icmp.packetsize = "650"
988 net.icmp.send ( forked = "yes" )
989 if (net.icmp.packetsize >= "600") {
990 if (net.icmp.sendrate >= "20") {
991 } else {
992 net.msg ( node = "$masternode" content = "too fast" )
993 }
994 } else {
995 net.msg ( node = "$masternode" content = "done" )
996 net.msg ( node = "$self" content = "foo" )
997 }
998 net.icmp.sendrate = "25"
999 net.icmp.packetsize = "650"
1000 net.icmp.send ( forked = "yes" )
1001 if (net.icmp.packetsize >= "600") {
1002 if (net.icmp.sendrate >= "20") {
1003 } else {
1004 net.msg ( node = "$masternode" content = "too fast" )
1005 }
1006 } else {
1007 net.msg ( node = "$masternode" content = "done" )
1008 net.msg ( node = "$self" content = "foo" )
1009 }
1010 net.icmp.sendrate = "25"
1011 net.icmp.packetsize = "650"
1012 net.icmp.send ( forked = "yes" )
1013 if (net.icmp.packetsize >= "600") {
1014 if (net.icmp.sendrate >= "20") {
1015 } else {
1016 net.msg ( node = "$masternode" content = "too fast" )
1017 }
1018 } else {
1019 net.msg ( node = "$masternode" content = "done" )
1020 net.msg ( node = "$self" content = "foo" )
1021 }
1022 net.icmp.sendrate = "25"
1023 net.icmp.packetsize = "650"
1024 net.icmp.send ( forked = "yes" )
1025 if (net.icmp.packetsize >= "600") {
1026 if (net.icmp.sendrate >= "20") {
1027 } else {
1028 net.msg ( node = "$masternode" content = "too fast" )
1029 }
1030 } else {
1031 net.msg ( node = "$masternode" content = "done" )
1032 net.msg ( node = "$self" content = "foo" )
1033 }
1034 net.icmp.sendrate = "25"
1035 net.icmp.packetsize = "650"
1036 net.icmp.send ( forked = "yes" )
1037 if (net.icmp.packetsize >= "600") {
1038 if (net.icmp.sendrate >= "20") {
1039 } else {
1040 net.msg ( node = "$masternode" content = "too fast" )
1041 }
1042 } else {
1043 net.msg ( node = "$masternode" content = "done" )
1044 net.msg ( node = "$self" content = "foo" )
1045 }
1046 net.icmp.sendrate = "25"
1047 net.icmp.packetsize = "650"
1048 net.icmp.send ( forked = "yes" )
1049 if (net.icmp.packetsize >= "600") {
1050 if (net.icmp.sendrate >= "20") {
1051 } else {
1052 net.msg ( node = "$masternode" content = "too fast" )
1053 }
1054 } else {
1055 net.msg ( node = "$masternode" content = "done" )
1056 net.msg ( node = "$self" content = "foo" )
1057 }
1058 net.icmp.sendrate = "25"
1059 net.icmp.packetsize = "650"
1060 net.icmp.send ( forked = "yes" )
1061 if (net.icmp.packetsize >= "600") {
1062 if (net.icmp.sendrate >= "20") {
1063 } else {
1064 net.msg ( node = "$masternode" content = "too fast" )
1065 }
1066 } else {
1067 net.msg ( node = "$masternode" content = "done" )
1068 net.msg ( node = "$self" content = "foo" )
1069 }
1070 net.icmp.sendrate = "25"
1071 net.icmp.packetsize = "650"
1072 net.icmp.send ( forked = "yes" )
1073 if (net.icmp.packetsize >= "600") {
1074 if (net.icmp.sendrate >= "20") {
1075 } else {
1076 net.msg ( node = "$masternode" content = "too fast" )
1077 }
1078 } else {
1079 net.msg ( node = "$masternode" content = "done" )
1080 net.msg ( node = "$self" content = "foo" )
1081 }
1082 net.icmp.sendrate = "25"
1083 net.icmp.packetsize = "650"
1084 net.icmp.send ( forked = "yes" )
1085 if (net.icmp.packetsize >= "600") {
1086 if (net.icmp.sendrate >= "20") {
1087 } else {
1088 net.msg ( node = "$masternode" content = "too fast" )
1089 }
1090 } else {
1091 net.msg ( node = "$masternode" content = "done" )
1092 net.msg ( node = "$self" content = "foo" )
1093 }
1094 net.icmp.sendrate = "25"
1095 net.icmp.packetsize = "650"
1096 net.icmp.send ( forked = "yes" )
1097 if (net.icmp.packetsize >= "600") {
1098 if (net.icmp.sendrate >= "20") {
1099 } else {
1100 net.msg ( node = "$masternode" content = "too fast" )
1101 }
1102 } else {
1103 net.msg ( node = "$masternode" content = "done" )
1104 net.msg ( node = "$self" content = "foo" )
1105 }
1106 net.icmp.sendrate = "25"
1107 net.icmp.packetsize = "650"
1108 net.icmp.send ( forked = "yes" )
1109 if (net.icmp.packetsize >= "600") {
1110 if (net.icmp.sendrate >= "20") {
1111 } else {
1112 net.msg ( node = "$masternode" content = "too fast" )
1113 }
1114 } else {
1115 net.msg ( node = "$masternode" content = "done" )
1116 net.msg ( node = "$self" content = "foo" )
1117 }
1118 net.icmp.sendrate = "25"
1119 net.icmp.packetsize = "650"
1120 net.icmp.send ( forked = "yes" )
1121 if (net.icmp.packetsize >= "600") {
1122 if (net.icmp.sendrate >= "20") {
1123 } else {
1124 net.msg ( node = "$masternode" content = "too fast" )
1125 }
1126 } else {
1127 net.msg ( node = "$masternode" content = "done" )
1128 net.msg ( node = "$self" content = "foo" )
1129 }
1130 net.icmp.sendrate = "25"
1131 net.icmp.packetsize = "650"
1132 net.icmp.send ( forked = "yes" )
1133 if (net.icmp.packetsize >= "600") {
1134 if (net.icmp.sendrate >= "20") {
1135 } else {
1136 net.msg ( node = "$masternode" content = "too fast" )
1137 }
1138 } else {
1139 net.msg ( node = "$masternode" content = "done" )
1140 net.msg ( node = "$self" content = "foo" )
1141 }
1142 net.icmp.sendrate = "25"
1143 net.icmp.packetsize = "650"
1144 net.icmp.send ( forked = "yes" )
1145 if (net.icmp.packetsize >= "600") {
1146 if (net.icmp.sendrate >= "20") {
1147 } else {
1148 net.msg ( node = "$masternode" content = "too fast" )
1149 }
1150 } else {
1151 net.msg ( node = "$masternode" content = "done" )
1152 net.msg ( node = "$self" content = "foo" )
1153 }
1154 net.icmp.sendrate = "25"
1155 net.icmp.packetsize = "650"
1156 net.icmp.send ( forked = "yes" )
1157 if (net.icmp.packetsize >= "600") {
1158 if (net.icmp.sendrate >= "20") {
1159 } else {
1160 net.msg ( node = "$masternode" content = "too fast" )
1161 }
1162 } else {
1163 net.msg ( node = "$masternode" content = "done" )
1164 net.msg ( node = "$self" content = "foo" )
1165 }
1166 net.icmp.sendrate = "25"
1167 net.icmp.packetsize = "650"
1168 net.icmp.send ( forked = "yes" )
1169 if (net.icmp.packetsize >= "600") {
1170 if (net.icmp.sendrate >= "20") {
1171 } else {
1172 net.msg ( node = "$masternode" content = "too fast" )
1173 }
1174 } else {
1175 net.msg ( node = "$masternode" content = "done" )
1176 net.msg ( node = "$self" content = "foo" )
1177 }
1178 net.icmp.sendrate = "25"
1179 net.icmp.packetsize = "650"
1180 net.icmp.send ( forked = "yes" )
1181 if (net.icmp.packetsize >= "600") {
1182 if (net.icmp.sendrate >= "20") {
1183 } else {
1184 net.msg ( node = "$masternode" content = "too fast" )
1185 }
1186 } else {
1187 net.msg ( node = "$masternode" content = "done" )
1188 net.msg ( node = "$self" content = "foo" )
1189 }
1190 net.icmp.sendrate = "25"
1191 net.icmp.packetsize = "650"
1192 net.icmp.send ( forked = "yes" )
1193 if (net.icmp.packetsize >= "600") {
1194 if (net.icmp.sendrate >= "20") {
1195 } else {
1196 net.msg ( node = "$masternode" content = "too fast" )
1197 }
1198 } else {
1199 net.msg ( node = "$masternode" content = "done" )
1200 net.msg ( node = "$self" content = "foo" )
1201 }
1202 net.icmp.sendrate = "25"
1203 net.icmp.packetsize = "650"
1204 net.icmp.send ( forked = "yes" )
1205 if (net.icmp.packetsize >= "600") {
1206 if (net.icmp.sendrate >= "20") {
1207 } else {
1208 net.msg ( node = "$masternode" content = "too fast" )
1209 }
1210 } else {
1211 net.msg ( node = "$masternode" content = "done" )
1212 net.msg ( node = "$self" content = "foo" )
1213 }
1214 net.icmp.sendrate = "25"
1215 net.icmp.packetsize = "650"
1216 net.icmp.send ( forked = "yes" )
1217 if (net.icmp.packetsize >= "600") {
1218 if (net.icmp.sendrate >= "20") {
1219 } else {
1220 net.msg ( node = "$masternode" content = "too fast" )
1221 }
1222 } else {
1223 net.msg ( node = "$masternode" content = "done" )
1224 net.msg ( node = "$self" content = "foo" )
1225 }
1226 net.icmp.sendrate = "25"
1227 net.icmp.packetsize = "650"
1228 net.icmp.send ( forked = "yes" )
1229 if (net.icmp.packetsize >= "600") {
1230 if (net.icmp.sendrate >= "20") {
1231 } else {
1232 net.msg ( node = "$masternode" content = "too fast" )
1233 }
1234 } else {
1235 net.msg ( node = "$masternode" content = "done" )
1236 net.msg ( node = "$self" content = "foo" )
1237 }
1238 net.icmp.sendrate = "25"
1239 net.icmp.packetsize = "650"
1240 net.icmp.send ( forked = "yes" )
1241 if (net.icmp.packetsize >= "600") {
1242 if (net.icmp.sendrate >= "20") {
1243 } else {
1244 net.msg ( node = "$masternode" content = "too fast" )
1245 }
1246 } else {
1247 net.msg ( node = "$masternode" content = "done" )
1248 net.msg ( node = "$self" content = "foo" )
1249 }
1250 net.icmp.sendrate = "25"
1251 net.icmp.packetsize = "650"
1252 net.icmp.send ( forked = "yes" )
1253 if (net.icmp.packetsize >= "600") {
1254 if (net.icmp.sendrate >= "20") {
1255 } else {
1256 net.msg ( node = "$masternode" content = "too fast" )
1257 }
1258 } else {
1259 net.msg ( node = "$masternode" content = "done" )
1260 net.msg ( node = "$self" content = "foo" )
1261 }
1262 net.icmp.sendrate = "25"
1263 net.icmp.packetsize = "650"
1264 net.icmp.send ( forked = "yes" )
1265 if (net.icmp.packetsize >= "600") {
1266 if (net.icmp.sendrate >= "20") {
1267 } else {
1268 net.msg ( node = "$masternode" content = "too fast" )
1269 }
1270 } else {
1271 net.msg ( node = "$masternode" content = "done" )
1272 net.msg ( node = "$self" content = "foo" )
1273 }
1274 net.icmp.sendrate = "25"
1275 net.icmp.packetsize = "650"
1276 net.icmp.send ( forked = "yes" )
1277 if (net.icmp.packetsize >= "600") {
1278 if (net.icmp.sendrate >= "20") {
1279 } else {
1280 net.msg ( node = "$masternode" content = "too fast" )
1281 }
1282 } else {
1283 net.msg ( node = "$masternode" content = "done" )
1284 net.msg ( node = "$self" content = "foo" )
1285 }
1286 net.icmp.sendrate = "25"
1287 net.icmp.packetsize = "650"
1288 net.icmp.send ( forked = "yes" )
1289 if (net.icmp.packetsize >= "600") {
1290 if (net.icmp.sendrate >= "20") {
1291 } else {
1292 net.msg ( node = "$masternode" content = "too fast" )
1293 }
1294 } else {
1295 net.msg ( node = "$masternode" content = "done" )
1296 net.msg ( node = "$self" content = "foo" )
1297 }
1298 net.icmp.sendrate = "25"
1299 net.icmp.packetsize = "650"
1300 net.icmp.send ( forked = "yes" )
1301 if (net.icmp.packetsize >= "600") {
1302 if (net.icmp.sendrate >= "20") {
1303 } else {
1304 net.msg ( node = "$masternode" content = "too fast" )
1305 }
1306 } else {
1307 net.msg ( node = "$masternode" content = "done" )
1308 net.msg ( node = "$self" content = "foo" )
1309 }
1310 net.icmp.sendrate = "25"
1311 net.icmp.packetsize = "650"
1312 net.icmp.send ( forked = "yes" )
1313 if (net.icmp.packetsize >= "600") {
1314 if (net.icmp.sendrate >= "20") {
1315 } else {
1316 net.msg ( node = "$masternode" content = "too fast" )
1317 }
1318 } else {
1319 net.msg ( node = "$masternode" content = "done" )
1320 net.msg ( node = "$self" content = "foo" )
1321 }
1322 net.icmp.sendrate = "25"
1323 net.icmp.packetsize = "650"
1324 net.icmp.send ( forked = "yes" )
1325 if (net.icmp.packetsize >= "600") {
1326 if (net.icmp.sendrate >= "20") {
1327 } else {
1328 net.msg ( node = "$masternode" content = "too fast" )
1329 }
1330 } else {
1331 net.msg ( node = "$masternode" content = "done" )
1332 net.msg ( node = "$self" content = "foo" )
1333 }
1334 net.icmp.sendrate = "25"
1335 net.icmp.packetsize = "650"
1336 net.icmp.send ( forked = "yes" )
1337 if (net.icmp.packetsize >= "600") {
1338 if (net.icmp.sendrate >= "20") {
1339 } else {
1340 net.msg ( node = "$masternode" content = "too fast" )
1341 }
1342 } else {
1343 net.msg ( node = "$masternode" content = "done" )
1344 net.msg ( node = "$self" content = "foo" )
1345 }
1346 net.icmp.sendrate = "25"
1347 net.icmp.packetsize = "650"
1348 net.icmp.send ( forked = "yes" )
1349 if (net.icmp.packetsize >= "600") {
1350 if (net.icmp.sendrate >= "20") {
1351 } else {
1352 net.msg ( node = "$masternode" content = "too fast" )
1353 }
1354 } else {
1355 net.msg ( node = "$masternode" content = "done" )
1356 net.msg ( node = "$self" content = "foo" )
1357 }
1358 net.icmp.sendrate = "25"
1359 net.icmp.packetsize = "650"
1360 net.icmp.send ( forked = "yes" )
1361 if (net.icmp.packetsize >= "600") {
1362 if (net.icmp.sendrate >= "20") {
1363 } else {
1364 net.msg ( node = "$masternode" content = "too fast" )
1365 }
1366 } else {
1367 net.msg ( node = "$masternode" content = "done" )
1368 net.msg ( node = "$self" content = "foo" )
1369 }
1370 net.icmp.sendrate = "25"
1371 net.icmp.packetsize = "650"
1372 net.icmp.send ( forked = "yes" )
1373 if (net.icmp.packetsize >= "600") {
1374 if (net.icmp.sendrate >= "20") {
1375 } else {
1376 net.msg ( node = "$masternode" content = "too fast" )
1377 }
1378 } else {
1379 net.msg ( node = "$masternode" content = "done" )
1380 net.msg ( node = "$self" content = "foo" )
1381 }
1382 net.icmp.sendrate = "25"
1383 net.icmp.packetsize = "650"
1384 net.icmp.send ( forked = "yes" )
1385 if (net.icmp.packetsize >= "600") {
1386 if (net.icmp.sendrate >= "20") {
1387 } else {
1388 net.msg ( node = "$masternode" content = "too fast" )
1389 }
1390 } else {
1391 net.msg ( node = "$masternode" content = "done" )
1392 net.msg ( node = "$self" content = "foo" )
1393 }
1394 net.icmp.sendrate = "25"
1395 net.icmp.packetsize = "650"
1396 net.icmp.send ( forked = "yes" )
1397 if (net.icmp.packetsize >= "600") {
1398 if (net.icmp.sendrate >= "20") {
1399 } else {
1400 net.msg ( node = "$masternode" content = "too fast" )
1401 }
1402 } else {
1403 net.msg ( node = "$masternode" content = "done" )
1404 net.msg ( node = "$self" content = "foo" )
1405 }
1406 net.icmp.sendrate = "25"
1407 net.icmp.packetsize = "650"
1408 net.icmp.send ( forked = "yes" )
1409 if (net.icmp.packetsize >= "600") {
1410 if (net.icmp.sendrate >= "20") {
1411 } else {
1412 net.msg ( node = "$masternode" content = "too fast" )
1413 }
1414 } else {
1415 net.msg ( node = "$masternode" content = "done" )
1416 net.msg ( node = "$self" content = "foo" )
1417 }
1418 net.icmp.sendrate = "25"
1419 net.icmp.packetsize = "650"
1420 net.icmp.send ( forked = "yes" )
1421 if (net.icmp.packetsize >= "600") {
1422 if (net.icmp.sendrate >= "20") {
1423 } else {
1424 net.msg ( node = "$masternode" content = "too fast" )
1425 }
1426 } else {
1427 net.msg ( node = "$masternode" content = "done" )
1428 net.msg ( node = "$self" content = "foo" )
1429 }
1430 net.icmp.sendrate = "25"
1431 net.icmp.packetsize = "650"
1432 net.icmp.send ( forked = "yes" )
1433 if (net.icmp.packetsize >= "600") {
1434 if (net.icmp.sendrate >= "20") {
1435 } else {
1436 net.msg ( node = "$masternode" content = "too fast" )
1437 }
1438 } else {
1439 net.msg ( node = "$masternode" content = "done" )
1440 net.msg ( node = "$self" content = "foo" )
1441 }
1442 net.icmp.sendrate = "25"
1443 net.icmp.packetsize = "650"
1444 net.icmp.send ( forked = "yes" )
1445 if (net.icmp.packetsize >= "600") {
1446 if (net.icmp.sendrate >= "20") {
1447 } else {
1448 net.msg ( node = "$masternode" content = "too fast" )
1449 }
1450 } else {
1451 net.msg ( node = "$masternode" content = "done" )
1452 net.msg ( node = "$self" content = "foo" )
1453 }
1454 net.icmp.sendrate = "25"
1455 net.icmp.packetsize = "650"
1456 net.icmp.send ( forked = "yes" )
1457 if (net.icmp.packetsize >= "600") {
1458 if (net.icmp.sendrate >= "20") {
1459 } else {
1460 net.msg ( node = "$masternode" content = "too fast" )
1461 }
1462 } else {
1463 net.msg ( node = "$masternode" content = "done" )
1464 net.msg ( node = "$self" content = "foo" )
1465 }
1466 net.icmp.sendrate = "25"
1467 net.icmp.packetsize = "650"
1468 net.icmp.send ( forked = "yes" )
1469 if (net.icmp.packetsize >= "600") {
1470 if (net.icmp.sendrate >= "20") {
1471 } else {
1472 net.msg ( node = "$masternode" content = "too fast" )
1473 }
1474 } else {
1475 net.msg ( node = "$masternode" content = "done" )
1476 net.msg ( node = "$self" content = "foo" )
1477 }
1478 net.icmp.sendrate = "25"
1479 net.icmp.packetsize = "650"
1480 net.icmp.send ( forked = "yes" )
1481 if (net.icmp.packetsize >= "600") {
1482 if (net.icmp.sendrate >= "20") {
1483 } else {
1484 net.msg ( node = "$masternode" content = "too fast" )
1485 }
1486 } else {
1487 net.msg ( node = "$masternode" content = "done" )
1488 net.msg ( node = "$self" content = "foo" )
1489 }
1490 net.icmp.sendrate = "25"
1491 net.icmp.packetsize = "650"
1492 net.icmp.send ( forked = "yes" )
1493 if (net.icmp.packetsize >= "600") {
1494 if (net.icmp.sendrate >= "20") {
1495 } else {
1496 net.msg ( node = "$masternode" content = "too fast" )
1497 }
1498 } else {
1499 net.msg ( node = "$masternode" content = "done" )
1500 net.msg ( node = "$self" content = "foo" )
1501 }
1502 net.icmp.sendrate = "25"
1503 net.icmp.packetsize = "650"
1504 net.icmp.send ( forked = "yes" )
1505 if (net.icmp.packetsize >= "600") {
1506 if (net.icmp.sendrate >= "20") {
1507 } else {
1508 net.msg ( node = "$masternode" content = "too fast" )
1509 }
1510 } else {
1511 net.msg ( node = "$masternode" content = "done" )
1512 net.msg ( node = "$self" content = "foo" )
1513 }
1514 net.icmp.sendrate = "25"
1515 net.icmp.packetsize = "650"
1516 net.icmp.send ( forked = "yes" )
1517 if (net.icmp.packetsize >= "600") {
1518 if (net.icmp.sendrate >= "20") {
1519 } else {
1520 net.msg ( node = "$masternode" content = "too fast" )
1521 }
1522 } else {
1523 net.msg ( node = "$masternode" content = "done" )
1524 net.msg ( node = "$self" content = "foo" )
1525 }
1526 net.icmp.sendrate = "25"
1527 net.icmp.packetsize = "650"
1528 net.icmp.send ( forked = "yes" )
1529 if (net.icmp.packetsize >= "600") {
1530 if (net.icmp.sendrate >= "20") {
1531 } else {
1532 net.msg ( node = "$masternode" content = "too fast" )
1533 }
1534 } else {
1535 net.msg ( node = "$masternode" content = "done" )
1536 net.msg ( node = "$self" content = "foo" )
1537 }
1538 net.icmp.sendrate = "25"
1539 net.icmp.packetsize = "650"
1540 net.icmp.send ( forked = "yes" )
1541 if (net.icmp.packetsize >= "600") {
1542 if (net.icmp.sendrate >= "20") {
1543 } else {
1544 net.msg ( node = "$masternode" content = "too fast" )
1545 }
1546 } else {
1547 net.msg ( node = "$masternode" content = "done" )
1548 net.msg ( node = "$self" content = "foo" )
1549 }
1550 net.icmp.sendrate = "25"
1551 net.icmp.packetsize = "650"
1552 net.icmp.send ( forked = "yes" )
1553 if (net.icmp.packetsize >= "600") {
1554 if (net.icmp.sendrate >= "20") {
1555 } else {
1556 net.msg ( node = "$masternode" content = "too fast" )
1557 }
1558 } else {
1559 net.msg ( node = "$masternode" content = "done" )
1560 net.msg ( node = "$self" content = "foo" )
1561 }
1562 net.icmp.sendrate = "25"
1563 net.icmp.packetsize = "650"
1564 net.icmp.send ( forked = "yes" )
1565 if (net.icmp.packetsize >= "600") {
1566 if (net.icmp.sendrate >= "20") {
1567 } else {
1568 net.msg ( node = "$masternode" content = "too fast" )
1569 }
1570 } else {
1571 net.msg ( node = "$masternode" content = "done" )
1572 net.msg ( node = "$self" content = "foo" )
1573 }
1574 net.icmp.sendrate = "25"
1575 net.icmp.packetsize = "650"
1576 net.icmp.send ( forked = "yes" )
1577 if (net.icmp.packetsize >= "600") {
1578 if (net.icmp.sendrate >= "20") {
1579 } else {
1580 net.msg ( node = "$masternode" content = "too fast" )
1581 }
1582 } else {
1583 net.msg ( node = "$masternode" content = "done" )
1584 net.msg ( node = "$self" content = "foo" )
1585 }
1586 net.icmp.sendrate = "25"
1587 net.icmp.packetsize = "650"
1588 net.icmp.send ( forked = "yes" )
1589 if (net.icmp.packetsize >= "600") {
1590 if (net.icmp.sendrate >= "20") {
1591 } else {
1592 net.msg ( node = "$masternode" content = "too fast" )
1593 }
1594 } else {
1595 net.msg ( node = "$masternode" content = "done" )
1596 net.msg ( node = "$self" content = "foo" )
1597 }
1598 net.icmp.sendrate = "25"
1599 net.icmp.packetsize = "650"
1600 net.icmp.send ( forked = "yes" )
1601 if (net.icmp.packetsize >= "600") {
1602 if (net.icmp.sendrate >= "20") {
1603 } else {
1604 net.msg ( node = "$masternode" content = "too fast" )
1605 }
1606 } else {
1607 net.msg ( node = "$masternode" content = "done" )
1608 net.msg ( node = "$self" content = "foo" )
1609 }
1610 net.icmp.sendrate = "25"
1611 net.icmp.packetsize = "650"
1612 net.icmp.send ( forked = "yes" )
1613 if (net.icmp.packetsize >= "600") {
1614 if (net.icmp.sendrate >= "20") {
1615 } else {
1616 net.msg ( node = "$masternode" content = "too fast" )
1617 }
1618 } else {
1619 net.msg ( node = "$masternode" content = "done" )
1620 net.msg ( node = "$self" content = "foo" )
1621 }
1622 net.icmp.sendrate = "25"
1623 net.icmp.packetsize = "650"
1624 net.icmp.send ( forked = "yes" )
1625 if (net.icmp.packetsize >= "600") {
1626 if (net.icmp.sendrate >= "20") {
1627 } else {
1628 net.msg ( node = "$masternode" content = "too fast" )
1629 }
1630 } else {
1631 net.msg ( node = "$masternode" content = "done" )
1632 net.msg ( node = "$self" content = "foo" )
1633 }
1634 net.icmp.sendrate = "25"
1635 net.icmp.packetsize = "650"
1636 net.icmp.send ( forked = "yes" )
1637 if (net.icmp.packetsize >= "600") {
1638 if (net.icmp.sendrate >= "20") {
1639 } else {
1640 net.msg ( node = "$masternode" content = "too fast" )
1641 }
1642 } else {
1643 net.msg ( node = "$masternode" content = "done" )
1644 net.msg ( node = "$self" content = "foo" )
1645 }
1646 net.icmp.sendrate = "25"
1647 net.icmp.packetsize = "650"
1648 net.icmp.send ( forked = "yes" )
1649 if (net.icmp.packetsize >= "600") {
1650 if (net.icmp.sendrate >= "20") {
1651 } else {
1652 net.msg ( node = "$masternode" content = "too fast" )
1653 }
1654 } else {
1655 net.msg ( node = "$masternode" content = "done" )
1656 net.msg ( node = "$self" content = "foo" )
1657 }
1658 net.icmp.sendrate = "25"
1659 net.icmp.packetsize = "650"
1660 net.icmp.send ( forked = "yes" )
1661 if (net.icmp.packetsize >= "600") {
1662 if (net.icmp.sendrate >= "20") {
1663 } else {
1664 net.msg ( node = "$masternode" content = "too fast" )
1665 }
1666 } else {
1667 net.msg ( node = "$masternode" content = "done" )
1668 net.msg ( node = "$self" content = "foo" )
1669 }
1670 net.icmp.sendrate = "25"
1671 net.icmp.packetsize = "650"
1672 net.icmp.send ( forked = "yes" )
1673 if (net.icmp.packetsize >= "600") {
1674 if (net.icmp.sendrate >= "20") {
1675 } else {
1676 net.msg ( node = "$masternode" content = "too fast" )
1677 }
1678 } else {
1679 net.msg ( node = "$masternode" content = "done" )
1680 net.msg ( node = "$self" content = "foo" )
1681 }
1682 net.icmp.sendrate = "25"
1683 net.icmp.packetsize = "650"
1684 net.icmp.send ( forked = "yes" )
1685 if (net.icmp.packetsize >= "600") {
1686 if (net.icmp.sendrate >= "20") {
1687 } else {
1688 net.msg ( node = "$masternode" content = "too fast" )
1689 }
1690 } else {
1691 net.msg ( node = "$masternode" content = "done" )
1692 net.msg ( node = "$self" content = "foo" )
1693 }
1694 net.icmp.sendrate = "25"
1695 net.icmp.packetsize = "650"
1696 net.icmp.send ( forked = "yes" )
1697 if (net.icmp.packetsize >= "600") {
1698 if (net.icmp.sendrate >= "20") {
1699 } else {
1700 net.msg ( node = "$masternode" content = "too fast" )
1701 }
1702 } else {
1703 net.msg ( node = "$masternode" content = "done" )
1704 net.msg ( node = "$self" content = "foo" )
1705 }
1706 net.icmp.sendrate = "25"
1707 net.icmp.packetsize = "650"
1708 net.icmp.send ( forked = "yes" )
1709 if (net.icmp.packetsize >= "600") {
1710 if (net.icmp.sendrate >= "20") {
1711 } else {
1712 net.msg ( node = "$masternode" content = "too fast" )
1713 }
1714 } else {
1715 net.msg ( node = "$masternode" content = "done" )
1716 net.msg ( node = "$self" content = "foo" )
1717 }
1718 net.icmp.sendrate = "25"
1719 net.icmp.packetsize = "650"
1720 net.icmp.send ( forked = "yes" )
1721 if (net.icmp.packetsize >= "600") {
1722 if (net.icmp.sendrate >= "20") {
1723 } else {
1724 net.msg ( node = "$masternode" content = "too fast" )
1725 }
1726 } else {
1727 net.msg ( node = "$masternode" content = "done" )
1728 net.msg ( node = "$self" content = "foo" )
1729 }
1730 net.icmp.sendrate = "25"
1731 net.icmp.packetsize = "650"
1732 net.icmp.send ( forked = "yes" )
1733 if (net.icmp.packetsize >= "600") {
1734 if (net.icmp.sendrate >= "20") {
1735 } else {
1736 net.msg ( node = "$masternode" content = "too fast" )
1737 }
1738 } else {
1739 net.msg ( node = "$masternode" content = "done" )
1740 net.msg ( node = "$self" content = "foo" )
1741 }
1742 net.icmp.sendrate = "25"
1743 net.icmp.packetsize = "650"
1744 net.icmp.send ( forked = "yes" )
1745 if (net.icmp.packetsize >= "600") {
1746 if (net.icmp.sendrate >= "20") {
1747 } else {
1748 net.msg ( node = "$masternode" content = "too fast" )
1749 }
1750 } else {
1751 net.msg ( node = "$masternode" content = "done" )
1752 net.msg ( node = "$self" content = "foo" )
1753 }
1754 net.icmp.sendrate = "25"
1755 net.icmp.packetsize = "650"
1756 net.icmp.send ( forked = "yes" )
1757 if (net.icmp.packetsize >= "600") {
1758 if (net.icmp.sendrate >= "20") {
1759 } else {
1760 net.msg ( node = "$masternode" content = "too fast" )
1761 }
1762 } else {
1763 net.msg ( node = "$masternode" content = "done" )
1764 net.msg ( node = "$self" content = "foo" )
1765 }
1766 net.icmp.sendrate = "25"
1767 net.icmp.packetsize = "650"
1768 net.icmp.send ( forked = "yes" )
1769 if (net.icmp.packetsize >= "600") {
1770 if (net.icmp.sendrate >= "20") {
1771 } else {
1772 net.msg ( node = "$masternode" content = "too fast" )
1773 }
1774 } else {
1775 net.msg ( node = "$masternode" content = "done" )
1776 net.msg ( node = "$self" content = "foo" )
1777 }
1778 net.icmp.sendrate = "25"
1779 net.icmp.packetsize = "650"
1780 net.icmp.send ( forked = "yes" )
1781 if (net.icmp.packetsize >= "600") {
1782 if (net.icmp.sendrate >= "20") {
1783 } else {
1784 net.msg ( node = "$masternode" content = "too fast" )
1785 }
1786 } else {
1787 net.msg ( node = "$masternode" content = "done" )
1788 net.msg ( node = "$self" content = "foo" )
1789 }
1790 net.icmp.sendrate = "25"
1791 net.icmp.packetsize = "650"
1792 net.icmp.send ( forked = "yes" )
1793 if (net.icmp.packetsize >= "600") {
1794 if (net.icmp.sendrate >= "20") {
1795 } else {
1796 net.msg ( node = "$masternode" content = "too fast" )
1797 }
1798 } else {
1799 net.msg ( node = "$masternode" content = "done" )
1800 net.msg ( node = "$self" content = "foo" )
1801 }
1802 net.icmp.sendrate = "25"
1803 net.icmp.packetsize = "650"
1804 net.icmp.send ( forked = "yes" )
1805 if (net.icmp.packetsize >= "600") {
1806 if (net.icmp.sendrate >= "20") {
1807 } else {
1808 net.msg ( node = "$masternode" content = "too fast" )
1809 }
1810 } else {
1811 net.msg ( node = "$masternode" content = "done" )
1812 net.msg ( node = "$self" content = "foo" )
1813 }
1814 net.icmp.sendrate = "25"
1815 net.icmp.packetsize = "650"
1816 net.icmp.send ( forked = "yes" )
1817 if (net.icmp.packetsize >= "600") {
1818 if (net.icmp.sendrate >= "20") {
1819 } else {
1820 net.msg ( node = "$masternode" content = "too fast" )
1821 }
1822 } else {
1823 net.msg ( node = "$masternode" content = "done" )
1824 net.msg ( node = "$self" content = "foo" )
1825 }
1826 net.icmp.sendrate = "25"
1827 net.icmp.packetsize = "650"
1828 net.icmp.send ( forked = "yes" )
1829 if (net.icmp.packetsize >= "600") {
1830 if (net.icmp.sendrate >= "20") {
1831 } else {
1832 net.msg ( node = "$masternode" content = "too fast" )
1833 }
1834 } else {
1835 net.msg ( node = "$masternode" content = "done" )
1836 net.msg ( node = "$self" content = "foo" )
1837 }
1838 net.icmp.sendrate = "25"
1839 net.icmp.packetsize = "650"
1840 net.icmp.send ( forked = "yes" )
1841 if (net.icmp.packetsize >= "600") {
1842 if (net.icmp.sendrate >= "20") {
1843 } else {
1844 net.msg ( node = "$masternode" content = "too fast" )
1845 }
1846 } else {
1847 net.msg ( node = "$masternode" content = "done" )
1848 net.msg ( node = "$self" content = "foo" )
1849 }
1850 net.icmp.sendrate = "25"
1851 net.icmp.packetsize = "650"
1852 net.icmp.send ( forked = "yes" )
1853 if (net.icmp.packetsize >= "600") {
1854 if (net.icmp.sendrate >= "20") {
1855 } else {
1856 net.msg ( node = "$masternode" content = "too fast" )
1857 }
1858 } else {
1859 net.msg ( node = "$masternode" content = "done" )
1860 net.msg ( node = "$self" content = "foo" )
1861 }
1862 net.icmp.sendrate = "25"
1863 net.icmp.packetsize = "650"
1864 net.icmp.send ( forked = "yes" )
1865 if (net.icmp.packetsize >= "600") {
1866 if (net.icmp.sendrate >= "20") {
1867 } else {
1868 net.msg ( node = "$masternode" content = "too fast" )
1869 }
1870 } else {
1871 net.msg ( node = "$masternode" content = "done" )
1872 net.msg ( node = "$self" content = "foo" )
1873 }
1874 net.icmp.sendrate = "25"
1875 net.icmp.packetsize = "650"
1876 net.icmp.send ( forked = "yes" )
1877 if (net.icmp.packetsize >= "600") {
1878 if (net.icmp.sendrate >= "20") {
1879 } else {
1880 net.msg ( node = "$masternode" content = "too fast" )
1881 }
1882 } else {
1883 net.msg ( node = "$masternode" content = "done" )
1884 net.msg ( node = "$self" content = "foo" )
1885 }
1886 net.icmp.sendrate = "25"
1887 net.icmp.packetsize = "650"
1888 net.icmp.send ( forked = "yes" )
1889 if (net.icmp.packetsize >= "600") {
1890 if (net.icmp.sendrate >= "20") {
1891 } else {
1892 net.msg ( node = "$masternode" content = "too fast" )
1893 }
1894 } else {
1895 net.msg ( node = "$masternode" content = "done" )
1896 net.msg ( node = "$self" content = "foo" )
1897 }
1898 net.icmp.sendrate = "25"
1899 net.icmp.packetsize = "650"
1900 net.icmp.send ( forked = "yes" )
1901 if (net.icmp.packetsize >= "600") {
1902 if (net.icmp.sendrate >= "20") {
1903 } else {
1904 net.msg ( node = "$masternode" content = "too fast" )
1905 }
1906 } else {
1907 net.msg ( node = "$masternode" content = "done" )
1908 net.msg ( node = "$self" content = "foo" )
1909 }
1910 net.icmp.sendrate = "25"
1911 net.icmp.packetsize = "650"
1912 net.icmp.send ( forked = "yes" )
1913 if (net.icmp.packetsize >= "600") {
1914 if (net.icmp.sendrate >= "20") {
1915 } else {
1916 net.msg ( node = "$masternode" content = "too fast" )
1917 }
1918 } else {
1919 net.msg ( node = "$masternode" content = "done" )
1920 net.msg ( node = "$self" content = "foo" )
1921 }
1922 net.icmp.sendrate = "25"
1923 net.icmp.packetsize = "650"
1924 net.icmp.send ( forked = "yes" )
1925 if (net.icmp.packetsize >= "600") {
1926 if (net.icmp.sendrate >= "20") {
1927 } else {
1928 net.msg ( node = "$masternode" content = "too fast" )
1929 }
1930 } else {
1931 net.msg ( node = "$masternode" content = "done" )
1932 net.msg ( node = "$self" content = "foo" )
1933 }
1934 net.icmp.sendrate = "25"
1935 net.icmp.packetsize = "650"
1936 net.icmp.send ( forked = "yes" )
1937 if (net.icmp.packetsize >= "600") {
1938 if (net.icmp.sendrate >= "20") {
1939 } else {
1940 net.msg ( node = "$masternode" content = "too fast" )
1941 }
1942 } else {
1943 net.msg ( node = "$masternode" content = "done" )
1944 net.msg ( node = "$self" content = "foo" )
1945 }
1946 net.icmp.sendrate = "25"
1947 net.icmp.packetsize = "650"
1948 net.icmp.send ( forked = "yes" )
1949 if (net.icmp.packetsize >= "600") {
1950 if (net.icmp.sendrate >= "20") {
1951 } else {
1952 net.msg ( node = "$masternode" content = "too fast" )
1953 }
1954 } else {
1955 net.msg ( node = "$masternode" content = "done" )
1956 net.msg ( node = "$self" content = "foo" )
1957 }
1958 net.icmp.sendrate = "25"
1959 net.icmp.packetsize = "650"
1960 net.icmp.send ( forked = "yes" )
1961 if (net.icmp.packetsize >= "600") {
1962 if (net.icmp.sendrate >= "20") {
1963 } else {
1964 net.msg ( node = "$masternode" content = "too fast" )
1965 }
1966 } else {
1967 net.msg ( node = "$masternode" content = "done" )
1968 net.msg ( node = "$self" content = "foo" )
1969 }
1970 net.icmp.sendrate = "25"
1971 net.icmp.packetsize = "650"
1972 net.icmp.send ( forked = "yes" )
1973 if (net.icmp.packetsize >= "600") {
1974 if (net.icmp.sendrate >= "20") {
1975 } else {
1976 net.msg ( node = "$masternode" content = "too fast" )
1977 }
1978 } else {
1979 net.msg ( node = "$masternode" content = "done" )
1980 net.msg ( node = "$self" content = "foo" )
1981 }
1982 net.icmp.sendrate = "25"
1983 net.icmp.packetsize = "650"
1984 net.icmp.send ( forked = "yes" )
1985 if (net.icmp.packetsize >= "600") {
1986 if (net.icmp.sendrate >= "20") {
1987 } else {
1988 net.msg ( node = "$masternode" content = "too fast" )
1989 }
1990 } else {
1991 net.msg ( node = "$masternode" content = "done" )
1992 net.msg ( node = "$self" content = "foo" )
1993 }
1994 net.icmp.sendrate = "25"
1995 net.icmp.packetsize = "650"
1996 net.icmp.send ( forked = "yes" )
1997 if (net.icmp.packetsize >= "600") {
1998 if (net.icmp.sendrate >= "20") {
1999 } else {
2000 net.msg ( node = "$masternode" content = "too fast" )
2001 }
2002 } else {
2003 net.msg ( node = "$masternode" content = "done" )
2004 net.msg ( node = "$self" content = "foo" )
2005 }
2006 net.icmp.sendrate = "25"
2007 net.icmp.packetsize = "650"
2008 net.icmp.send ( forked = "yes" )
2009 if (net.icmp.packetsize >= "600") {
2010 if (net.icmp.sendrate >= "20") {
2011 } else {
2012 net.msg ( node = "$masternode" content = "too fast" )
2013 }
2014 } else {
2015 net.msg ( node = "$masternode" content = "done" )
2016 net.msg ( node = "$self" content = "foo" )
2017 }
2018 net.icmp.sendrate = "25"
2019 net.icmp.packetsize = "650"
2020 net.icmp.send ( forked = "yes" )
2021 if (net.icmp.packetsize >= "600") {
2022 if (net.icmp.sendrate >= "20") {
2023 } else {
2024 net.msg ( node = "$masternode" content = "too fast" )
2025 }
2026 } else {
2027 net.msg ( node = "$masternode" content = "done" )
2028 net.msg ( node = "$self" content = "foo" )
2029 }
2030 net.icmp.sendrate = "25"
2031 net.icmp.packetsize = "650"
2032 net.icmp.send ( forked = "yes" )
2033 if (net.icmp.packetsize >= "600") {
2034 if (net.icmp.sendrate >= "20") {
2035 } else {
2036 net.msg ( node = "$masternode" content = "too fast" )
2037 }
2038 } else {
2039 net.msg ( node = "$masternode" content = "done" )
2040 net.msg ( node = "$self" content = "foo" )
2041 }
2042 net.icmp.sendrate = "25"
2043 net.icmp.packetsize = "650"
2044 net.icmp.send ( forked = "yes" )
2045 if (net.icmp.packetsize >= "600") {
2046 if (net.icmp.sendrate >= "20") {
2047 } else {
2048 net.msg ( node = "$masternode" content = "too fast" )
2049 }
2050 } else {
2051 net.msg ( node = "$masternode" content = "done" )
2052 net.msg ( node = "$self" content = "foo" )
2053 }
2054 net.icmp.sendrate = "25"
2055 net.icmp.packetsize = "650"
2056 net.icmp.send ( forked = "yes" )
2057 if (net.icmp.packetsize >= "600") {
2058 if (net.icmp.sendrate >= "20") {
2059 } else {
2060 net.msg ( node = "$masternode" content = "too fast" )
2061 }
2062 } else {
2063 net.msg ( node = "$masternode" content = "done" )
2064 net.msg ( node = "$self" content = "foo" )
2065 }
2066 net.icmp.sendrate = "25"
2067 net.icmp.packetsize = "650"
2068 net.icmp.send ( forked = "yes" )
2069 if (net.icmp.packetsize >= "600") {
2070 if (net.icmp.sendrate >= "20") {
2071 } else {
2072 net.msg ( node = "$masternode" content = "too fast" )
2073 }
2074 } else {
2075 net.msg ( node = "$masternode" content = "done" )
2076 net.msg ( node = "$self" content = "foo" )
2077 }
2078 net.icmp.sendrate = "25"
2079 net.icmp.packetsize = "650"
2080 net.icmp.send ( forked = "yes" )
2081 if (net.icmp.packetsize >= "600") {
2082 if (net.icmp.sendrate >= "20") {
2083 } else {
2084 net.msg ( node = "$masternode" content = "too fast" )
2085 }
2086 } else {
2087 net.msg ( node = "$masternode" content = "done" )
2088 net.msg ( node = "$self" content = "foo" )
2089 }
2090 net.icmp.sendrate = "25"
2091 net.icmp.packetsize = "650"
2092 net.icmp.send ( forked = "yes" )
2093 if (net.icmp.packetsize >= "600") {
2094 if (net.icmp.sendrate >= "20") {
2095 } else {
2096 net.msg ( node = "$masternode" content = "too fast" )
2097 }
2098 } else {
2099 net.msg ( node = "$masternode" content = "done" )
2100 net.msg ( node = "$self" content = "foo" )
2101 }
2102 net.icmp.sendrate = "25"
2103 net.icmp.packetsize = "650"
2104 net.icmp.send ( forked = "yes" )
2105 if (net.icmp.packetsize >= "600") {
2106 if (net.icmp.sendrate >= "20") {
2107 } else {
2108 net.msg ( node = "$masternode" content = "too fast" )
2109 }
2110 } else {
2111 net.msg ( node = "$masternode" content = "done" )
2112 net.msg ( node = "$self" content = "foo" )
2113 }
2114 net.icmp.sendrate = "25"
2115 net.icmp.packetsize = "650"
2116 net.icmp.send ( forked = "yes" )
2117 if (net.icmp.packetsize >= "600") {
2118 if (net.icmp.sendrate >= "20") {
2119 } else {
2120 net.msg ( node = "$masternode" content = "too fast" )
2121 }
2122 } else {
2123 net.msg ( node = "$masternode" content = "done" )
2124 net.msg ( node = "$self" content = "foo" )
2125 }
2126 net.icmp.sendrate = "25"
2127 net.icmp.packetsize = "650"
2128 net.icmp.send ( forked = "yes" )
2129 if (net.icmp.packetsize >= "600") {
2130 if (net.icmp.sendrate >= "20") {
2131 } else {
2132 net.msg ( node = "$masternode" content = "too fast" )
2133 }
2134 } else {
2135 net.msg ( node = "$masternode" content = "done" )
2136 net.msg ( node = "$self" content = "foo" )
2137 }
2138 net.icmp.sendrate = "25"
2139 net.icmp.packetsize = "650"
2140 net.icmp.send ( forked = "yes" )
2141 if (net.icmp.packetsize >= "600") {
2142 if (net.icmp.sendrate >= "20") {
2143 } else {
2144 net.msg ( node = "$masternode" content = "too fast" )
2145 }
2146 } else {
2147 net.msg ( node = "$masternode" content = "done" )
2148 net.msg ( node = "$self" content = "foo" )
2149 }
2150 net.icmp.sendrate = "25"
2151 net.icmp.packetsize = "650"
2152 net.icmp.send ( forked = "yes" )
2153 if (net.icmp.packetsize >= "600") {
2154 if (net.icmp.sendrate >= "20") {
2155 } else {
2156 net.msg ( node = "$masternode" content = "too fast" )
2157 }
2158 } else {
2159 net.msg ( node = "$masternode" content = "done" )
2160 net.msg ( node = "$self" content = "foo" )
2161 }
2162 net.icmp.sendrate = "25"
2163 net.icmp.packetsize = "650"
2164 net.icmp.send ( forked = "yes" )
2165 if (net.icmp.packetsize >= "600") {
2166 if (net.icmp.sendrate >= "20") {
2167 } else {
2168 net.msg ( node = "$masternode" content = "too fast" )
2169 }
2170 } else {
2171 net.msg ( node = "$masternode" content = "done" )
2172 net.msg ( node = "$self" content = "foo" )
2173 }
2174 net.icmp.sendrate = "25"
2175 net.icmp.packetsize = "650"
2176 net.icmp.send ( forked = "yes" )
2177 if (net.icmp.packetsize >= "600") {
2178 if (net.icmp.sendrate >= "20") {
2179 } else {
2180 net.msg ( node = "$masternode" content = "too fast" )
2181 }
2182 } else {
2183 net.msg ( node = "$masternode" content = "done" )
2184 net.msg ( node = "$self" content = "foo" )
2185 }
2186 net.icmp.sendrate = "25"
2187 net.icmp.packetsize = "650"
2188 net.icmp.send ( forked = "yes" )
2189 if (net.icmp.packetsize >= "600") {
2190 if (net.icmp.sendrate >= "20") {
2191 } else {
2192 net.msg ( node = "$masternode" content = "too fast" )
2193 }
2194 } else {
2195 net.msg ( node = "$masternode" content = "done" )
2196 net.msg ( node = "$self" content = "foo" )
2197 }
2198 net.icmp.sendrate = "25"
2199 net.icmp.packetsize = "650"
2200 net.icmp.send ( forked = "yes" )
2201 if (net.icmp.packetsize >= "600") {
2202 if (net.icmp.sendrate >= "20") {
2203 } else {
2204 net.msg ( node = "$masternode" content = "too fast" )
2205 }
2206 } else {
2207 net.msg ( node = "$masternode" content = "done" )
2208 net.msg ( node = "$self" content = "foo" )
2209 }
2210 net.icmp.sendrate = "25"
2211 net.icmp.packetsize = "650"
2212 net.icmp.send ( forked = "yes" )
2213 if (net.icmp.packetsize >= "600") {
2214 if (net.icmp.sendrate >= "20") {
2215 } else {
2216 net.msg ( node = "$masternode" content = "too fast" )
2217 }
2218 } else {
2219 net.msg ( node = "$masternode" content = "done" )
2220 net.msg ( node = "$self" content = "foo" )
2221 }
2222 net.icmp.sendrate = "25"
2223 net.icmp.packetsize = "650"
2224 net.icmp.send ( forked = "yes" )
2225 if (net.icmp.packetsize >= "600") {
2226 if (net.icmp.sendrate >= "20") {
2227 } else {
2228 net.msg ( node = "$masternode" content = "too fast" )
2229 }
2230 } else {
2231 net.msg ( node = "$masternode" content = "done" )
2232 net.msg ( node = "$self" content = "foo" )
2233 }
2234 net.icmp.sendrate = "25"
2235 net.icmp.packetsize = "650"
2236 net.icmp.send ( forked = "yes" )
2237 if (net.icmp.packetsize >= "600") {
2238 if (net.icmp.sendrate >= "20") {
2239 } else {
2240 net.msg ( node = "$masternode" content = "too fast" )
2241 }
2242 } else {
2243 net.msg ( node = "$masternode" content = "done" )
2244 net.msg ( node = "$self" content = "foo" )
2245 }
2246 net.icmp.sendrate = "25"
2247 net.icmp.packetsize = "650"
2248 net.icmp.send ( forked = "yes" )
2249 if (net.icmp.packetsize >= "600") {
2250 if (net.icmp.sendrate >= "20") {
2251 } else {
2252 net.msg ( node = "$masternode" content = "too fast" )
2253 }
2254 } else {
2255 net.msg ( node = "$masternode" content = "done" )
2256 net.msg ( node = "$self" content = "foo" )
2257 }
2258 net.icmp.sendrate = "25"
2259 net.icmp.packetsize = "650"
2260 net.icmp.send ( forked = "yes" )
2261 if (net.icmp.packetsize >= "600") {
2262 if (net.icmp.sendrate >= "20") {
2263 } else {
2264 net.msg ( node = "$masternode" content = "too fast" )
2265 }
2266 } else {
2267 net.msg ( node = "$masternode" content = "done" )
2268 net.msg ( node = "$self" content = "foo" )
2269 }
2270 net.icmp.sendrate = "25"
2271 net.icmp.packetsize = "650"
2272 net.icmp.send ( forked = "yes" )
2273 if (net.icmp.packetsize >= "600") {
2274 if (net.icmp.sendrate >= "20") {
2275 } else {
2276 net.msg ( node = "$masternode" content = "too fast" )
2277 }
2278 } else {
2279 net.msg ( node = "$masternode" content = "done" )
2280 net.msg ( node = "$self" content = "foo" )
2281 }
2282 net.icmp.sendrate = "25"
2283 net.icmp.packetsize = "650"
2284 net.icmp.send ( forked = "yes" )
2285 if (net.icmp.packetsize >= "600") {
2286 if (net.icmp.sendrate >= "20") {
2287 } else {
2288 net.msg ( node = "$masternode" content = "too fast" )
2289 }
2290 } else {
2291 net.msg ( node = "$masternode" content = "done" )
2292 net.msg ( node = "$self" content = "foo" )
2293 }
2294 net.icmp.sendrate = "25"
2295 net.icmp.packetsize = "650"
2296 net.icmp.send ( forked = "yes" )
2297 if (net.icmp.packetsize >= "600") {
2298 if (net.icmp.sendrate >= "20") {
2299 } else {
2300 net.msg ( node = "$masternode" content = "too fast" )
2301 }
2302 } else {
2303 net.msg ( node = "$masternode" content = "done" )
2304 net.msg ( node = "$self" content = "foo" )
2305 }
2306 net.icmp.sendrate = "25"
2307 net.icmp.packetsize = "650"
2308 net.icmp.send ( forked = "yes" )
2309 if (net.icmp.packetsize >= "600") {
2310 if (net.icmp.sendrate >= "20") {
2311 } else {
2312 net.msg ( node = "$masternode" content = "too fast" )
2313 }
2314 } else {
2315 net.msg ( node = "$masternode" content = "done" )
2316 net.msg ( node = "$self" content = "foo" )
2317 }
2318 net.icmp.sendrate = "25"
2319 net.icmp.packetsize = "650"
2320 net.icmp.send ( forked = "yes" )
2321 if (net.icmp.packetsize >= "600") {
2322 if (net.icmp.sendrate >= "20") {
2323 } else {
2324 net.msg ( node = "$masternode" content = "too fast" )
2325 }
2326 } else {
2327 net.msg ( node = "$masternode" content = "done" )
2328 net.msg ( node = "$self" content = "foo" )
2329 }
2330 net.icmp.sendrate = "25"
2331 net.icmp.packetsize = "650"
2332 net.icmp.send ( forked = "yes" )
2333 if (net.icmp.packetsize >= "600") {
2334 if (net.icmp.sendrate >= "20") {
2335 } else {
2336 net.msg ( node = "$masternode" content = "too fast" )
2337 }
2338 } else {
2339 net.msg ( node = "$masternode" content = "done" )
2340 net.msg ( node = "$self" content = "foo" )
2341 }
2342 net.icmp.sendrate = "25"
2343 net.icmp.packetsize = "650"
2344 net.icmp.send ( forked = "yes" )
2345 if (net.icmp.packetsize >= "600") {
2346 if (net.icmp.sendrate >= "20") {
2347 } else {
2348 net.msg ( node = "$masternode" content = "too fast" )
2349 }
2350 } else {
2351 net.msg ( node = "$masternode" content = "done" )
2352 net.msg ( node = "$self" content = "foo" )
2353 }
2354 net.icmp.sendrate = "25"
2355 net.icmp.packetsize = "650"
2356 net.icmp.send ( forked = "yes" )
2357 if (net.icmp.packetsize >= "600") {
2358 if (net.icmp.sendrate >= "20") {
2359 } else {
2360 net.msg ( node = "$masternode" content = "too fast" )
2361 }
2362 } else {
2363 net.msg ( node = "$masternode" content = "done" )
2364 net.msg ( node = "$self" content = "foo" )
2365 }
2366 net.icmp.sendrate = "25"
2367 net.icmp.packetsize = "650"
2368 net.icmp.send ( forked = "yes" )
2369 if (net.icmp.packetsize >= "600") {
2370 if (net.icmp.sendrate >= "20") {
2371 } else {
2372 net.msg ( node = "$masternode" content = "too fast" )
2373 }
2374 } else {
2375 net.msg ( node = "$masternode" content = "done" )
2376 net.msg ( node = "$self" content = "foo" )
2377 }
2378 net.icmp.sendrate = "25"
2379 net.icmp.packetsize = "650"
2380 net.icmp.send ( forked = "yes" )
2381 if (net.icmp.packetsize >= "600") {
2382 if (net.icmp.sendrate >= "20") {
2383 } else {
2384 net.msg ( node = "$masternode" content = "too fast" )
2385 }
2386 } else {
2387 net.msg ( node = "$masternode" content = "done" )
2388 net.msg ( node = "$self" content = "foo" )
2389 }
2390 net.icmp.sendrate = "25"
2391 net.icmp.packetsize = "650"
2392 net.icmp.send ( forked = "yes" )
2393 if (net.icmp.packetsize >= "600") {
2394 if (net.icmp.sendrate >= "20") {
2395 } else {
2396 net.msg ( node = "$masternode" content = "too fast" )
2397 }
2398 } else {
2399 net.msg ( node = "$masternode" content = "done" )
2400 net.msg ( node = "$self" content = "foo" )
2401 }
2402 net.icmp.sendrate = "25"
2403 net.icmp.packetsize = "650"
2404 net.icmp.send ( forked = "yes" )
2405 if (net.icmp.packetsize >= "600") {
2406 if (net.icmp.sendrate >= "20") {
2407 } else {
2408 net.msg ( node = "$masternode" content = "too fast" )
2409 }
2410 } else {
2411 net.msg ( node = "$masternode" content = "done" )
2412 net.msg ( node = "$self" content = "foo" )
2413 }
2414 net.icmp.sendrate = "25"
2415 net.icmp.packetsize = "650"
2416 net.icmp.send ( forked = "yes" )
2417 if (net.icmp.packetsize >= "600") {
2418 if (net.icmp.sendrate >= "20") {
2419 } else {
2420 net.msg ( node = "$masternode" content = "too fast" )
2421 }
2422 } else {
2423 net.msg ( node = "$masternode" content = "done" )
2424 net.msg ( node = "$self" content = "foo" )
2425 }
2426 net.icmp.sendrate = "25"
2427 net.icmp.packetsize = "650"
2428 net.icmp.send ( forked = "yes" )
2429 if (net.icmp.packetsize >= "600") {
2430 if (net.icmp.sendrate >= "20") {
2431 } else {
2432 net.msg ( node = "$masternode" content = "too fast" )
2433 }
2434 } else {
2435 net.msg ( node = "$masternode" content = "done" )
2436 net.msg ( node = "$self" content = "foo" )
2437 }
2438 net.icmp.sendrate = "25"
2439 net.icmp.packetsize = "650"
2440 net.icmp.send ( forked = "yes" )
2441 if (net.icmp.packetsize >= "600") {
2442 if (net.icmp.sendrate >= "20") {
2443 } else {
2444 net.msg ( node = "$masternode" content = "too fast" )
2445 }
2446 } else {
2447 net.msg ( node = "$masternode" content = "done" )
2448 net.msg ( node = "$self" content = "foo" )
2449 }
2450 net.icmp.sendrate = "25"
2451 net.icmp.packetsize = "650"
2452 net.icmp.send ( forked = "yes" )
2453 if (net.icmp.packetsize >= "600") {
2454 if (net.icmp.sendrate >= "20") {
2455 } else {
2456 net.msg ( node = "$masternode" content = "too fast" )
2457 }
2458 } else {
2459 net.msg ( node = "$masternode" content = "done" )
2460 net.msg ( node = "$self" content = "foo" )
2461 }
2462 net.icmp.sendrate = "25"
2463 net.icmp.packetsize = "650"
2464 net.icmp.send ( forked = "yes" )
2465 if (net.icmp.packetsize >= "600") {
2466 if (net.icmp.sendrate >= "20") {
2467 } else {
2468 net.msg ( node = "$masternode" content = "too fast" )
2469 }
2470 } else {
2471 net.msg ( node = "$masternode" content = "done" )
2472 net.msg ( node = "$self" content = "foo" )
2473 }
2474 net.icmp.sendrate = "25"
2475 net.icmp.packetsize = "650"
2476 net.icmp.send ( forked = "yes" )
2477 if (net.icmp.packetsize >= "600") {
2478 if (net.icmp.sendrate >= "20") {
2479 } else {
2480 net.msg ( node = "$masternode" content = "too fast" )
2481 }
2482 } else {
2483 net.msg ( node = "$masternode" content = "done" )
2484 net.msg ( node = "$self" content = "foo" )
2485 }
2486 net.icmp.sendrate = "25"
2487 net.icmp.packetsize = "650"
2488 net.icmp.send ( forked = "yes" )
2489 if (net.icmp.packetsize >= "600") {
2490 if (net.icmp.sendrate >= "20") {
2491 } else {
2492 net.msg ( node = "$masternode" content = "too fast" )
2493 }
2494 } else {
2495 net.msg ( node = "$masternode" content = "done" )
2496 net.msg ( node = "$self" content = "foo" )
2497 }
2498 net.icmp.sendrate = "25"
2499 net.icmp.packetsize = "650"
2500 net.icmp.send ( forked = "yes" )
2501 if (net.icmp.packetsize >= "600") {
2502 if (net.icmp.sendrate >= "20") {
2503 } else {
2504 net.msg ( node = "$masternode" content = "too fast" )
2505 }
2506 } else {
2507 net.msg ( node = "$masternode" content = "done" )
2508 net.msg ( node = "$self" content = "foo" )
2509 }
2510 net.icmp.sendrate = "25"
2511 net.icmp.packetsize = "650"
2512 net.icmp.send ( forked = "yes" )
2513 if (net.icmp.packetsize >= "600") {
2514 if (net.icmp.sendrate >= "20") {
2515 } else {
2516 net.msg ( node = "$masternode" content = "too fast" )
2517 }
2518 } else {
2519 net.msg ( node = "$masternode" content = "done" )
2520 net.msg ( node = "$self" content = "foo" )
2521 }
2522 net.icmp.sendrate = "25"
2523 net.icmp.packetsize = "650"
2524 net.icmp.send ( forked = "yes" )
2525 if (net.icmp.packetsize >= "600") {
2526 if (net.icmp.sendrate >= "20") {
2527 } else {
2528 net.msg ( node = "$masternode" content = "too fast" )
2529 }
2530 } else {
2531 net.msg ( node = "$masternode" content = "done" )
2532 net.msg ( node = "$self" content = "foo" )
2533 }
2534 net.icmp.sendrate = "25"
2535 net.icmp.packetsize = "650"
2536 net.icmp.send ( forked = "yes" )
2537 if (net.icmp.packetsize >= "600") {
2538 if (net.icmp.sendrate >= "20") {
2539 } else {
2540 net.msg ( node = "$masternode" content = "too fast" )
2541 }
2542 } else {
2543 net.msg ( node = "$masternode" content = "done" )
2544 net.msg ( node = "$self" content = "foo" )
2545 }
2546 net.icmp.sendrate = "25"
2547 net.icmp.packetsize = "650"
2548 net.icmp.send ( forked = "yes" )
2549 if (net.icmp.packetsize >= "600") {
2550 if (net.icmp.sendrate >= "20") {
2551 } else {
2552 net.msg ( node = "$masternode" content = "too fast" )
2553 }
2554 } else {
2555 net.msg ( node = "$masternode" content = "done" )
2556 net.msg ( node = "$self" content = "foo" )
2557 }
2558 net.icmp.sendrate = "25"
2559 net.icmp.packetsize = "650"
2560 net.icmp.send ( forked = "yes" )
2561 if (net.icmp.packetsize >= "600") {
2562 if (net.icmp.sendrate >= "20") {
2563 } else {
2564 net.msg ( node = "$masternode" content = "too fast" )
2565 }
2566 } else {
2567 net.msg ( node = "$masternode" content = "done" )
2568 net.msg ( node = "$self" content = "foo" )
2569 }
2570 net.icmp.sendrate = "25"
2571 net.icmp.packetsize = "650"
2572 net.icmp.send ( forked = "yes" )
2573 if (net.icmp.packetsize >= "600") {
2574 if (net.icmp.sendrate >= "20") {
2575 } else {
2576 net.msg ( node = "$masternode" content = "too fast" )
2577 }
2578 } else {
2579 net.msg ( node = "$masternode" content = "done" )
2580 net.msg ( node = "$self" content = "foo" )
2581 }
2582 net.icmp.sendrate = "25"
2583 net.icmp.packetsize = "650"
2584 net.icmp.send ( forked = "yes" )
2585 if (net.icmp.packetsize >= "600") {
2586 if (net.icmp.sendrate >= "20") {
2587 } else {
2588 net.msg ( node = "$masternode" content = "too fast" )
2589 }
2590 } else {
2591 net.msg ( node = "$masternode" content = "done" )
2592 net.msg ( node = "$self" content = "foo" )
2593 }
2594 net.icmp.sendrate = "25"
2595 net.icmp.packetsize = "650"
2596 net.icmp.send ( forked = "yes" )
2597 if (net.icmp.packetsize >= "600") {
2598 if (net.icmp.sendrate >= "20") {
2599 } else {
2600 net.msg ( node = "$masternode" content = "too fast" )
2601 }
2602 } else {
2603 net.msg ( node = "$masternode" content = "done" )
2604 net.msg ( node = "$self" content = "foo" )
2605 }
2606 net.icmp.sendrate = "25"
2607 net.icmp.packetsize = "650"
2608 net.icmp.send ( forked = "yes" )
2609 if (net.icmp.packetsize >= "600") {
2610 if (net.icmp.sendrate >= "20") {
2611 } else {
2612 net.msg ( node = "$masternode" content = "too fast" )
2613 }
2614 } else {
2615 net.msg ( node = "$masternode" content = "done" )
2616 net.msg ( node = "$self" content = "foo" )
2617 }
2618 net.icmp.sendrate = "25"
2619 net.icmp.packetsize = "650"
2620 net.icmp.send ( forked = "yes" )
2621 if (net.icmp.packetsize >= "600") {
2622 if (net.icmp.sendrate >= "20") {
2623 } else {
2624 net.msg ( node = "$masternode" content = "too fast" )
2625 }
2626 } else {
2627 net.msg ( node = "$masternode" content = "done" )
2628 net.msg ( node = "$self" content = "foo" )
2629 }
2630 net.icmp.sendrate = "25"
2631 net.icmp.packetsize = "650"
2632 net.icmp.send ( forked = "yes" )
2633 if (net.icmp.packetsize >= "600") {
2634 if (net.icmp.sendrate >= "20") {
2635 } else {
2636 net.msg ( node = "$masternode" content = "too fast" )
2637 }
2638 } else {
2639 net.msg ( node = "$masternode" content = "done" )
2640 net.msg ( node = "$self" content = "foo" )
2641 }
2642 net.icmp.sendrate = "25"
2643 net.icmp.packetsize = "650"
2644 net.icmp.send ( forked = "yes" )
2645 if (net.icmp.packetsize >= "600") {
2646 if (net.icmp.sendrate >= "20") {
2647 } else {
2648 net.msg ( node = "$masternode" content = "too fast" )
2649 }
2650 } else {
2651 net.msg ( node = "$masternode" content = "done" )
2652 net.msg ( node = "$self" content = "foo" )
2653 }
2654 net.icmp.sendrate = "25"
2655 net.icmp.packetsize = "650"
2656 net.icmp.send ( forked = "yes" )
2657 if (net.icmp.packetsize >= "600") {
2658 if (net.icmp.sendrate >= "20") {
2659 } else {
2660 net.msg ( node = "$masternode" content = "too fast" )
2661 }
2662 } else {
2663 net.msg ( node = "$masternode" content = "done" )
2664 net.msg ( node = "$self" content = "foo" )
2665 }
2666 net.icmp.sendrate = "25"
2667 net.icmp.packetsize = "650"
2668 net.icmp.send ( forked = "yes" )
2669 if (net.icmp.packetsize >= "600") {
2670 if (net.icmp.sendrate >= "20") {
2671 } else {
2672 net.msg ( node = "$masternode" content = "too fast" )
2673 }
2674 } else {
2675 net.msg ( node = "$masternode" content = "done" )
2676 net.msg ( node = "$self" content = "foo" )
2677 }
2678 net.icmp.sendrate = "25"
2679 net.icmp.packetsize = "650"
2680 net.icmp.send ( forked = "yes" )
2681 if (net.icmp.packetsize >= "600") {
2682 if (net.icmp.sendrate >= "20") {
2683 } else {
2684 net.msg ( node = "$masternode" content = "too fast" )
2685 }
2686 } else {
2687 net.msg ( node = "$masternode" content = "done" )
2688 net.msg ( node = "$self" content = "foo" )
2689 }
2690 net.icmp.sendrate = "25"
2691 net.icmp.packetsize = "650"
2692 net.icmp.send ( forked = "yes" )
2693 if (net.icmp.packetsize >= "600") {
2694 if (net.icmp.sendrate >= "20") {
2695 } else {
2696 net.msg ( node = "$masternode" content = "too fast" )
2697 }
2698 } else {
2699 net.msg ( node = "$masternode" content = "done" )
2700 net.msg ( node = "$self" content = "foo" )
2701 }
2702 net.icmp.sendrate = "25"
2703 net.icmp.packetsize = "650"
2704 net.icmp.send ( forked = "yes" )
2705 if (net.icmp.packetsize >= "600") {
2706 if (net.icmp.sendrate >= "20") {
2707 } else {
2708 net.msg ( node = "$masternode" content = "too fast" )
2709 }
2710 } else {
2711 net.msg ( node = "$masternode" content = "done" )
2712 net.msg ( node = "$self" content = "foo" )
2713 }
2714 net.icmp.sendrate = "25"
2715 net.icmp.packetsize = "650"
2716 net.icmp.send ( forked = "yes" )
2717 if (net.icmp.packetsize >= "600") {
2718 if (net.icmp.sendrate >= "20") {
2719 } else {
2720 net.msg ( node = "$masternode" content = "too fast" )
2721 }
2722 } else {
2723 net.msg ( node = "$masternode" content = "done" )
2724 net.msg ( node = "$self" content = "foo" )
2725 }
2726 net.icmp.sendrate = "25"
2727 net.icmp.packetsize = "650"
2728 net.icmp.send ( forked = "yes" )
2729 if (net.icmp.packetsize >= "600") {
2730 if (net.icmp.sendrate >= "20") {
2731 } else {
2732 net.msg ( node = "$masternode" content = "too fast" )
2733 }
2734 } else {
2735 net.msg ( node = "$masternode" content = "done" )
2736 net.msg ( node = "$self" content = "foo" )
2737 }
2738 net.icmp.sendrate = "25"
2739 net.icmp.packetsize = "650"
2740 net.icmp.send ( forked = "yes" )
2741 if (net.icmp.packetsize >= "600") {
2742 if (net.icmp.sendrate >= "20") {
2743 } else {
2744 net.msg ( node = "$masternode" content = "too fast" )
2745 }
2746 } else {
2747 net.msg ( node = "$masternode" content = "done" )
2748 net.msg ( node = "$self" content = "foo" )
2749 }
2750 net.icmp.sendrate = "25"
2751 net.icmp.packetsize = "650"
2752 net.icmp.send ( forked = "yes" )
2753 if (net.icmp.packetsize >= "600") {
2754 if (net.icmp.sendrate >= "20") {
2755 } else {
2756 net.msg ( node = "$masternode" content = "too fast" )
2757 }
2758 } else {
2759 net.msg ( node = "$masternode" content = "done" )
2760 net.msg ( node = "$self" content = "foo" )
2761 }
2762 net.icmp.sendrate = "25"
2763 net.icmp.packetsize = "650"
2764 net.icmp.send ( forked = "yes" )
2765 if (net.icmp.packetsize >= "600") {
2766 if (net.icmp.sendrate >= "20") {
2767 } else {
2768 net.msg ( node = "$masternode" content = "too fast" )
2769 }
2770 } else {
2771 net.msg ( node = "$masternode" content = "done" )
2772 net.msg ( node = "$self" content = "foo" )
2773 }
2774 net.icmp.sendrate = "25"
2775 net.icmp.packetsize = "650"
2776 net.icmp.send ( forked = "yes" )
2777 if (net.icmp.packetsize >= "600") {
2778 if (net.icmp.sendrate >= "20") {
2779 } else {
2780 net.msg ( node = "$masternode" content = "too fast" )
2781 }
2782 } else {
2783 net.msg ( node = "$masternode" content = "done" )
2784 net.msg ( node = "$self" content = "foo" )
2785 }
2786 net.icmp.sendrate = "25"
2787 net.icmp.packetsize = "650"
2788 net.icmp.send ( forked = "yes" )
2789 if (net.icmp.packetsize >= "600") {
2790 if (net.icmp.sendrate >= "20") {
2791 } else {
2792 net.msg ( node = "$masternode" content = "too fast" )
2793 }
2794 } else {
2795 net.msg ( node = "$masternode" content = "done" )
2796 net.msg ( node = "$self" content = "foo" )
2797 }
2798 net.icmp.sendrate = "25"
2799 net.icmp.packetsize = "650"
2800 net.icmp.send ( forked = "yes" )
2801 if (net.icmp.packetsize >= "600") {
2802 if (net.icmp.sendrate >= "20") {
2803 } else {
2804 net.msg ( node = "$masternode" content = "too fast" )
2805 }
2806 } else {
2807 net.msg ( node = "$masternode" content = "done" )
2808 net.msg ( node = "$self" content = "foo" )
2809 }
2810 net.icmp.sendrate = "25"
2811 net.icmp.packetsize = "650"
2812 net.icmp.send ( forked = "yes" )
2813 if (net.icmp.packetsize >= "600") {
2814 if (net.icmp.sendrate >= "20") {
2815 } else {
2816 net.msg ( node = "$masternode" content = "too fast" )
2817 }
2818 } else {
2819 net.msg ( node = "$masternode" content = "done" )
2820 net.msg ( node = "$self" content = "foo" )
2821 }
2822 net.icmp.sendrate = "25"
2823 net.icmp.packetsize = "650"
2824 net.icmp.send ( forked = "yes" )
2825 if (net.icmp.packetsize >= "600") {
2826 if (net.icmp.sendrate >= "20") {
2827 } else {
2828 net.msg ( node = "$masternode" content = "too fast" )
2829 }
2830 } else {
2831 net.msg ( node = "$masternode" content = "done" )
2832 net.msg ( node = "$self" content = "foo" )
2833 }
2834 net.icmp.sendrate = "25"
2835 net.icmp.packetsize = "650"
2836 net.icmp.send ( forked = "yes" )
2837 if (net.icmp.packetsize >= "600") {
2838 if (net.icmp.sendrate >= "20") {
2839 } else {
2840 net.msg ( node = "$masternode" content = "too fast" )
2841 }
2842 } else {
2843 net.msg ( node = "$masternode" content = "done" )
2844 net.msg ( node = "$self" content = "foo" )
2845 }
2846 net.icmp.sendrate = "25"
2847 net.icmp.packetsize = "650"
2848 net.icmp.send ( forked = "yes" )
2849 if (net.icmp.packetsize >= "600") {
2850 if (net.icmp.sendrate >= "20") {
2851 } else {
2852 net.msg ( node = "$masternode" content = "too fast" )
2853 }
2854 } else {
2855 net.msg ( node = "$masternode" content = "done" )
2856 net.msg ( node = "$self" content = "foo" )
2857 }
2858 net.icmp.sendrate = "25"
2859 net.icmp.packetsize = "650"
2860 net.icmp.send ( forked = "yes" )
2861 if (net.icmp.packetsize >= "600") {
2862 if (net.icmp.sendrate >= "20") {
2863 } else {
2864 net.msg ( node = "$masternode" content = "too fast" )
2865 }
2866 } else {
2867 net.msg ( node = "$masternode" content = "done" )
2868 net.msg ( node = "$self" content = "foo" )
2869 }
2870 net.icmp.sendrate = "25"
2871 net.icmp.packetsize = "650"
2872 net.icmp.send ( forked = "yes" )
2873 if (net.icmp.packetsize >= "600") {
2874 if (net.icmp.sendrate >= "20") {
2875 } else {
2876 net.msg ( node = "$masternode" content = "too fast" )
2877 }
2878 } else {
2879 net.msg ( node = "$masternode" content = "done" )
2880 net.msg ( node = "$self" content = "foo" )
2881 }
2882 net.icmp.sendrate = "25"
2883 net.icmp.packetsize = "650"
2884 net.icmp.send ( forked = "yes" )
2885 if (net.icmp.packetsize >= "600") {
2886 if (net.icmp.sendrate >= "20") {
2887 } else {
2888 net.msg ( node = "$masternode" content = "too fast" )
2889 }
2890 } else {
2891 net.msg ( node = "$masternode" content = "done" )
2892 net.msg ( node = "$self" content = "foo" )
2893 }
2894 net.icmp.sendrate = "25"
2895 net.icmp.packetsize = "650"
2896 net.icmp.send ( forked = "yes" )
2897 if (net.icmp.packetsize >= "600") {
2898 if (net.icmp.sendrate >= "20") {
2899 } else {
2900 net.msg ( node = "$masternode" content = "too fast" )
2901 }
2902 } else {
2903 net.msg ( node = "$masternode" content = "done" )
2904 net.msg ( node = "$self" content = "foo" )
2905 }
2906 net.icmp.sendrate = "25"
2907 net.icmp.packetsize = "650"
2908 net.icmp.send ( forked = "yes" )
2909 if (net.icmp.packetsize >= "600") {
2910 if (net.icmp.sendrate >= "20") {
2911 } else {
2912 net.msg ( node = "$masternode" content = "too fast" )
2913 }
2914 } else {
2915 net.msg ( node = "$masternode" content = "done" )
2916 net.msg ( node = "$self" content = "foo" )
2917 }
2918 net.icmp.sendrate = "25"
2919 net.icmp.packetsize = "650"
2920 net.icmp.send ( forked = "yes" )
2921 if (net.icmp.packetsize >= "600") {
2922 if (net.icmp.sendrate >= "20") {
2923 } else {
2924 net.msg ( node = "$masternode" content = "too fast" )
2925 }
2926 } else {
2927 net.msg ( node = "$masternode" content = "done" )
2928 net.msg ( node = "$self" content = "foo" )
2929 }
2930 net.icmp.sendrate = "25"
2931 net.icmp.packetsize = "650"
2932 net.icmp.send ( forked = "yes" )
2933 if (net.icmp.packetsize >= "600") {
2934 if (net.icmp.sendrate >= "20") {
2935 } else {
2936 net.msg ( node = "$masternode" content = "too fast" )
2937 }
2938 } else {
2939 net.msg ( node = "$masternode" content = "done" )
2940 net.msg ( node = "$self" content = "foo" )
2941 }
2942 net.icmp.sendrate = "25"
2943 net.icmp.packetsize = "650"
2944 net.icmp.send ( forked = "yes" )
2945 if (net.icmp.packetsize >= "600") {
2946 if (net.icmp.sendrate >= "20") {
2947 } else {
2948 net.msg ( node = "$masternode" content = "too fast" )
2949 }
2950 } else {
2951 net.msg ( node = "$masternode" content = "done" )
2952 net.msg ( node = "$self" content = "foo" )
2953 }
2954 net.icmp.sendrate = "25"
2955 net.icmp.packetsize = "650"
2956 net.icmp.send ( forked = "yes" )
2957 if (net.icmp.packetsize >= "600") {
2958 if (net.icmp.sendrate >= "20") {
2959 } else {
2960 net.msg ( node = "$masternode" content = "too fast" )
2961 }
2962 } else {
2963 net.msg ( node = "$masternode" content = "done" )
2964 net.msg ( node = "$self" content = "foo" )
2965 }
2966 net.icmp.sendrate = "25"
2967 net.icmp.packetsize = "650"
2968 net.icmp.send ( forked = "yes" )
2969 if (net.icmp.packetsize >= "600") {
2970 if (net.icmp.sendrate >= "20") {
2971 } else {
2972 net.msg ( node = "$masternode" content = "too fast" )
2973 }
2974 } else {
2975 net.msg ( node = "$masternode" content = "done" )
2976 net.msg ( node = "$self" content = "foo" )
2977 }
2978 net.icmp.sendrate = "25"
2979 net.icmp.packetsize = "650"
2980 net.icmp.send ( forked = "yes" )
2981 if (net.icmp.packetsize >= "600") {
2982 if (net.icmp.sendrate >= "20") {
2983 } else {
2984 net.msg ( node = "$masternode" content = "too fast" )
2985 }
2986 } else {
2987 net.msg ( node = "$masternode" content = "done" )
2988 net.msg ( node = "$self" content = "foo" )
2989 }
2990 net.icmp.sendrate = "25"
2991 net.icmp.packetsize = "650"
2992 net.icmp.send ( forked = "yes" )
2993 if (net.icmp.packetsize >= "600") {
2994 if (net.icmp.sendrate >= "20") {
2995 } else {
2996 net.msg ( node = "$masternode" content = "too fast" )
2997 }
2998 } else {
2999 net.msg ( node = "$masternode" content = "done" )
3000 net.msg ( node = "$self" content = "foo" )
3001 }
3002 net.icmp.sendrate = "25"
3003 net.icmp.packetsize = "650"
3004 net.icmp.send ( forked = "yes" )
3005 if (net.icmp.packetsize >= "600") {
3006 if (net.icmp.sendrate >= "20") {
3007 } else {
3008 net.msg ( node = "$masternode" content = "too fast" )
3009 }
3010 } else {
3011 net.msg ( node = "$masternode" content = "done" )
3012 net.msg ( node = "$self" content = "foo" )
3013 }
3014 net.icmp.sendrate = "25"
3015 net.icmp.packetsize = "650"
3016 net.icmp.send ( forked = "yes" )
3017 if (net.icmp.packetsize >= "600") {
3018 if (net.icmp.sendrate >= "20") {
3019 } else {
3020 net.msg ( node = "$masternode" content = "too fast" )
3021 }
3022 } else {
3023 net.msg ( node = "$masternode" content = "done" )
3024 net.msg ( node = "$self" content = "foo" )
3025 }
3026 net.icmp.sendrate = "25"
3027 net.icmp.packetsize = "650"
3028 net.icmp.send ( forked = "yes" )
3029 if (net.icmp.packetsize >= "600") {
3030 if (net.icmp.sendrate >= "20") {
3031 } else {
3032 net.msg ( node = "$masternode" content = "too fast" )
3033 }
3034 } else {
3035 net.msg ( node = "$masternode" content = "done" )
3036 net.msg ( node = "$self" content = "foo" )
3037 }
3038 net.icmp.sendrate = "25"
3039 net.icmp.packetsize = "650"
3040 net.icmp.send ( forked = "yes" )
3041 if (net.icmp.packetsize >= "600") {
3042 if (net.icmp.sendrate >= "20") {
3043 } else {
3044 net.msg ( node = "$masternode" content = "too fast" )
3045 }
3046 } else {
3047 net.msg ( node = "$masternode" content = "done" )
3048 net.msg ( node = "$self" content = "foo" )
3049 }
3050 net.icmp.sendrate = "25"
3051 net.icmp.packetsize = "650"
3052 net.icmp.send ( forked = "yes" )
3053 if (net.icmp.packetsize >= "600") {
3054 if (net.icmp.sendrate >= "20") {
3055 } else {
3056 net.msg ( node = "$masternode" content = "too fast" )
3057 }
3058 } else {
3059 net.msg ( node = "$masternode" content = "done" )
3060 net.msg ( node = "$self" content = "foo" )
3061 }
3062 net.icmp.sendrate = "25"
3063 net.icmp.packetsize = "650"
3064 net.icmp.send ( forked = "yes" )
3065 if (net.icmp.packetsize >= "600") {
3066 if (net.icmp.sendrate >= "20") {
3067 } else {
3068 net.msg ( node = "$masternode" content = "too fast" )
3069 }
3070 } else {
3071 net.msg ( node = "$masternode" content = "done" )
3072 net.msg ( node = "$self" content = "foo" )
3073 }
3074 net.icmp.sendrate = "25"
3075 net.icmp.packetsize = "650"
3076 net.icmp.send ( forked = "yes" )
3077 if (net.icmp.packetsize >= "600") {
3078 if (net.icmp.sendrate >= "20") {
3079 } else {
3080 net.msg ( node = "$masternode" content = "too fast" )
3081 }
3082 } else {
3083 net.msg ( node = "$masternode" content = "done" )
3084 net.msg ( node = "$self" content = "foo" )
3085 }
3086 net.icmp.sendrate = "25"
3087 net.icmp.packetsize = "650"
3088 net.icmp.send ( forked = "yes" )
3089 if (net.icmp.packetsize >= "600") {
3090 if (net.icmp.sendrate >= "20") {
3091 } else {
3092 net.msg ( node = "$masternode" content = "too fast" )
3093 }
3094 } else {
3095 net.msg ( node = "$masternode" content = "done" )
3096 net.msg ( node = "$self" content = "foo" )
3097 }
3098 net.icmp.sendrate = "25"
3099 net.icmp.packetsize = "650"
3100 net.icmp.send ( forked = "yes" )
3101 if (net.icmp.packetsize >= "600") {
3102 if (net.icmp.sendrate >= "20") {
3103 } else {
3104 net.msg ( node = "$masternode" content = "too fast" )
3105 }
3106 } else {
3107 net.msg ( node = "$masternode" content = "done" )
3108 net.msg ( node = "$self" content = "foo" )
3109 }
3110 net.icmp.sendrate = "25"
3111 net.icmp.packetsize = "650"
3112 net.icmp.send ( forked = "yes" )
3113 if (net.icmp.packetsize >= "600") {
3114 if (net.icmp.sendrate >= "20") {
3115 } else {
3116 net.msg ( node = "$masternode" content = "too fast" )
3117 }
3118 } else {
3119 net.msg ( node = "$masternode" content = "done" )
3120 net.msg ( node = "$self" content = "foo" )
3121 }
3122 net.icmp.sendrate = "25"
3123 net.icmp.packetsize = "650"
3124 net.icmp.send ( forked = "yes" )
3125 if (net.icmp.packetsize >= "600") {
3126 if (net.icmp.sendrate >= "20") {
3127 } else {
3128 net.msg ( node = "$masternode" content = "too fast" )
3129 }
3130 } else {
3131 net.msg ( node = "$masternode" content = "done" )
3132 net.msg ( node = "$self" content = "foo" )
3133 }
3134 net.icmp.sendrate = "25"
3135 net.icmp.packetsize = "650"
3136 net.icmp.send ( forked = "yes" )
3137 if (net.icmp.packetsize >= "600") {
3138 if (net.icmp.sendrate >= "20") {
3139 } else {
3140 net.msg ( node = "$masternode" content = "too fast" )
3141 }
3142 } else {
3143 net.msg ( node = "$masternode" content = "done" )
3144 net.msg ( node = "$self" content = "foo" )
3145 }
3146 net.icmp.sendrate = "25"
3147 net.icmp.packetsize = "650"
3148 net.icmp.send ( forked = "yes" )
3149 if (net.icmp.packetsize >= "600") {
3150 if (net.icmp.sendrate >= "20") {
3151 } else {
3152 net.msg ( node = "$masternode" content = "too fast" )
3153 }
3154 } else {
3155 net.msg ( node = "$masternode" content = "done" )
3156 net.msg ( node = "$self" content = "foo" )
3157 }
3158 net.icmp.sendrate = "25"
3159 net.icmp.packetsize = "650"
3160 net.icmp.send ( forked = "yes" )
3161 if (net.icmp.packetsize >= "600") {
3162 if (net.icmp.sendrate >= "20") {
3163 } else {
3164 net.msg ( node = "$masternode" content = "too fast" )
3165 }
3166 } else {
3167 net.msg ( node = "$masternode" content = "done" )
3168 net.msg ( node = "$self" content = "foo" )
3169 }
3170 net.icmp.sendrate = "25"
3171 net.icmp.packetsize = "650"
3172 net.icmp.send ( forked = "yes" )
3173 if (net.icmp.packetsize >= "600") {
3174 if (net.icmp.sendrate >= "20") {
3175 } else {
3176 net.msg ( node = "$masternode" content = "too fast" )
3177 }
3178 } else {
3179 net.msg ( node = "$masternode" content = "done" )
3180 net.msg ( node = "$self" content = "foo" )
3181 }
3182 net.icmp.sendrate = "25"
3183 net.icmp.packetsize = "650"
3184 net.icmp.send ( forked = "yes" )
3185 if (net.icmp.packetsize >= "600") {
3186 if (net.icmp.sendrate >= "20") {
3187 } else {
3188 net.msg ( node = "$masternode" content = "too fast" )
3189 }
3190 } else {
3191 net.msg ( node = "$masternode" content = "done" )
3192 net.msg ( node = "$self" content = "foo" )
3193 }
3194 net.icmp.sendrate = "25"
3195 net.icmp.packetsize = "650"
3196 net.icmp.send ( forked = "yes" )
3197 if (net.icmp.packetsize >= "600") {
3198 if (net.icmp.sendrate >= "20") {
3199 } else {
3200 net.msg ( node = "$masternode" content = "too fast" )
3201 }
3202 } else {
3203 net.msg ( node = "$masternode" content = "done" )
3204 net.msg ( node = "$self" content = "foo" )
3205 }
3206 net.icmp.sendrate = "25"
3207 net.icmp.packetsize = "650"
3208 net.icmp.send ( forked = "yes" )
3209 if (net.icmp.packetsize >= "600") {
3210 if (net.icmp.sendrate >= "20") {
3211 } else {
3212 net.msg ( node = "$masternode" content = "too fast" )
3213 }
3214 } else {
3215 net.msg ( node = "$masternode" content = "done" )
3216 net.msg ( node = "$self" content = "foo" )
3217 }
3218 net.icmp.sendrate = "25"
3219 net.icmp.packetsize = "650"
3220 net.icmp.send ( forked = "yes" )
3221 if (net.icmp.packetsize >= "600") {
3222 if (net.icmp.sendrate >= "20") {
3223 } else {
3224 net.msg ( node = "$masternode" content = "too fast" )
3225 }
3226 } else {
3227 net.msg ( node = "$masternode" content = "done" )
3228 net.msg ( node = "$self" content = "foo" )
3229 }
3230 net.icmp.sendrate = "25"
3231 net.icmp.packetsize = "650"
3232 net.icmp.send ( forked = "yes" )
3233 if (net.icmp.packetsize >= "600") {
3234 if (net.icmp.sendrate >= "20") {
3235 } else {
3236 net.msg ( node = "$masternode" content = "too fast" )
3237 }
3238 } else {
3239 net.msg ( node = "$masternode" content = "done" )
3240 net.msg ( node = "$self" content = "foo" )
3241 }
3242 net.icmp.sendrate = "25"
3243 net.icmp.packetsize = "650"
3244 net.icmp.send ( forked = "yes" )
3245 if (net.icmp.packetsize >= "600") {
3246 if (net.icmp.sendrate >= "20") {
3247 } else {
3248 net.msg ( node = "$masternode" content = "too fast" )
3249 }
3250 } else {
3251 net.msg ( node = "$masternode" content = "done" )
3252 net.msg ( node = "$self" content = "foo" )
3253 }
3254 net.icmp.sendrate = "25"
3255 net.icmp.packetsize = "650"
3256 net.icmp.send ( forked = "yes" )
3257 if (net.icmp.packetsize >= "600") {
3258 if (net.icmp.sendrate >= "20") {
3259 } else {
3260 net.msg ( node = "$masternode" content = "too fast" )
3261 }
3262 } else {
3263 net.msg ( node = "$masternode" content = "done" )
3264 net.msg ( node = "$self" content = "foo" )
3265 }
3266 net.icmp.sendrate = "25"
3267 net.icmp.packetsize = "650"
3268 net.icmp.send ( forked = "yes" )
3269 if (net.icmp.packetsize >= "600") {
3270 if (net.icmp.sendrate >= "20") {
3271 } else {
3272 net.msg ( node = "$masternode" content = "too fast" )
3273 }
3274 } else {
3275 net.msg ( node = "$masternode" content = "done" )
3276 net.msg ( node = "$self" content = "foo" )
3277 }
3278 net.icmp.sendrate = "25"
3279 net.icmp.packetsize = "650"
3280 net.icmp.send ( forked = "yes" )
3281 if (net.icmp.packetsize >= "600") {
3282 if (net.icmp.sendrate >= "20") {
3283 } else {
3284 net.msg ( node = "$masternode" content = "too fast" )
3285 }
3286 } else {
3287 net.msg ( node = "$masternode" content = "done" )
3288 net.msg ( node = "$self" content = "foo" )
3289 }
3290 net.icmp.sendrate = "25"
3291 net.icmp.packetsize = "650"
3292 net.icmp.send ( forked = "yes" )
3293 if (net.icmp.packetsize >= "600") {
3294 if (net.icmp.sendrate >= "20") {
3295 } else {
3296 net.msg ( node = "$masternode" content = "too fast" )
3297 }
3298 } else {
3299 net.msg ( node = "$masternode" content = "done" )
3300 net.msg ( node = "$self" content = "foo" )
3301 }
3302 net.icmp.sendrate = "25"
3303 net.icmp.packetsize = "650"
3304 net.icmp.send ( forked = "yes" )
3305 if (net.icmp.packetsize >= "600") {
3306 if (net.icmp.sendrate >= "20") {
3307 } else {
3308 net.msg ( node = "$masternode" content = "too fast" )
3309 }
3310 } else {
3311 net.msg ( node = "$masternode" content = "done" )
3312 net.msg ( node = "$self" content = "foo" )
3313 }
3314 net.icmp.sendrate = "25"
3315 net.icmp.packetsize = "650"
3316 net.icmp.send ( forked = "yes" )
3317 if (net.icmp.packetsize >= "600") {
3318 if (net.icmp.sendrate >= "20") {
3319 } else {
3320 net.msg ( node = "$masternode" content = "too fast" )
3321 }
3322 } else {
3323 net.msg ( node = "$masternode" content = "done" )
3324 net.msg ( node = "$self" content = "foo" )
3325 }
3326 net.icmp.sendrate = "25"
3327 net.icmp.packetsize = "650"
3328 net.icmp.send ( forked = "yes" )
3329 if (net.icmp.packetsize >= "600") {
3330 if (net.icmp.sendrate >= "20") {
3331 } else {
3332 net.msg ( node = "$masternode" content = "too fast" )
3333 }
3334 } else {
3335 net.msg ( node = "$masternode" content = "done" )
3336 net.msg ( node = "$self" content = "foo" )
3337 }
3338 net.icmp.sendrate = "25"
3339 net.icmp.packetsize = "650"
3340 net.icmp.send ( forked = "yes" )
3341 if (net.icmp.packetsize >= "600") {
3342 if (net.icmp.sendrate >= "20") {
3343 } else {
3344 net.msg ( node = "$masternode" content = "too fast" )
3345 }
3346 } else {
3347 net.msg ( node = "$masternode" content = "done" )
3348 net.msg ( node = "$self" content = "foo" )
3349 }
3350 net.icmp.sendrate = "25"
3351 net.icmp.packetsize = "650"
3352 net.icmp.send ( forked = "yes" )
3353 if (net.icmp.packetsize >= "600") {
3354 if (net.icmp.sendrate >= "20") {
3355 } else {
3356 net.msg ( node = "$masternode" content = "too fast" )
3357 }
3358 } else {
3359 net.msg ( node = "$masternode" content = "done" )
3360 net.msg ( node = "$self" content = "foo" )
3361 }
3362 net.icmp.sendrate = "25"
3363 net.icmp.packetsize = "650"
3364 net.icmp.send ( forked = "yes" )
3365 if (net.icmp.packetsize >= "600") {
3366 if (net.icmp.sendrate >= "20") {
3367 } else {
3368 net.msg ( node = "$masternode" content = "too fast" )
3369 }
3370 } else {
3371 net.msg ( node = "$masternode" content = "done" )
3372 net.msg ( node = "$self" content = "foo" )
3373 }
3374 net.icmp.sendrate = "25"
3375 net.icmp.packetsize = "650"
3376 net.icmp.send ( forked = "yes" )
3377 if (net.icmp.packetsize >= "600") {
3378 if (net.icmp.sendrate >= "20") {
3379 } else {
3380 net.msg ( node = "$masternode" content = "too fast" )
3381 }
3382 } else {
3383 net.msg ( node = "$masternode" content = "done" )
3384 net.msg ( node = "$self" content = "foo" )
3385 }
3386 net.icmp.sendrate = "25"
3387 net.icmp.packetsize = "650"
3388 net.icmp.send ( forked = "yes" )
3389 if (net.icmp.packetsize >= "600") {
3390 if (net.icmp.sendrate >= "20") {
3391 } else {
3392 net.msg ( node = "$masternode" content = "too fast" )
3393 }
3394 } else {
3395 net.msg ( node = "$masternode" content = "done" )
3396 net.msg ( node = "$self" content = "foo" )
3397 }
3398 net.icmp.sendrate = "25"
3399 net.icmp.packetsize = "650"
3400 net.icmp.send ( forked = "yes" )
3401 if (net.icmp.packetsize >= "600") {
3402 if (net.icmp.sendrate >= "20") {
3403 } else {
3404 net.msg ( node = "$masternode" content = "too fast" )
3405 }
3406 } else {
3407 net.msg ( node = "$masternode" content = "done" )
3408 net.msg ( node = "$self" content = "foo" )
3409 }
3410 net.icmp.sendrate = "25"
3411 net.icmp.packetsize = "650"
3412 net.icmp.send ( forked = "yes" )
3413 if (net.icmp.packetsize >= "600") {
3414 if (net.icmp.sendrate >= "20") {
3415 } else {
3416 net.msg ( node = "$masternode" content = "too fast" )
3417 }
3418 } else {
3419 net.msg ( node = "$masternode" content = "done" )
3420 net.msg ( node = "$self" content = "foo" )
3421 }
3422 net.icmp.sendrate = "25"
3423 net.icmp.packetsize = "650"
3424 net.icmp.send ( forked = "yes" )
3425 if (net.icmp.packetsize >= "600") {
3426 if (net.icmp.sendrate >= "20") {
3427 } else {
3428 net.msg ( node = "$masternode" content = "too fast" )
3429 }
3430 } else {
3431 net.msg ( node = "$masternode" content = "done" )
3432 net.msg ( node = "$self" content = "foo" )
3433 }
3434 net.icmp.sendrate = "25"
3435 net.icmp.packetsize = "650"
3436 net.icmp.send ( forked = "yes" )
3437 if (net.icmp.packetsize >= "600") {
3438 if (net.icmp.sendrate >= "20") {
3439 } else {
3440 net.msg ( node = "$masternode" content = "too fast" )
3441 }
3442 } else {
3443 net.msg ( node = "$masternode" content = "done" )
3444 net.msg ( node = "$self" content = "foo" )
3445 }
3446 net.icmp.sendrate = "25"
3447 net.icmp.packetsize = "650"
3448 net.icmp.send ( forked = "yes" )
3449 if (net.icmp.packetsize >= "600") {
3450 if (net.icmp.sendrate >= "20") {
3451 } else {
3452 net.msg ( node = "$masternode" content = "too fast" )
3453 }
3454 } else {
3455 net.msg ( node = "$masternode" content = "done" )
3456 net.msg ( node = "$self" content = "foo" )
3457 }
3458 net.icmp.sendrate = "25"
3459 net.icmp.packetsize = "650"
3460 net.icmp.send ( forked = "yes" )
3461 if (net.icmp.packetsize >= "600") {
3462 if (net.icmp.sendrate >= "20") {
3463 } else {
3464 net.msg ( node = "$masternode" content = "too fast" )
3465 }
3466 } else {
3467 net.msg ( node = "$masternode" content = "done" )
3468 net.msg ( node = "$self" content = "foo" )
3469 }
3470 net.icmp.sendrate = "25"
3471 net.icmp.packetsize = "650"
3472 net.icmp.send ( forked = "yes" )
3473 if (net.icmp.packetsize >= "600") {
3474 if (net.icmp.sendrate >= "20") {
3475 } else {
3476 net.msg ( node = "$masternode" content = "too fast" )
3477 }
3478 } else {
3479 net.msg ( node = "$masternode" content = "done" )
3480 net.msg ( node = "$self" content = "foo" )
3481 }
3482 net.icmp.sendrate = "25"
3483 net.icmp.packetsize = "650"
3484 net.icmp.send ( forked = "yes" )
3485 if (net.icmp.packetsize >= "600") {
3486 if (net.icmp.sendrate >= "20") {
3487 } else {
3488 net.msg ( node = "$masternode" content = "too fast" )
3489 }
3490 } else {
3491 net.msg ( node = "$masternode" content = "done" )
3492 net.msg ( node = "$self" content = "foo" )
3493 }
3494 net.icmp.sendrate = "25"
3495 net.icmp.packetsize = "650"
3496 net.icmp.send ( forked = "yes" )
3497 if (net.icmp.packetsize >= "600") {
3498 if (net.icmp.sendrate >= "20") {
3499 } else {
3500 net.msg ( node = "$masternode" content = "too fast" )
3501 }
3502 } else {
3503 net.msg ( node = "$masternode" content = "done" )
3504 net.msg ( node = "$self" content = "foo" )
3505 }
3506 net.icmp.sendrate = "25"
3507 net.icmp.packetsize = "650"
3508 net.icmp.send ( forked = "yes" )
3509 if (net.icmp.packetsize >= "600") {
3510 if (net.icmp.sendrate >= "20") {
3511 } else {
3512 net.msg ( node = "$masternode" content = "too fast" )
3513 }
3514 } else {
3515 net.msg ( node = "$masternode" content = "done" )
3516 net.msg ( node = "$self" content = "foo" )
3517 }
3518 net.icmp.sendrate = "25"
3519 net.icmp.packetsize = "650"
3520 net.icmp.send ( forked = "yes" )
3521 if (net.icmp.packetsize >= "600") {
3522 if (net.icmp.sendrate >= "20") {
3523 } else {
3524 net.msg ( node = "$masternode" content = "too fast" )
3525 }
3526 } else {
3527 net.msg ( node = "$masternode" content = "done" )
3528 net.msg ( node = "$self" content = "foo" )
3529 }
3530 net.icmp.sendrate = "25"
3531 net.icmp.packetsize = "650"
3532 net.icmp.send ( forked = "yes" )
3533 if (net.icmp.packetsize >= "600") {
3534 if (net.icmp.sendrate >= "20") {
3535 } else {
3536 net.msg ( node = "$masternode" content = "too fast" )
3537 }
3538 } else {
3539 net.msg ( node = "$masternode" content = "done" )
3540 net.msg ( node = "$self" content = "foo" )
3541 }
3542 net.icmp.sendrate = "25"
3543 net.icmp.packetsize = "650"
3544 net.icmp.send ( forked = "yes" )
3545 if (net.icmp.packetsize >= "600") {
3546 if (net.icmp.sendrate >= "20") {
3547 } else {
3548 net.msg ( node = "$masternode" content = "too fast" )
3549 }
3550 } else {
3551 net.msg ( node = "$masternode" content = "done" )
3552 net.msg ( node = "$self" content = "foo" )
3553 }
3554 net.icmp.sendrate = "25"
3555 net.icmp.packetsize = "650"
3556 net.icmp.send ( forked = "yes" )
3557 if (net.icmp.packetsize >= "600") {
3558 if (net.icmp.sendrate >= "20") {
3559 } else {
3560 net.msg ( node = "$masternode" content = "too fast" )
3561 }
3562 } else {
3563 net.msg ( node = "$masternode" content = "done" )
3564 net.msg ( node = "$self" content = "foo" )
3565 }
3566 net.icmp.sendrate = "25"
3567 net.icmp.packetsize = "650"
3568 net.icmp.send ( forked = "yes" )
3569 if (net.icmp.packetsize >= "600") {
3570 if (net.icmp.sendrate >= "20") {
3571 } else {
3572 net.msg ( node = "$masternode" content = "too fast" )
3573 }
3574 } else {
3575 net.msg ( node = "$masternode" content = "done" )
3576 net.msg ( node = "$self" content = "foo" )
3577 }
3578 net.icmp.sendrate = "25"
3579 net.icmp.packetsize = "650"
3580 net.icmp.send ( forked = "yes" )
3581 if (net.icmp.packetsize >= "600") {
3582 if (net.icmp.sendrate >= "20") {
3583 } else {
3584 net.msg ( node = "$masternode" content = "too fast" )
3585 }
3586 } else {
3587 net.msg ( node = "$masternode" content = "done" )
3588 net.msg ( node = "$self" content = "foo" )
3589 }
3590 net.icmp.sendrate = "25"
3591 net.icmp.packetsize = "650"
3592 net.icmp.send ( forked = "yes" )
3593 if (net.icmp.packetsize >= "600") {
3594 if (net.icmp.sendrate >= "20") {
3595 } else {
3596 net.msg ( node = "$masternode" content = "too fast" )
3597 }
3598 } else {
3599 net.msg ( node = "$masternode" content = "done" )
3600 net.msg ( node = "$self" content = "foo" )
3601 }
3602 net.icmp.sendrate = "25"
3603 net.icmp.packetsize = "650"
3604 net.icmp.send ( forked = "yes" )
3605 if (net.icmp.packetsize >= "600") {
3606 if (net.icmp.sendrate >= "20") {
3607 } else {
3608 net.msg ( node = "$masternode" content = "too fast" )
3609 }
3610 } else {
3611 net.msg ( node = "$masternode" content = "done" )
3612 net.msg ( node = "$self" content = "foo" )
3613 }
3614 net.icmp.sendrate = "25"
3615 net.icmp.packetsize = "650"
3616 net.icmp.send ( forked = "yes" )
3617 if (net.icmp.packetsize >= "600") {
3618 if (net.icmp.sendrate >= "20") {
3619 } else {
3620 net.msg ( node = "$masternode" content = "too fast" )
3621 }
3622 } else {
3623 net.msg ( node = "$masternode" content = "done" )
3624 net.msg ( node = "$self" content = "foo" )
3625 }
3626 net.icmp.sendrate = "25"
3627 net.icmp.packetsize = "650"
3628 net.icmp.send ( forked = "yes" )
3629 if (net.icmp.packetsize >= "600") {
3630 if (net.icmp.sendrate >= "20") {
3631 } else {
3632 net.msg ( node = "$masternode" content = "too fast" )
3633 }
3634 } else {
3635 net.msg ( node = "$masternode" content = "done" )
3636 net.msg ( node = "$self" content = "foo" )
3637 }
3638 net.icmp.sendrate = "25"
3639 net.icmp.packetsize = "650"
3640 net.icmp.send ( forked = "yes" )
3641 if (net.icmp.packetsize >= "600") {
3642 if (net.icmp.sendrate >= "20") {
3643 } else {
3644 net.msg ( node = "$masternode" content = "too fast" )
3645 }
3646 } else {
3647 net.msg ( node = "$masternode" content = "done" )
3648 net.msg ( node = "$self" content = "foo" )
3649 }
3650 net.icmp.sendrate = "25"
3651 net.icmp.packetsize = "650"
3652 net.icmp.send ( forked = "yes" )
3653 if (net.icmp.packetsize >= "600") {
3654 if (net.icmp.sendrate >= "20") {
3655 } else {
3656 net.msg ( node = "$masternode" content = "too fast" )
3657 }
3658 } else {
3659 net.msg ( node = "$masternode" content = "done" )
3660 net.msg ( node = "$self" content = "foo" )
3661 }
3662 net.icmp.sendrate = "25"
3663 net.icmp.packetsize = "650"
3664 net.icmp.send ( forked = "yes" )
3665 if (net.icmp.packetsize >= "600") {
3666 if (net.icmp.sendrate >= "20") {
3667 } else {
3668 net.msg ( node = "$masternode" content = "too fast" )
3669 }
3670 } else {
3671 net.msg ( node = "$masternode" content = "done" )
3672 net.msg ( node = "$self" content = "foo" )
3673 }
3674 net.icmp.sendrate = "25"
3675 net.icmp.packetsize = "650"
3676 net.icmp.send ( forked = "yes" )
3677 if (net.icmp.packetsize >= "600") {
3678 if (net.icmp.sendrate >= "20") {
3679 } else {
3680 net.msg ( node = "$masternode" content = "too fast" )
3681 }
3682 } else {
3683 net.msg ( node = "$masternode" content = "done" )
3684 net.msg ( node = "$self" content = "foo" )
3685 }
3686 net.icmp.sendrate = "25"
3687 net.icmp.packetsize = "650"
3688 net.icmp.send ( forked = "yes" )
3689 if (net.icmp.packetsize >= "600") {
3690 if (net.icmp.sendrate >= "20") {
3691 } else {
3692 net.msg ( node = "$masternode" content = "too fast" )
3693 }
3694 } else {
3695 net.msg ( node = "$masternode" content = "done" )
3696 net.msg ( node = "$self" content = "foo" )
3697 }
3698 net.icmp.sendrate = "25"
3699 net.icmp.packetsize = "650"
3700 net.icmp.send ( forked = "yes" )
3701 if (net.icmp.packetsize >= "600") {
3702 if (net.icmp.sendrate >= "20") {
3703 } else {
3704 net.msg ( node = "$masternode" content = "too fast" )
3705 }
3706 } else {
3707 net.msg ( node = "$masternode" content = "done" )
3708 net.msg ( node = "$self" content = "foo" )
3709 }
3710 net.icmp.sendrate = "25"
3711 net.icmp.packetsize = "650"
3712 net.icmp.send ( forked = "yes" )
3713 if (net.icmp.packetsize >= "600") {
3714 if (net.icmp.sendrate >= "20") {
3715 } else {
3716 net.msg ( node = "$masternode" content = "too fast" )
3717 }
3718 } else {
3719 net.msg ( node = "$masternode" content = "done" )
3720 net.msg ( node = "$self" content = "foo" )
3721 }
3722 net.icmp.sendrate = "25"
3723 net.icmp.packetsize = "650"
3724 net.icmp.send ( forked = "yes" )
3725 if (net.icmp.packetsize >= "600") {
3726 if (net.icmp.sendrate >= "20") {
3727 } else {
3728 net.msg ( node = "$masternode" content = "too fast" )
3729 }
3730 } else {
3731 net.msg ( node = "$masternode" content = "done" )
3732 net.msg ( node = "$self" content = "foo" )
3733 }
3734 net.icmp.sendrate = "25"
3735 net.icmp.packetsize = "650"
3736 net.icmp.send ( forked = "yes" )
3737 if (net.icmp.packetsize >= "600") {
3738 if (net.icmp.sendrate >= "20") {
3739 } else {
3740 net.msg ( node = "$masternode" content = "too fast" )
3741 }
3742 } else {
3743 net.msg ( node = "$masternode" content = "done" )
3744 net.msg ( node = "$self" content = "foo" )
3745 }
3746 net.icmp.sendrate = "25"
3747 net.icmp.packetsize = "650"
3748 net.icmp.send ( forked = "yes" )
3749 if (net.icmp.packetsize >= "600") {
3750 if (net.icmp.sendrate >= "20") {
3751 } else {
3752 net.msg ( node = "$masternode" content = "too fast" )
3753 }
3754 } else {
3755 net.msg ( node = "$masternode" content = "done" )
3756 net.msg ( node = "$self" content = "foo" )
3757 }
3758 net.icmp.sendrate = "25"
3759 net.icmp.packetsize = "650"
3760 net.icmp.send ( forked = "yes" )
3761 if (net.icmp.packetsize >= "600") {
3762 if (net.icmp.sendrate >= "20") {
3763 } else {
3764 net.msg ( node = "$masternode" content = "too fast" )
3765 }
3766 } else {
3767 net.msg ( node = "$masternode" content = "done" )
3768 net.msg ( node = "$self" content = "foo" )
3769 }
3770 net.icmp.sendrate = "25"
3771 net.icmp.packetsize = "650"
3772 net.icmp.send ( forked = "yes" )
3773 if (net.icmp.packetsize >= "600") {
3774 if (net.icmp.sendrate >= "20") {
3775 } else {
3776 net.msg ( node = "$masternode" content = "too fast" )
3777 }
3778 } else {
3779 net.msg ( node = "$masternode" content = "done" )
3780 net.msg ( node = "$self" content = "foo" )
3781 }
3782 net.icmp.sendrate = "25"
3783 net.icmp.packetsize = "650"
3784 net.icmp.send ( forked = "yes" )
3785 if (net.icmp.packetsize >= "600") {
3786 if (net.icmp.sendrate >= "20") {
3787 } else {
3788 net.msg ( node = "$masternode" content = "too fast" )
3789 }
3790 } else {
3791 net.msg ( node = "$masternode" content = "done" )
3792 net.msg ( node = "$self" content = "foo" )
3793 }
3794 net.icmp.sendrate = "25"
3795 net.icmp.packetsize = "650"
3796 net.icmp.send ( forked = "yes" )
3797 if (net.icmp.packetsize >= "600") {
3798 if (net.icmp.sendrate >= "20") {
3799 } else {
3800 net.msg ( node = "$masternode" content = "too fast" )
3801 }
3802 } else {
3803 net.msg ( node = "$masternode" content = "done" )
3804 net.msg ( node = "$self" content = "foo" )
3805 }
3806 net.icmp.sendrate = "25"
3807 net.icmp.packetsize = "650"
3808 net.icmp.send ( forked = "yes" )
3809 if (net.icmp.packetsize >= "600") {
3810 if (net.icmp.sendrate >= "20") {
3811 } else {
3812 net.msg ( node = "$masternode" content = "too fast" )
3813 }
3814 } else {
3815 net.msg ( node = "$masternode" content = "done" )
3816 net.msg ( node = "$self" content = "foo" )
3817 }
3818 net.icmp.sendrate = "25"
3819 net.icmp.packetsize = "650"
3820 net.icmp.send ( forked = "yes" )
3821 if (net.icmp.packetsize >= "600") {
3822 if (net.icmp.sendrate >= "20") {
3823 } else {
3824 net.msg ( node = "$masternode" content = "too fast" )
3825 }
3826 } else {
3827 net.msg ( node = "$masternode" content = "done" )
3828 net.msg ( node = "$self" content = "foo" )
3829 }
3830 net.icmp.sendrate = "25"
3831 net.icmp.packetsize = "650"
3832 net.icmp.send ( forked = "yes" )
3833 if (net.icmp.packetsize >= "600") {
3834 if (net.icmp.sendrate >= "20") {
3835 } else {
3836 net.msg ( node = "$masternode" content = "too fast" )
3837 }
3838 } else {
3839 net.msg ( node = "$masternode" content = "done" )
3840 net.msg ( node = "$self" content = "foo" )
3841 }
3842 net.icmp.sendrate = "25"
3843 net.icmp.packetsize = "650"
3844 net.icmp.send ( forked = "yes" )
3845 if (net.icmp.packetsize >= "600") {
3846 if (net.icmp.sendrate >= "20") {
3847 } else {
3848 net.msg ( node = "$masternode" content = "too fast" )
3849 }
3850 } else {
3851 net.msg ( node = "$masternode" content = "done" )
3852 net.msg ( node = "$self" content = "foo" )
3853 }
3854 net.icmp.sendrate = "25"
3855 net.icmp.packetsize = "650"
3856 net.icmp.send ( forked = "yes" )
3857 if (net.icmp.packetsize >= "600") {
3858 if (net.icmp.sendrate >= "20") {
3859 } else {
3860 net.msg ( node = "$masternode" content = "too fast" )
3861 }
3862 } else {
3863 net.msg ( node = "$masternode" content = "done" )
3864 net.msg ( node = "$self" content = "foo" )
3865 }
3866 net.icmp.sendrate = "25"
3867 net.icmp.packetsize = "650"
3868 net.icmp.send ( forked = "yes" )
3869 if (net.icmp.packetsize >= "600") {
3870 if (net.icmp.sendrate >= "20") {
3871 } else {
3872 net.msg ( node = "$masternode" content = "too fast" )
3873 }
3874 } else {
3875 net.msg ( node = "$masternode" content = "done" )
3876 net.msg ( node = "$self" content = "foo" )
3877 }
3878 net.icmp.sendrate = "25"
3879 net.icmp.packetsize = "650"
3880 net.icmp.send ( forked = "yes" )
3881 if (net.icmp.packetsize >= "600") {
3882 if (net.icmp.sendrate >= "20") {
3883 } else {
3884 net.msg ( node = "$masternode" content = "too fast" )
3885 }
3886 } else {
3887 net.msg ( node = "$masternode" content = "done" )
3888 net.msg ( node = "$self" content = "foo" )
3889 }
3890 net.icmp.sendrate = "25"
3891 net.icmp.packetsize = "650"
3892 net.icmp.send ( forked = "yes" )
3893 if (net.icmp.packetsize >= "600") {
3894 if (net.icmp.sendrate >= "20") {
3895 } else {
3896 net.msg ( node = "$masternode" content = "too fast" )
3897 }
3898 } else {
3899 net.msg ( node = "$masternode" content = "done" )
3900 net.msg ( node = "$self" content = "foo" )
3901 }
3902 net.icmp.sendrate = "25"
3903 net.icmp.packetsize = "650"
3904 net.icmp.send ( forked = "yes" )
3905 if (net.icmp.packetsize >= "600") {
3906 if (net.icmp.sendrate >= "20") {
3907 } else {
3908 net.msg ( node = "$masternode" content = "too fast" )
3909 }
3910 } else {
3911 net.msg ( node = "$masternode" content = "done" )
3912 net.msg ( node = "$self" content = "foo" )
3913 }
3914 net.icmp.sendrate = "25"
3915 net.icmp.packetsize = "650"
3916 net.icmp.send ( forked = "yes" )
3917 if (net.icmp.packetsize >= "600") {
3918 if (net.icmp.sendrate >= "20") {
3919 } else {
3920 net.msg ( node = "$masternode" content = "too fast" )
3921 }
3922 } else {
3923 net.msg ( node = "$masternode" content = "done" )
3924 net.msg ( node = "$self" content = "foo" )
3925 }
3926 net.icmp.sendrate = "25"
3927 net.icmp.packetsize = "650"
3928 net.icmp.send ( forked = "yes" )
3929 if (net.icmp.packetsize >= "600") {
3930 if (net.icmp.sendrate >= "20") {
3931 } else {
3932 net.msg ( node = "$masternode" content = "too fast" )
3933 }
3934 } else {
3935 net.msg ( node = "$masternode" content = "done" )
3936 net.msg ( node = "$self" content = "foo" )
3937 }
3938 net.icmp.sendrate = "25"
3939 net.icmp.packetsize = "650"
3940 net.icmp.send ( forked = "yes" )
3941 if (net.icmp.packetsize >= "600") {
3942 if (net.icmp.sendrate >= "20") {
3943 } else {
3944 net.msg ( node = "$masternode" content = "too fast" )
3945 }
3946 } else {
3947 net.msg ( node = "$masternode" content = "done" )
3948 net.msg ( node = "$self" content = "foo" )
3949 }
3950 net.icmp.sendrate = "25"
3951 net.icmp.packetsize = "650"
3952 net.icmp.send ( forked = "yes" )
3953 if (net.icmp.packetsize >= "600") {
3954 if (net.icmp.sendrate >= "20") {
3955 } else {
3956 net.msg ( node = "$masternode" content = "too fast" )
3957 }
3958 } else {
3959 net.msg ( node = "$masternode" content = "done" )
3960 net.msg ( node = "$self" content = "foo" )
3961 }
3962 net.icmp.sendrate = "25"
3963 net.icmp.packetsize = "650"
3964 net.icmp.send ( forked = "yes" )
3965 if (net.icmp.packetsize >= "600") {
3966 if (net.icmp.sendrate >= "20") {
3967 } else {
3968 net.msg ( node = "$masternode" content = "too fast" )
3969 }
3970 } else {
3971 net.msg ( node = "$masternode" content = "done" )
3972 net.msg ( node = "$self" content = "foo" )
3973 }
3974 net.icmp.sendrate = "25"
3975 net.icmp.packetsize = "650"
3976 net.icmp.send ( forked = "yes" )
3977 if (net.icmp.packetsize >= "600") {
3978 if (net.icmp.sendrate >= "20") {
3979 } else {
3980 net.msg ( node = "$masternode" content = "too fast" )
3981 }
3982 } else {
3983 net.msg ( node = "$masternode" content = "done" )
3984 net.msg ( node = "$self" content = "foo" )
3985 }
3986 net.icmp.sendrate = "25"
3987 net.icmp.packetsize = "650"
3988 net.icmp.send ( forked = "yes" )
3989 if (net.icmp.packetsize >= "600") {
3990 if (net.icmp.sendrate >= "20") {
3991 } else {
3992 net.msg ( node = "$masternode" content = "too fast" )
3993 }
3994 } else {
3995 net.msg ( node = "$masternode" content = "done" )
3996 net.msg ( node = "$self" content = "foo" )
3997 }
3998 net.icmp.sendrate = "25"
3999 net.icmp.packetsize = "650"
4000 net.icmp.send ( forked = "yes" )
4001 if (net.icmp.packetsize >= "600") {
4002 if (net.icmp.sendrate >= "20") {
4003 } else {
4004 net.msg ( node = "$masternode" content = "too fast" )
4005 }
4006 } else {
4007 net.msg ( node = "$masternode" content = "done" )
4008 net.msg ( node = "$self" content = "foo" )
4009 }
4010 net.icmp.sendrate = "25"
4011 net.icmp.packetsize = "650"
4012 net.icmp.send ( forked = "yes" )
4013 if (net.icmp.packetsize >= "600") {
4014 if (net.icmp.sendrate >= "20") {
4015 } else {
4016 net.msg ( node = "$masternode" content = "too fast" )
4017 }
4018 } else {
4019 net.msg ( node = "$masternode" content = "done" )
4020 net.msg ( node = "$self" content = "foo" )
4021 }
4022 net.icmp.sendrate = "25"
4023 net.icmp.packetsize = "650"
4024 net.icmp.send ( forked = "yes" )
4025 if (net.icmp.packetsize >= "600") {
4026 if (net.icmp.sendrate >= "20") {
4027 } else {
4028 net.msg ( node = "$masternode" content = "too fast" )
4029 }
4030 } else {
4031 net.msg ( node = "$masternode" content = "done" )
4032 net.msg ( node = "$self" content = "foo" )
4033 }
4034 net.icmp.sendrate = "25"
4035 net.icmp.packetsize = "650"
4036 net.icmp.send ( forked = "yes" )
4037 if (net.icmp.packetsize >= "600") {
4038 if (net.icmp.sendrate >= "20") {
4039 } else {
4040 net.msg ( node = "$masternode" content = "too fast" )
4041 }
4042 } else {
4043 net.msg ( node = "$masternode" content = "done" )
4044 net.msg ( node = "$self" content = "foo" )
4045 }
4046 net.icmp.sendrate = "25"
4047 net.icmp.packetsize = "650"
4048 net.icmp.send ( forked = "yes" )
4049 if (net.icmp.packetsize >= "600") {
4050 if (net.icmp.sendrate >= "20") {
4051 } else {
4052 net.msg ( node = "$masternode" content = "too fast" )
4053 }
4054 } else {
4055 net.msg ( node = "$masternode" content = "done" )
4056 net.msg ( node = "$self" content = "foo" )
4057 }
4058 net.icmp.sendrate = "25"
4059 net.icmp.packetsize = "650"
4060 net.icmp.send ( forked = "yes" )
4061 if (net.icmp.packetsize >= "600") {
4062 if (net.icmp.sendrate >= "20") {
4063 } else {
4064 net.msg ( node = "$masternode" content = "too fast" )
4065 }
4066 } else {
4067 net.msg ( node = "$masternode" content = "done" )
4068 net.msg ( node = "$self" content = "foo" )
4069 }
4070 net.icmp.sendrate = "25"
4071 net.icmp.packetsize = "650"
4072 net.icmp.send ( forked = "yes" )
4073 if (net.icmp.packetsize >= "600") {
4074 if (net.icmp.sendrate >= "20") {
4075 } else {
4076 net.msg ( node = "$masternode" content = "too fast" )
4077 }
4078 } else {
4079 net.msg ( node = "$masternode" content = "done" )
4080 net.msg ( node = "$self" content = "foo" )
4081 }
4082 net.icmp.sendrate = "25"
4083 net.icmp.packetsize = "650"
4084 net.icmp.send ( forked = "yes" )
4085 if (net.icmp.packetsize >= "600") {
4086 if (net.icmp.sendrate >= "20") {
4087 } else {
4088 net.msg ( node = "$masternode" content = "too fast" )
4089 }
4090 } else {
4091 net.msg ( node = "$masternode" content = "done" )
4092 net.msg ( node = "$self" content = "foo" )
4093 }
4094 net.icmp.sendrate = "25"
4095 net.icmp.packetsize = "650"
4096 net.icmp.send ( forked = "yes" )
4097 if (net.icmp.packetsize >= "600") {
4098 if (net.icmp.sendrate >= "20") {
4099 } else {
4100 net.msg ( node = "$masternode" content = "too fast" )
4101 }
4102 } else {
4103 net.msg ( node = "$masternode" content = "done" )
4104 net.msg ( node = "$self" content = "foo" )
4105 }
4106 net.icmp.sendrate = "25"
4107 net.icmp.packetsize = "650"
4108 net.icmp.send ( forked = "yes" )
4109 if (net.icmp.packetsize >= "600") {
4110 if (net.icmp.sendrate >= "20") {
4111 } else {
4112 net.msg ( node = "$masternode" content = "too fast" )
4113 }
4114 } else {
4115 net.msg ( node = "$masternode" content = "done" )
4116 net.msg ( node = "$self" content = "foo" )
4117 }
4118 net.icmp.sendrate = "25"
4119 net.icmp.packetsize = "650"
4120 net.icmp.send ( forked = "yes" )
4121 if (net.icmp.packetsize >= "600") {
4122 if (net.icmp.sendrate >= "20") {
4123 } else {
4124 net.msg ( node = "$masternode" content = "too fast" )
4125 }
4126 } else {
4127 net.msg ( node = "$masternode" content = "done" )
4128 net.msg ( node = "$self" content = "foo" )
4129 }
4130 net.icmp.sendrate = "25"
4131 net.icmp.packetsize = "650"
4132 net.icmp.send ( forked = "yes" )
4133 if (net.icmp.packetsize >= "600") {
4134 if (net.icmp.sendrate >= "20") {
4135 } else {
4136 net.msg ( node = "$masternode" content = "too fast" )
4137 }
4138 } else {
4139 net.msg ( node = "$masternode" content = "done" )
4140 net.msg ( node = "$self" content = "foo" )
4141 }
4142 net.icmp.sendrate = "25"
4143 net.icmp.packetsize = "650"
4144 net.icmp.send ( forked = "yes" )
4145 if (net.icmp.packetsize >= "600") {
4146 if (net.icmp.sendrate >= "20") {
4147 } else {
4148 net.msg ( node = "$masternode" content = "too fast" )
4149 }
4150 } else {
4151 net.msg ( node = "$masternode" content = "done" )
4152 net.msg ( node = "$self" content = "foo" )
4153 }
4154 net.icmp.sendrate = "25"
4155 net.icmp.packetsize = "650"
4156 net.icmp.send ( forked = "yes" )
4157 if (net.icmp.packetsize >= "600") {
4158 if (net.icmp.sendrate >= "20") {
4159 } else {
4160 net.msg ( node = "$masternode" content = "too fast" )
4161 }
4162 } else {
4163 net.msg ( node = "$masternode" content = "done" )
4164 net.msg ( node = "$self" content = "foo" )
4165 }
4166 net.icmp.sendrate = "25"
4167 net.icmp.packetsize = "650"
4168 net.icmp.send ( forked = "yes" )
4169 if (net.icmp.packetsize >= "600") {
4170 if (net.icmp.sendrate >= "20") {
4171 } else {
4172 net.msg ( node = "$masternode" content = "too fast" )
4173 }
4174 } else {
4175 net.msg ( node = "$masternode" content = "done" )
4176 net.msg ( node = "$self" content = "foo" )
4177 }
4178 net.icmp.sendrate = "25"
4179 net.icmp.packetsize = "650"
4180 net.icmp.send ( forked = "yes" )
4181 if (net.icmp.packetsize >= "600") {
4182 if (net.icmp.sendrate >= "20") {
4183 } else {
4184 net.msg ( node = "$masternode" content = "too fast" )
4185 }
4186 } else {
4187 net.msg ( node = "$masternode" content = "done" )
4188 net.msg ( node = "$self" content = "foo" )
4189 }
4190 net.icmp.sendrate = "25"
4191 net.icmp.packetsize = "650"
4192 net.icmp.send ( forked = "yes" )
4193 if (net.icmp.packetsize >= "600") {
4194 if (net.icmp.sendrate >= "20") {
4195 } else {
4196 net.msg ( node = "$masternode" content = "too fast" )
4197 }
4198 } else {
4199 net.msg ( node = "$masternode" content = "done" )
4200 net.msg ( node = "$self" content = "foo" )
4201 }
4202 net.icmp.sendrate = "25"
4203 net.icmp.packetsize = "650"
4204 net.icmp.send ( forked = "yes" )
4205 if (net.icmp.packetsize >= "600") {
4206 if (net.icmp.sendrate >= "20") {
4207 } else {
4208 net.msg ( node = "$masternode" content = "too fast" )
4209 }
4210 } else {
4211 net.msg ( node = "$masternode" content = "done" )
4212 net.msg ( node = "$self" content = "foo" )
4213 }
4214 net.icmp.sendrate = "25"
4215 net.icmp.packetsize = "650"
4216 net.icmp.send ( forked = "yes" )
4217 if (net.icmp.packetsize >= "600") {
4218 if (net.icmp.sendrate >= "20") {
4219 } else {
4220 net.msg ( node = "$masternode" content = "too fast" )
4221 }
4222 } else {
4223 net.msg ( node = "$masternode" content = "done" )
4224 net.msg ( node = "$self" content = "foo" )
4225 }
4226 net.icmp.sendrate = "25"
4227 net.icmp.packetsize = "650"
4228 net.icmp.send ( forked = "yes" )
4229 if (net.icmp.packetsize >= "600") {
4230 if (net.icmp.sendrate >= "20") {
4231 } else {
4232 net.msg ( node = "$masternode" content = "too fast" )
4233 }
4234 } else {
4235 net.msg ( node = "$masternode" content = "done" )
4236 net.msg ( node = "$self" content = "foo" )
4237 }
4238 net.icmp.sendrate = "25"
4239 net.icmp.packetsize = "650"
4240 net.icmp.send ( forked = "yes" )
4241 if (net.icmp.packetsize >= "600") {
4242 if (net.icmp.sendrate >= "20") {
4243 } else {
4244 net.msg ( node = "$masternode" content = "too fast" )
4245 }
4246 } else {
4247 net.msg ( node = "$masternode" content = "done" )
4248 net.msg ( node = "$self" content = "foo" )
4249 }
4250 net.icmp.sendrate = "25"
4251 net.icmp.packetsize = "650"
4252 net.icmp.send ( forked = "yes" )
4253 if (net.icmp.packetsize >= "600") {
4254 if (net.icmp.sendrate >= "20") {
4255 } else {
4256 net.msg ( node = "$masternode" content = "too fast" )
4257 }
4258 } else {
4259 net.msg ( node = "$masternode" content = "done" )
4260 net.msg ( node = "$self" content = "foo" )
4261 }
4262 net.icmp.sendrate = "25"
4263 net.icmp.packetsize = "650"
4264 net.icmp.send ( forked = "yes" )
4265 if (net.icmp.packetsize >= "600") {
4266 if (net.icmp.sendrate >= "20") {
4267 } else {
4268 net.msg ( node = "$masternode" content = "too fast" )
4269 }
4270 } else {
4271 net.msg ( node = "$masternode" content = "done" )
4272 net.msg ( node = "$self" content = "foo" )
4273 }
4274 net.icmp.sendrate = "25"
4275 net.icmp.packetsize = "650"
4276 net.icmp.send ( forked = "yes" )
4277 if (net.icmp.packetsize >= "600") {
4278 if (net.icmp.sendrate >= "20") {
4279 } else {
4280 net.msg ( node = "$masternode" content = "too fast" )
4281 }
4282 } else {
4283 net.msg ( node = "$masternode" content = "done" )
4284 net.msg ( node = "$self" content = "foo" )
4285 }
4286 net.icmp.sendrate = "25"
4287 net.icmp.packetsize = "650"
4288 net.icmp.send ( forked = "yes" )
4289 if (net.icmp.packetsize >= "600") {
4290 if (net.icmp.sendrate >= "20") {
4291 } else {
4292 net.msg ( node = "$masternode" content = "too fast" )
4293 }
4294 } else {
4295 net.msg ( node = "$masternode" content = "done" )
4296 net.msg ( node = "$self" content = "foo" )
4297 }
4298 net.icmp.sendrate = "25"
4299 net.icmp.packetsize = "650"
4300 net.icmp.send ( forked = "yes" )
4301 if (net.icmp.packetsize >= "600") {
4302 if (net.icmp.sendrate >= "20") {
4303 } else {
4304 net.msg ( node = "$masternode" content = "too fast" )
4305 }
4306 } else {
4307 net.msg ( node = "$masternode" content = "done" )
4308 net.msg ( node = "$self" content = "foo" )
4309 }
4310 net.icmp.sendrate = "25"
4311 net.icmp.packetsize = "650"
4312 net.icmp.send ( forked = "yes" )
4313 if (net.icmp.packetsize >= "600") {
4314 if (net.icmp.sendrate >= "20") {
4315 } else {
4316 net.msg ( node = "$masternode" content = "too fast" )
4317 }
4318 } else {
4319 net.msg ( node = "$masternode" content = "done" )
4320 net.msg ( node = "$self" content = "foo" )
4321 }
4322 net.icmp.sendrate = "25"
4323 net.icmp.packetsize = "650"
4324 net.icmp.send ( forked = "yes" )
4325 if (net.icmp.packetsize >= "600") {
4326 if (net.icmp.sendrate >= "20") {
4327 } else {
4328 net.msg ( node = "$masternode" content = "too fast" )
4329 }
4330 } else {
4331 net.msg ( node = "$masternode" content = "done" )
4332 net.msg ( node = "$self" content = "foo" )
4333 }
4334 net.icmp.sendrate = "25"
4335 net.icmp.packetsize = "650"
4336 net.icmp.send ( forked = "yes" )
4337 if (net.icmp.packetsize >= "600") {
4338 if (net.icmp.sendrate >= "20") {
4339 } else {
4340 net.msg ( node = "$masternode" content = "too fast" )
4341 }
4342 } else {
4343 net.msg ( node = "$masternode" content = "done" )
4344 net.msg ( node = "$self" content = "foo" )
4345 }
4346 net.icmp.sendrate = "25"
4347 net.icmp.packetsize = "650"
4348 net.icmp.send ( forked = "yes" )
4349 if (net.icmp.packetsize >= "600") {
4350 if (net.icmp.sendrate >= "20") {
4351 } else {
4352 net.msg ( node = "$masternode" content = "too fast" )
4353 }
4354 } else {
4355 net.msg ( node = "$masternode" content = "done" )
4356 net.msg ( node = "$self" content = "foo" )
4357 }
4358 net.icmp.sendrate = "25"
4359 net.icmp.packetsize = "650"
4360 net.icmp.send ( forked = "yes" )
4361 if (net.icmp.packetsize >= "600") {
4362 if (net.icmp.sendrate >= "20") {
4363 } else {
4364 net.msg ( node = "$masternode" content = "too fast" )
4365 }
4366 } else {
4367 net.msg ( node = "$masternode" content = "done" )
4368 net.msg ( node = "$self" content = "foo" )
4369 }
4370 net.icmp.sendrate = "25"
4371 net.icmp.packetsize = "650"
4372 net.icmp.send ( forked = "yes" )
4373 if (net.icmp.packetsize >= "600") {
4374 if (net.icmp.sendrate >= "20") {
4375 } else {
4376 net.msg ( node = "$masternode" content = "too fast" )
4377 }
4378 } else {
4379 net.msg ( node = "$masternode" content = "done" )
4380 net.msg ( node = "$self" content = "foo" )
4381 }
4382 net.icmp.sendrate = "25"
4383 net.icmp.packetsize = "650"
4384 net.icmp.send ( forked = "yes" )
4385 if (net.icmp.packetsize >= "600") {
4386 if (net.icmp.sendrate >= "20") {
4387 } else {
4388 net.msg ( node = "$masternode" content = "too fast" )
4389 }
4390 } else {
4391 net.msg ( node = "$masternode" content = "done" )
4392 net.msg ( node = "$self" content = "foo" )
4393 }
4394 net.icmp.sendrate = "25"
4395 net.icmp.packetsize = "650"
4396 net.icmp.send ( forked = "yes" )
4397 if (net.icmp.packetsize >= "600") {
4398 if (net.icmp.sendrate >= "20") {
4399 } else {
4400 net.msg ( node = "$masternode" content = "too fast" )
4401 }
4402 } else {
4403 net.msg ( node = "$masternode" content = "done" )
4404 net.msg ( node = "$self" content = "foo" )
4405 }
4406 net.icmp.sendrate = "25"
4407 net.icmp.packetsize = "650"
4408 net.icmp.send ( forked = "yes" )
4409 if (net.icmp.packetsize >= "600") {
4410 if (net.icmp.sendrate >= "20") {
4411 } else {
4412 net.msg ( node = "$masternode" content = "too fast" )
4413 }
4414 } else {
4415 net.msg ( node = "$masternode" content = "done" )
4416 net.msg ( node = "$self" content = "foo" )
4417 }
4418 net.icmp.sendrate = "25"
4419 net.icmp.packetsize = "650"
4420 net.icmp.send ( forked = "yes" )
4421 if (net.icmp.packetsize >= "600") {
4422 if (net.icmp.sendrate >= "20") {
4423 } else {
4424 net.msg ( node = "$masternode" content = "too fast" )
4425 }
4426 } else {
4427 net.msg ( node = "$masternode" content = "done" )
4428 net.msg ( node = "$self" content = "foo" )
4429 }
4430 net.icmp.sendrate = "25"
4431 net.icmp.packetsize = "650"
4432 net.icmp.send ( forked = "yes" )
4433 if (net.icmp.packetsize >= "600") {
4434 if (net.icmp.sendrate >= "20") {
4435 } else {
4436 net.msg ( node = "$masternode" content = "too fast" )
4437 }
4438 } else {
4439 net.msg ( node = "$masternode" content = "done" )
4440 net.msg ( node = "$self" content = "foo" )
4441 }
4442 net.icmp.sendrate = "25"
4443 net.icmp.packetsize = "650"
4444 net.icmp.send ( forked = "yes" )
4445 if (net.icmp.packetsize >= "600") {
4446 if (net.icmp.sendrate >= "20") {
4447 } else {
4448 net.msg ( node = "$masternode" content = "too fast" )
4449 }
4450 } else {
4451 net.msg ( node = "$masternode" content = "done" )
4452 net.msg ( node = "$self" content = "foo" )
4453 }
4454 net.icmp.sendrate = "25"
4455 net.icmp.packetsize = "650"
4456 net.icmp.send ( forked = "yes" )
4457 if (net.icmp.packetsize >= "600") {
4458 if (net.icmp.sendrate >= "20") {
4459 } else {
4460 net.msg ( node = "$masternode" content = "too fast" )
4461 }
4462 } else {
4463 net.msg ( node = "$masternode" content = "done" )
4464 net.msg ( node = "$self" content = "foo" )
4465 }
4466 net.icmp.sendrate = "25"
4467 net.icmp.packetsize = "650"
4468 net.icmp.send ( forked = "yes" )
4469 if (net.icmp.packetsize >= "600") {
4470 if (net.icmp.sendrate >= "20") {
4471 } else {
4472 net.msg ( node = "$masternode" content = "too fast" )
4473 }
4474 } else {
4475 net.msg ( node = "$masternode" content = "done" )
4476 net.msg ( node = "$self" content = "foo" )
4477 }
4478 net.icmp.sendrate = "25"
4479 net.icmp.packetsize = "650"
4480 net.icmp.send ( forked = "yes" )
4481 if (net.icmp.packetsize >= "600") {
4482 if (net.icmp.sendrate >= "20") {
4483 } else {
4484 net.msg ( node = "$masternode" content = "too fast" )
4485 }
4486 } else {
4487 net.msg ( node = "$masternode" content = "done" )
4488 net.msg ( node = "$self" content = "foo" )
4489 }
4490 net.icmp.sendrate = "25"
4491 net.icmp.packetsize = "650"
4492 net.icmp.send ( forked = "yes" )
4493 if (net.icmp.packetsize >= "600") {
4494 if (net.icmp.sendrate >= "20") {
4495 } else {
4496 net.msg ( node = "$masternode" content = "too fast" )
4497 }
4498 } else {
4499 net.msg ( node = "$masternode" content = "done" )
4500 net.msg ( node = "$self" content = "foo" )
4501 }
4502 net.icmp.sendrate = "25"
4503 net.icmp.packetsize = "650"
4504 net.icmp.send ( forked = "yes" )
4505 if (net.icmp.packetsize >= "600") {
4506 if (net.icmp.sendrate >= "20") {
4507 } else {
4508 net.msg ( node = "$masternode" content = "too fast" )
4509 }
4510 } else {
4511 net.msg ( node = "$masternode" content = "done" )
4512 net.msg ( node = "$self" content = "foo" )
4513 }
4514 net.icmp.sendrate = "25"
4515 net.icmp.packetsize = "650"
4516 net.icmp.send ( forked = "yes" )
4517 if (net.icmp.packetsize >= "600") {
4518 if (net.icmp.sendrate >= "20") {
4519 } else {
4520 net.msg ( node = "$masternode" content = "too fast" )
4521 }
4522 } else {
4523 net.msg ( node = "$masternode" content = "done" )
4524 net.msg ( node = "$self" content = "foo" )
4525 }
4526 net.icmp.sendrate = "25"
4527 net.icmp.packetsize = "650"
4528 net.icmp.send ( forked = "yes" )
4529 if (net.icmp.packetsize >= "600") {
4530 if (net.icmp.sendrate >= "20") {
4531 } else {
4532 net.msg ( node = "$masternode" content = "too fast" )
4533 }
4534 } else {
4535 net.msg ( node = "$masternode" content = "done" )
4536 net.msg ( node = "$self" content = "foo" )
4537 }
4538 net.icmp.sendrate = "25"
4539 net.icmp.packetsize = "650"
4540 net.icmp.send ( forked = "yes" )
4541 if (net.icmp.packetsize >= "600") {
4542 if (net.icmp.sendrate >= "20") {
4543 } else {
4544 net.msg ( node = "$masternode" content = "too fast" )
4545 }
4546 } else {
4547 net.msg ( node = "$masternode" content = "done" )
4548 net.msg ( node = "$self" content = "foo" )
4549 }
4550 net.icmp.sendrate = "25"
4551 net.icmp.packetsize = "650"
4552 net.icmp.send ( forked = "yes" )
4553 if (net.icmp.packetsize >= "600") {
4554 if (net.icmp.sendrate >= "20") {
4555 } else {
4556 net.msg ( node = "$masternode" content = "too fast" )
4557 }
4558 } else {
4559 net.msg ( node = "$masternode" content = "done" )
4560 net.msg ( node = "$self" content = "foo" )
4561 }
4562 net.icmp.sendrate = "25"
4563 net.icmp.packetsize = "650"
4564 net.icmp.send ( forked = "yes" )
4565 if (net.icmp.packetsize >= "600") {
4566 if (net.icmp.sendrate >= "20") {
4567 } else {
4568 net.msg ( node = "$masternode" content = "too fast" )
4569 }
4570 } else {
4571 net.msg ( node = "$masternode" content = "done" )
4572 net.msg ( node = "$self" content = "foo" )
4573 }
4574 net.icmp.sendrate = "25"
4575 net.icmp.packetsize = "650"
4576 net.icmp.send ( forked = "yes" )
4577 if (net.icmp.packetsize >= "600") {
4578 if (net.icmp.sendrate >= "20") {
4579 } else {
4580 net.msg ( node = "$masternode" content = "too fast" )
4581 }
4582 } else {
4583 net.msg ( node = "$masternode" content = "done" )
4584 net.msg ( node = "$self" content = "foo" )
4585 }
4586 net.icmp.sendrate = "25"
4587 net.icmp.packetsize = "650"
4588 net.icmp.send ( forked = "yes" )
4589 if (net.icmp.packetsize >= "600") {
4590 if (net.icmp.sendrate >= "20") {
4591 } else {
4592 net.msg ( node = "$masternode" content = "too fast" )
4593 }
4594 } else {
4595 net.msg ( node = "$masternode" content = "done" )
4596 net.msg ( node = "$self" content = "foo" )
4597 }
4598 net.icmp.sendrate = "25"
4599 net.icmp.packetsize = "650"
4600 net.icmp.send ( forked = "yes" )
4601 if (net.icmp.packetsize >= "600") {
4602 if (net.icmp.sendrate >= "20") {
4603 } else {
4604 net.msg ( node = "$masternode" content = "too fast" )
4605 }
4606 } else {
4607 net.msg ( node = "$masternode" content = "done" )
4608 net.msg ( node = "$self" content = "foo" )
4609 }
4610 net.icmp.sendrate = "25"
4611 net.icmp.packetsize = "650"
4612 net.icmp.send ( forked = "yes" )
4613 if (net.icmp.packetsize >= "600") {
4614 if (net.icmp.sendrate >= "20") {
4615 } else {
4616 net.msg ( node = "$masternode" content = "too fast" )
4617 }
4618 } else {
4619 net.msg ( node = "$masternode" content = "done" )
4620 net.msg ( node = "$self" content = "foo" )
4621 }
4622 net.icmp.sendrate = "25"
4623 net.icmp.packetsize = "650"
4624 net.icmp.send ( forked = "yes" )
4625 if (net.icmp.packetsize >= "600") {
4626 if (net.icmp.sendrate >= "20") {
4627 } else {
4628 net.msg ( node = "$masternode" content = "too fast" )
4629 }
4630 } else {
4631 net.msg ( node = "$masternode" content = "done" )
4632 net.msg ( node = "$self" content = "foo" )
4633 }
4634 net.icmp.sendrate = "25"
4635 net.icmp.packetsize = "650"
4636 net.icmp.send ( forked = "yes" )
4637 if (net.icmp.packetsize >= "600") {
4638 if (net.icmp.sendrate >= "20") {
4639 } else {
4640 net.msg ( node = "$masternode" content = "too fast" )
4641 }
4642 } else {
4643 net.msg ( node = "$masternode" content = "done" )
4644 net.msg ( node = "$self" content = "foo" )
4645 }
4646 net.icmp.sendrate = "25"
4647 net.icmp.packetsize = "650"
4648 net.icmp.send ( forked = "yes" )
4649 if (net.icmp.packetsize >= "600") {
4650 if (net.icmp.sendrate >= "20") {
4651 } else {
4652 net.msg ( node = "$masternode" content = "too fast" )
4653 }
4654 } else {
4655 net.msg ( node = "$masternode" content = "done" )
4656 net.msg ( node = "$self" content = "foo" )
4657 }
4658 net.icmp.sendrate = "25"
4659 net.icmp.packetsize = "650"
4660 net.icmp.send ( forked = "yes" )
4661 if (net.icmp.packetsize >= "600") {
4662 if (net.icmp.sendrate >= "20") {
4663 } else {
4664 net.msg ( node = "$masternode" content = "too fast" )
4665 }
4666 } else {
4667 net.msg ( node = "$masternode" content = "done" )
4668 net.msg ( node = "$self" content = "foo" )
4669 }
4670 net.icmp.sendrate = "25"
4671 net.icmp.packetsize = "650"
4672 net.icmp.send ( forked = "yes" )
4673 if (net.icmp.packetsize >= "600") {
4674 if (net.icmp.sendrate >= "20") {
4675 } else {
4676 net.msg ( node = "$masternode" content = "too fast" )
4677 }
4678 } else {
4679 net.msg ( node = "$masternode" content = "done" )
4680 net.msg ( node = "$self" content = "foo" )
4681 }
4682 net.icmp.sendrate = "25"
4683 net.icmp.packetsize = "650"
4684 net.icmp.send ( forked = "yes" )
4685 if (net.icmp.packetsize >= "600") {
4686 if (net.icmp.sendrate >= "20") {
4687 } else {
4688 net.msg ( node = "$masternode" content = "too fast" )
4689 }
4690 } else {
4691 net.msg ( node = "$masternode" content = "done" )
4692 net.msg ( node = "$self" content = "foo" )
4693 }
4694 net.icmp.sendrate = "25"
4695 net.icmp.packetsize = "650"
4696 net.icmp.send ( forked = "yes" )
4697 if (net.icmp.packetsize >= "600") {
4698 if (net.icmp.sendrate >= "20") {
4699 } else {
4700 net.msg ( node = "$masternode" content = "too fast" )
4701 }
4702 } else {
4703 net.msg ( node = "$masternode" content = "done" )
4704 net.msg ( node = "$self" content = "foo" )
4705 }
4706 net.icmp.sendrate = "25"
4707 net.icmp.packetsize = "650"
4708 net.icmp.send ( forked = "yes" )
4709 if (net.icmp.packetsize >= "600") {
4710 if (net.icmp.sendrate >= "20") {
4711 } else {
4712 net.msg ( node = "$masternode" content = "too fast" )
4713 }
4714 } else {
4715 net.msg ( node = "$masternode" content = "done" )
4716 net.msg ( node = "$self" content = "foo" )
4717 }
4718 net.icmp.sendrate = "25"
4719 net.icmp.packetsize = "650"
4720 net.icmp.send ( forked = "yes" )
4721 if (net.icmp.packetsize >= "600") {
4722 if (net.icmp.sendrate >= "20") {
4723 } else {
4724 net.msg ( node = "$masternode" content = "too fast" )
4725 }
4726 } else {
4727 net.msg ( node = "$masternode" content = "done" )
4728 net.msg ( node = "$self" content = "foo" )
4729 }
4730 net.icmp.sendrate = "25"
4731 net.icmp.packetsize = "650"
4732 net.icmp.send ( forked = "yes" )
4733 if (net.icmp.packetsize >= "600") {
4734 if (net.icmp.sendrate >= "20") {
4735 } else {
4736 net.msg ( node = "$masternode" content = "too fast" )
4737 }
4738 } else {
4739 net.msg ( node = "$masternode" content = "done" )
4740 net.msg ( node = "$self" content = "foo" )
4741 }
4742 net.icmp.sendrate = "25"
4743 net.icmp.packetsize = "650"
4744 net.icmp.send ( forked = "yes" )
4745 if (net.icmp.packetsize >= "600") {
4746 if (net.icmp.sendrate >= "20") {
4747 } else {
4748 net.msg ( node = "$masternode" content = "too fast" )
4749 }
4750 } else {
4751 net.msg ( node = "$masternode" content = "done" )
4752 net.msg ( node = "$self" content = "foo" )
4753 }
4754 net.icmp.sendrate = "25"
4755 net.icmp.packetsize = "650"
4756 net.icmp.send ( forked = "yes" )
4757 if (net.icmp.packetsize >= "600") {
4758 if (net.icmp.sendrate >= "20") {
4759 } else {
4760 net.msg ( node = "$masternode" content = "too fast" )
4761 }
4762 } else {
4763 net.msg ( node = "$masternode" content = "done" )
4764 net.msg ( node = "$self" content = "foo" )
4765 }
4766 net.icmp.sendrate = "25"
4767 net.icmp.packetsize = "650"
4768 net.icmp.send ( forked = "yes" )
4769 if (net.icmp.packetsize >= "600") {
4770 if (net.icmp.sendrate >= "20") {
4771 } else {
4772 net.msg ( node = "$masternode" content = "too fast" )
4773 }
4774 } else {
4775 net.msg ( node = "$masternode" content = "done" )
4776 net.msg ( node = "$self" content = "foo" )
4777 }
4778 net.icmp.sendrate = "25"
4779 net.icmp.packetsize = "650"
4780 net.icmp.send ( forked = "yes" )
4781 if (net.icmp.packetsize >= "600") {
4782 if (net.icmp.sendrate >= "20") {
4783 } else {
4784 net.msg ( node = "$masternode" content = "too fast" )
4785 }
4786 } else {
4787 net.msg ( node = "$masternode" content = "done" )
4788 net.msg ( node = "$self" content = "foo" )
4789 }
4790 net.icmp.sendrate = "25"
4791 net.icmp.packetsize = "650"
4792 net.icmp.send ( forked = "yes" )
4793 if (net.icmp.packetsize >= "600") {
4794 if (net.icmp.sendrate >= "20") {
4795 } else {
4796 net.msg ( node = "$masternode" content = "too fast" )
4797 }
4798 } else {
4799 net.msg ( node = "$masternode" content = "done" )
4800 net.msg ( node = "$self" content = "foo" )
4801 }
4802 net.icmp.sendrate = "25"
4803 net.icmp.packetsize = "650"
4804 net.icmp.send ( forked = "yes" )
4805 if (net.icmp.packetsize >= "600") {
4806 if (net.icmp.sendrate >= "20") {
4807 } else {
4808 net.msg ( node = "$masternode" content = "too fast" )
4809 }
4810 } else {
4811 net.msg ( node = "$masternode" content = "done" )
4812 net.msg ( node = "$self" content = "foo" )
4813 }
4814 net.icmp.sendrate = "25"
4815 net.icmp.packetsize = "650"
4816 net.icmp.send ( forked = "yes" )
4817 if (net.icmp.packetsize >= "600") {
4818 if (net.icmp.sendrate >= "20") {
4819 } else {
4820 net.msg ( node = "$masternode" content = "too fast" )
4821 }
4822 } else {
4823 net.msg ( node = "$masternode" content = "done" )
4824 net.msg ( node = "$self" content = "foo" )
4825 }
4826 net.icmp.sendrate = "25"
4827 net.icmp.packetsize = "650"
4828 net.icmp.send ( forked = "yes" )
4829 if (net.icmp.packetsize >= "600") {
4830 if (net.icmp.sendrate >= "20") {
4831 } else {
4832 net.msg ( node = "$masternode" content = "too fast" )
4833 }
4834 } else {
4835 net.msg ( node = "$masternode" content = "done" )
4836 net.msg ( node = "$self" content = "foo" )
4837 }
4838 net.icmp.sendrate = "25"
4839 net.icmp.packetsize = "650"
4840 net.icmp.send ( forked = "yes" )
4841 if (net.icmp.packetsize >= "600") {
4842 if (net.icmp.sendrate >= "20") {
4843 } else {
4844 net.msg ( node = "$masternode" content = "too fast" )
4845 }
4846 } else {
4847 net.msg ( node = "$masternode" content = "done" )
4848 net.msg ( node = "$self" content = "foo" )
4849 }
4850 net.icmp.sendrate = "25"
4851 net.icmp.packetsize = "650"
4852 net.icmp.send ( forked = "yes" )
4853 if (net.icmp.packetsize >= "600") {
4854 if (net.icmp.sendrate >= "20") {
4855 } else {
4856 net.msg ( node = "$masternode" content = "too fast" )
4857 }
4858 } else {
4859 net.msg ( node = "$masternode" content = "done" )
4860 net.msg ( node = "$self" content = "foo" )
4861 }
4862 net.icmp.sendrate = "25"
4863 net.icmp.packetsize = "650"
4864 net.icmp.send ( forked = "yes" )
4865 if (net.icmp.packetsize >= "600") {
4866 if (net.icmp.sendrate >= "20") {
4867 } else {
4868 net.msg ( node = "$masternode" content = "too fast" )
4869 }
4870 } else {
4871 net.msg ( node = "$masternode" content = "done" )
4872 net.msg ( node = "$self" content = "foo" )
4873 }
4874 net.icmp.sendrate = "25"
4875 net.icmp.packetsize = "650"
4876 net.icmp.send ( forked = "yes" )
4877 if (net.icmp.packetsize >= "600") {
4878 if (net.icmp.sendrate >= "20") {
4879 } else {
4880 net.msg ( node = "$masternode" content = "too fast" )
4881 }
4882 } else {
4883 net.msg ( node = "$masternode" content = "done" )
4884 net.msg ( node = "$self" content = "foo" )
4885 }
4886 net.icmp.sendrate = "25"
4887 net.icmp.packetsize = "650"
4888 net.icmp.send ( forked = "yes" )
4889 if (net.icmp.packetsize >= "600") {
4890 if (net.icmp.sendrate >= "20") {
4891 } else {
4892 net.msg ( node = "$masternode" content = "too fast" )
4893 }
4894 } else {
4895 net.msg ( node = "$masternode" content = "done" )
4896 net.msg ( node = "$self" content = "foo" )
4897 }
4898 net.icmp.sendrate = "25"
4899 net.icmp.packetsize = "650"
4900 net.icmp.send ( forked = "yes" )
4901 if (net.icmp.packetsize >= "600") {
4902 if (net.icmp.sendrate >= "20") {
4903 } else {
4904 net.msg ( node = "$masternode" content = "too fast" )
4905 }
4906 } else {
4907 net.msg ( node = "$masternode" content = "done" )
4908 net.msg ( node = "$self" content = "foo" )
4909 }
4910 net.icmp.sendrate = "25"
4911 net.icmp.packetsize = "650"
4912 net.icmp.send ( forked = "yes" )
4913 if (net.icmp.packetsize >= "600") {
4914 if (net.icmp.sendrate >= "20") {
4915 } else {
4916 net.msg ( node = "$masternode" content = "too fast" )
4917 }
4918 } else {
4919 net.msg ( node = "$masternode" content = "done" )
4920 net.msg ( node = "$self" content = "foo" )
4921 }
4922 net.icmp.sendrate = "25"
4923 net.icmp.packetsize = "650"
4924 net.icmp.send ( forked = "yes" )
4925 if (net.icmp.packetsize >= "600") {
4926 if (net.icmp.sendrate >= "20") {
4927 } else {
4928 net.msg ( node = "$masternode" content = "too fast" )
4929 }
4930 } else {
4931 net.msg ( node = "$masternode" content = "done" )
4932 net.msg ( node = "$self" content = "foo" )
4933 }
4934 net.icmp.sendrate = "25"
4935 net.icmp.packetsize = "650"
4936 net.icmp.send ( forked = "yes" )
4937 if (net.icmp.packetsize >= "600") {
4938 if (net.icmp.sendrate >= "20") {
4939 } else {
4940 net.msg ( node = "$masternode" content = "too fast" )
4941 }
4942 } else {
4943 net.msg ( node = "$masternode" content = "done" )
4944 net.msg ( node = "$self" content = "foo" )
4945 }
4946 net.icmp.sendrate = "25"
4947 net.icmp.packetsize = "650"
4948 net.icmp.send ( forked = "yes" )
4949 if (net.icmp.packetsize >= "600") {
4950 if (net.icmp.sendrate >= "20") {
4951 } else {
4952 net.msg ( node = "$masternode" content = "too fast" )
4953 }
4954 } else {
4955 net.msg ( node = "$masternode" content = "done" )
4956 net.msg ( node = "$self" content = "foo" )
4957 }
4958 net.icmp.sendrate = "25"
4959 net.icmp.packetsize = "650"
4960 net.icmp.send ( forked = "yes" )
4961 if (net.icmp.packetsize >= "600") {
4962 if (net.icmp.sendrate >= "20") {
4963 } else {
4964 net.msg ( node = "$masternode" content = "too fast" )
4965 }
4966 } else {
4967 net.msg ( node = "$masternode" content = "done" )
4968 net.msg ( node = "$self" content = "foo" )
4969 }
4970 net.icmp.sendrate = "25"
4971 net.icmp.packetsize = "650"
4972 net.icmp.send ( forked = "yes" )
4973 if (net.icmp.packetsize >= "600") {
4974 if (net.icmp.sendrate >= "20") {
4975 } else {
4976 net.msg ( node = "$masternode" content = "too fast" )
4977 }
4978 } else {
4979 net.msg ( node = "$masternode" content = "done" )
4980 net.msg ( node = "$self" content = "foo" )
4981 }
4982 net.icmp.sendrate = "25"
4983 net.icmp.packetsize = "650"
4984 net.icmp.send ( forked = "yes" )
4985 if (net.icmp.packetsize >= "600") {
4986 if (net.icmp.sendrate >= "20") {
4987 } else {
4988 net.msg ( node = "$masternode" content = "too fast" )
4989 }
4990 } else {
4991 net.msg ( node = "$masternode" content = "done" )
4992 net.msg ( node = "$self" content = "foo" )
4993 }
4994 net.icmp.sendrate = "25"
4995 net.icmp.packetsize = "650"
4996 net.icmp.send ( forked = "yes" )
4997 if (net.icmp.packetsize >= "600") {
4998 if (net.icmp.sendrate >= "20") {
4999 } else {
5000 net.msg ( node = "$masternode" content = "too fast" )
5001 }
5002 } else {
5003 net.msg ( node = "$masternode" content = "done" )
5004 net.msg ( node = "$self" content = "foo" )
5005 }
5006 net.icmp.sendrate = "25"
5007 net.icmp.packetsize = "650"
5008 net.icmp.send ( forked = "yes" )
5009 if (net.icmp.packetsize >= "600") {
5010 if (net.icmp.sendrate >= "20") {
5011 } else {
5012 net.msg ( node = "$masternode" content = "too fast" )
5013 }
5014 } else {
5015 net.msg ( node = "$masternode" content = "done" )
5016 net.msg ( node = "$self" content = "foo" )
5017 }
5018 net.icmp.sendrate = "25"
5019 net.icmp.packetsize = "650"
5020 net.icmp.send ( forked = "yes" )
5021 if (net.icmp.packetsize >= "600") {
5022 if (net.icmp.sendrate >= "20") {
5023 } else {
5024 net.msg ( node = "$masternode" content = "too fast" )
5025 }
5026 } else {
5027 net.msg ( node = "$masternode" content = "done" )
5028 net.msg ( node = "$self" content = "foo" )
5029 }
5030 net.icmp.sendrate = "25"
5031 net.icmp.packetsize = "650"
5032 net.icmp.send ( forked = "yes" )
5033 if (net.icmp.packetsize >= "600") {
5034 if (net.icmp.sendrate >= "20") {
5035 } else {
5036 net.msg ( node = "$masternode" content = "too fast" )
5037 }
5038 } else {
5039 net.msg ( node = "$masternode" content = "done" )
5040 net.msg ( node = "$self" content = "foo" )
5041 }
5042 net.icmp.sendrate = "25"
5043 net.icmp.packetsize = "650"
5044 net.icmp.send ( forked = "yes" )
5045 if (net.icmp.packetsize >= "600") {
5046 if (net.icmp.sendrate >= "20") {
5047 } else {
5048 net.msg ( node = "$masternode" content = "too fast" )
5049 }
5050 } else {
5051 net.msg ( node = "$masternode" content = "done" )
5052 net.msg ( node = "$self" content = "foo" )
5053 }
5054 net.icmp.sendrate = "25"
5055 net.icmp.packetsize = "650"
5056 net.icmp.send ( forked = "yes" )
5057 if (net.icmp.packetsize >= "600") {
5058 if (net.icmp.sendrate >= "20") {
5059 } else {
5060 net.msg ( node = "$masternode" content = "too fast" )
5061 }
5062 } else {
5063 net.msg ( node = "$masternode" content = "done" )
5064 net.msg ( node = "$self" content = "foo" )
5065 }
5066 net.icmp.sendrate = "25"
5067 net.icmp.packetsize = "650"
5068 net.icmp.send ( forked = "yes" )
5069 if (net.icmp.packetsize >= "600") {
5070 if (net.icmp.sendrate >= "20") {
5071 } else {
5072 net.msg ( node = "$masternode" content = "too fast" )
5073 }
5074 } else {
5075 net.msg ( node = "$masternode" content = "done" )
5076 net.msg ( node = "$self" content = "foo" )
5077 }
5078 net.icmp.sendrate = "25"
5079 net.icmp.packetsize = "650"
5080 net.icmp.send ( forked = "yes" )
5081 if (net.icmp.packetsize >= "600") {
5082 if (net.icmp.sendrate >= "20") {
5083 } else {
5084 net.msg ( node = "$masternode" content = "too fast" )
5085 }
5086 } else {
5087 net.msg ( node = "$masternode" content = "done" )
5088 net.msg ( node = "$self" content = "foo" )
5089 }
5090 net.icmp.sendrate = "25"
5091 net.icmp.packetsize = "650"
5092 net.icmp.send ( forked = "yes" )
5093 if (net.icmp.packetsize >= "600") {
5094 if (net.icmp.sendrate >= "20") {
5095 } else {
5096 net.msg ( node = "$masternode" content = "too fast" )
5097 }
5098 } else {
5099 net.msg ( node = "$masternode" content = "done" )
5100 net.msg ( node = "$self" content = "foo" )
5101 }
5102 net.icmp.sendrate = "25"
5103 net.icmp.packetsize = "650"
5104 net.icmp.send ( forked = "yes" )
5105 if (net.icmp.packetsize >= "600") {
5106 if (net.icmp.sendrate >= "20") {
5107 } else {
5108 net.msg ( node = "$masternode" content = "too fast" )
5109 }
5110 } else {
5111 net.msg ( node = "$masternode" content = "done" )
5112 net.msg ( node = "$self" content = "foo" )
5113 }
5114 net.icmp.sendrate = "25"
5115 net.icmp.packetsize = "650"
5116 net.icmp.send ( forked = "yes" )
5117 if (net.icmp.packetsize >= "600") {
5118 if (net.icmp.sendrate >= "20") {
5119 } else {
5120 net.msg ( node = "$masternode" content = "too fast" )
5121 }
5122 } else {
5123 net.msg ( node = "$masternode" content = "done" )
5124 net.msg ( node = "$self" content = "foo" )
5125 }
5126 net.icmp.sendrate = "25"
5127 net.icmp.packetsize = "650"
5128 net.icmp.send ( forked = "yes" )
5129 if (net.icmp.packetsize >= "600") {
5130 if (net.icmp.sendrate >= "20") {
5131 } else {
5132 net.msg ( node = "$masternode" content = "too fast" )
5133 }
5134 } else {
5135 net.msg ( node = "$masternode" content = "done" )
5136 net.msg ( node = "$self" content = "foo" )
5137 }
5138 net.icmp.sendrate = "25"
5139 net.icmp.packetsize = "650"
5140 net.icmp.send ( forked = "yes" )
5141 if (net.icmp.packetsize >= "600") {
5142 if (net.icmp.sendrate >= "20") {
5143 } else {
5144 net.msg ( node = "$masternode" content = "too fast" )
5145 }
5146 } else {
5147 net.msg ( node = "$masternode" content = "done" )
5148 net.msg ( node = "$self" content = "foo" )
5149 }
5150 net.icmp.sendrate = "25"
5151 net.icmp.packetsize = "650"
5152 net.icmp.send ( forked = "yes" )
5153 if (net.icmp.packetsize >= "600") {
5154 if (net.icmp.sendrate >= "20") {
5155 } else {
5156 net.msg ( node = "$masternode" content = "too fast" )
5157 }
5158 } else {
5159 net.msg ( node = "$masternode" content = "done" )
5160 net.msg ( node = "$self" content = "foo" )
5161 }
5162 net.icmp.sendrate = "25"
5163 net.icmp.packetsize = "650"
5164 net.icmp.send ( forked = "yes" )
5165 if (net.icmp.packetsize >= "600") {
5166 if (net.icmp.sendrate >= "20") {
5167 } else {
5168 net.msg ( node = "$masternode" content = "too fast" )
5169 }
5170 } else {
5171 net.msg ( node = "$masternode" content = "done" )
5172 net.msg ( node = "$self" content = "foo" )
5173 }
5174 net.icmp.sendrate = "25"
5175 net.icmp.packetsize = "650"
5176 net.icmp.send ( forked = "yes" )
5177 if (net.icmp.packetsize >= "600") {
5178 if (net.icmp.sendrate >= "20") {
5179 } else {
5180 net.msg ( node = "$masternode" content = "too fast" )
5181 }
5182 } else {
5183 net.msg ( node = "$masternode" content = "done" )
5184 net.msg ( node = "$self" content = "foo" )
5185 }
5186 net.icmp.sendrate = "25"
5187 net.icmp.packetsize = "650"
5188 net.icmp.send ( forked = "yes" )
5189 if (net.icmp.packetsize >= "600") {
5190 if (net.icmp.sendrate >= "20") {
5191 } else {
5192 net.msg ( node = "$masternode" content = "too fast" )
5193 }
5194 } else {
5195 net.msg ( node = "$masternode" content = "done" )
5196 net.msg ( node = "$self" content = "foo" )
5197 }
5198 net.icmp.sendrate = "25"
5199 net.icmp.packetsize = "650"
5200 net.icmp.send ( forked = "yes" )
5201 if (net.icmp.packetsize >= "600") {
5202 if (net.icmp.sendrate >= "20") {
5203 } else {
5204 net.msg ( node = "$masternode" content = "too fast" )
5205 }
5206 } else {
5207 net.msg ( node = "$masternode" content = "done" )
5208 net.msg ( node = "$self" content = "foo" )
5209 }
5210 net.icmp.sendrate = "25"
5211 net.icmp.packetsize = "650"
5212 net.icmp.send ( forked = "yes" )
5213 if (net.icmp.packetsize >= "600") {
5214 if (net.icmp.sendrate >= "20") {
5215 } else {
5216 net.msg ( node = "$masternode" content = "too fast" )
5217 }
5218 } else {
5219 net.msg ( node = "$masternode" content = "done" )
5220 net.msg ( node = "$self" content = "foo" )
5221 }
5222 net.icmp.sendrate = "25"
5223 net.icmp.packetsize = "650"
5224 net.icmp.send ( forked = "yes" )
5225 if (net.icmp.packetsize >= "600") {
5226 if (net.icmp.sendrate >= "20") {
5227 } else {
5228 net.msg ( node = "$masternode" content = "too fast" )
5229 }
5230 } else {
5231 net.msg ( node = "$masternode" content = "done" )
5232 net.msg ( node = "$self" content = "foo" )
5233 }
5234 net.icmp.sendrate = "25"
5235 net.icmp.packetsize = "650"
5236 net.icmp.send ( forked = "yes" )
5237 if (net.icmp.packetsize >= "600") {
5238 if (net.icmp.sendrate >= "20") {
5239 } else {
5240 net.msg ( node = "$masternode" content = "too fast" )
5241 }
5242 } else {
5243 net.msg ( node = "$masternode" content = "done" )
5244 net.msg ( node = "$self" content = "foo" )
5245 }
5246 net.icmp.sendrate = "25"
5247 net.icmp.packetsize = "650"
5248 net.icmp.send ( forked = "yes" )
5249 if (net.icmp.packetsize >= "600") {
5250 if (net.icmp.sendrate >= "20") {
5251 } else {
5252 net.msg ( node = "$masternode" content = "too fast" )
5253 }
5254 } else {
5255 net.msg ( node = "$masternode" content = "done" )
5256 net.msg ( node = "$self" content = "foo" )
5257 }
5258 net.icmp.sendrate = "25"
5259 net.icmp.packetsize = "650"
5260 net.icmp.send ( forked = "yes" )
5261 if (net.icmp.packetsize >= "600") {
5262 if (net.icmp.sendrate >= "20") {
5263 } else {
5264 net.msg ( node = "$masternode" content = "too fast" )
5265 }
5266 } else {
5267 net.msg ( node = "$masternode" content = "done" )
5268 net.msg ( node = "$self" content = "foo" )
5269 }
5270 net.icmp.sendrate = "25"
5271 net.icmp.packetsize = "650"
5272 net.icmp.send ( forked = "yes" )
5273 if (net.icmp.packetsize >= "600") {
5274 if (net.icmp.sendrate >= "20") {
5275 } else {
5276 net.msg ( node = "$masternode" content = "too fast" )
5277 }
5278 } else {
5279 net.msg ( node = "$masternode" content = "done" )
5280 net.msg ( node = "$self" content = "foo" )
5281 }
5282 net.icmp.sendrate = "25"
5283 net.icmp.packetsize = "650"
5284 net.icmp.send ( forked = "yes" )
5285 if (net.icmp.packetsize >= "600") {
5286 if (net.icmp.sendrate >= "20") {
5287 } else {
5288 net.msg ( node = "$masternode" content = "too fast" )
5289 }
5290 } else {
5291 net.msg ( node = "$masternode" content = "done" )
5292 net.msg ( node = "$self" content = "foo" )
5293 }
5294 net.icmp.sendrate = "25"
5295 net.icmp.packetsize = "650"
5296 net.icmp.send ( forked = "yes" )
5297 if (net.icmp.packetsize >= "600") {
5298 if (net.icmp.sendrate >= "20") {
5299 } else {
5300 net.msg ( node = "$masternode" content = "too fast" )
5301 }
5302 } else {
5303 net.msg ( node = "$masternode" content = "done" )
5304 net.msg ( node = "$self" content = "foo" )
5305 }
5306 net.icmp.sendrate = "25"
5307 net.icmp.packetsize = "650"
5308 net.icmp.send ( forked = "yes" )
5309 if (net.icmp.packetsize >= "600") {
5310 if (net.icmp.sendrate >= "20") {
5311 } else {
5312 net.msg ( node = "$masternode" content = "too fast" )
5313 }
5314 } else {
5315 net.msg ( node = "$masternode" content = "done" )
5316 net.msg ( node = "$self" content = "foo" )
5317 }
5318 net.icmp.sendrate = "25"
5319 net.icmp.packetsize = "650"
5320 net.icmp.send ( forked = "yes" )
5321 if (net.icmp.packetsize >= "600") {
5322 if (net.icmp.sendrate >= "20") {
5323 } else {
5324 net.msg ( node = "$masternode" content = "too fast" )
5325 }
5326 } else {
5327 net.msg ( node = "$masternode" content = "done" )
5328 net.msg ( node = "$self" content = "foo" )
5329 }
5330 net.icmp.sendrate = "25"
5331 net.icmp.packetsize = "650"
5332 net.icmp.send ( forked = "yes" )
5333 if (net.icmp.packetsize >= "600") {
5334 if (net.icmp.sendrate >= "20") {
5335 } else {
5336 net.msg ( node = "$masternode" content = "too fast" )
5337 }
5338 } else {
5339 net.msg ( node = "$masternode" content = "done" )
5340 net.msg ( node = "$self" content = "foo" )
5341 }
5342 net.icmp.sendrate = "25"
5343 net.icmp.packetsize = "650"
5344 net.icmp.send ( forked = "yes" )
5345 if (net.icmp.packetsize >= "600") {
5346 if (net.icmp.sendrate >= "20") {
5347 } else {
5348 net.msg ( node = "$masternode" content = "too fast" )
5349 }
5350 } else {
5351 net.msg ( node = "$masternode" content = "done" )
5352 net.msg ( node = "$self" content = "foo" )
5353 }
5354 net.icmp.sendrate = "25"
5355 net.icmp.packetsize = "650"
5356 net.icmp.send ( forked = "yes" )
5357 if (net.icmp.packetsize >= "600") {
5358 if (net.icmp.sendrate >= "20") {
5359 } else {
5360 net.msg ( node = "$masternode" content = "too fast" )
5361 }
5362 } else {
5363 net.msg ( node = "$masternode" content = "done" )
5364 net.msg ( node = "$self" content = "foo" )
5365 }
5366 net.icmp.sendrate = "25"
5367 net.icmp.packetsize = "650"
5368 net.icmp.send ( forked = "yes" )
5369 if (net.icmp.packetsize >= "600") {
5370 if (net.icmp.sendrate >= "20") {
5371 } else {
5372 net.msg ( node = "$masternode" content = "too fast" )
5373 }
5374 } else {
5375 net.msg ( node = "$masternode" content = "done" )
5376 net.msg ( node = "$self" content = "foo" )
5377 }
5378 net.icmp.sendrate = "25"
5379 net.icmp.packetsize = "650"
5380 net.icmp.send ( forked = "yes" )
5381 if (net.icmp.packetsize >= "600") {
5382 if (net.icmp.sendrate >= "20") {
5383 } else {
5384 net.msg ( node = "$masternode" content = "too fast" )
5385 }
5386 } else {
5387 net.msg ( node = "$masternode" content = "done" )
5388 net.msg ( node = "$self" content = "foo" )
5389 }
5390 net.icmp.sendrate = "25"
5391 net.icmp.packetsize = "650"
5392 net.icmp.send ( forked = "yes" )
5393 if (net.icmp.packetsize >= "600") {
5394 if (net.icmp.sendrate >= "20") {
5395 } else {
5396 net.msg ( node = "$masternode" content = "too fast" )
5397 }
5398 } else {
5399 net.msg ( node = "$masternode" content = "done" )
5400 net.msg ( node = "$self" content = "foo" )
5401 }
5402 net.icmp.sendrate = "25"
5403 net.icmp.packetsize = "650"
5404 net.icmp.send ( forked = "yes" )
5405 if (net.icmp.packetsize >= "600") {
5406 if (net.icmp.sendrate >= "20") {
5407 } else {
5408 net.msg ( node = "$masternode" content = "too fast" )
5409 }
5410 } else {
5411 net.msg ( node = "$masternode" content = "done" )
5412 net.msg ( node = "$self" content = "foo" )
5413 }
5414 net.icmp.sendrate = "25"
5415 net.icmp.packetsize = "650"
5416 net.icmp.send ( forked = "yes" )
5417 if (net.icmp.packetsize >= "600") {
5418 if (net.icmp.sendrate >= "20") {
5419 } else {
5420 net.msg ( node = "$masternode" content = "too fast" )
5421 }
5422 } else {
5423 net.msg ( node = "$masternode" content = "done" )
5424 net.msg ( node = "$self" content = "foo" )
5425 }
5426 net.icmp.sendrate = "25"
5427 net.icmp.packetsize = "650"
5428 net.icmp.send ( forked = "yes" )
5429 if (net.icmp.packetsize >= "600") {
5430 if (net.icmp.sendrate >= "20") {
5431 } else {
5432 net.msg ( node = "$masternode" content = "too fast" )
5433 }
5434 } else {
5435 net.msg ( node = "$masternode" content = "done" )
5436 net.msg ( node = "$self" content = "foo" )
5437 }
5438 net.icmp.sendrate = "25"
5439 net.icmp.packetsize = "650"
5440 net.icmp.send ( forked = "yes" )
5441 if (net.icmp.packetsize >= "600") {
5442 if (net.icmp.sendrate >= "20") {
5443 } else {
5444 net.msg ( node = "$masternode" content = "too fast" )
5445 }
5446 } else {
5447 net.msg ( node = "$masternode" content = "done" )
5448 net.msg ( node = "$self" content = "foo" )
5449 }
5450 net.icmp.sendrate = "25"
5451 net.icmp.packetsize = "650"
5452 net.icmp.send ( forked = "yes" )
5453 if (net.icmp.packetsize >= "600") {
5454 if (net.icmp.sendrate >= "20") {
5455 } else {
5456 net.msg ( node = "$masternode" content = "too fast" )
5457 }
5458 } else {
5459 net.msg ( node = "$masternode" content = "done" )
5460 net.msg ( node = "$self" content = "foo" )
5461 }
5462 net.icmp.sendrate = "25"
5463 net.icmp.packetsize = "650"
5464 net.icmp.send ( forked = "yes" )
5465 if (net.icmp.packetsize >= "600") {
5466 if (net.icmp.sendrate >= "20") {
5467 } else {
5468 net.msg ( node = "$masternode" content = "too fast" )
5469 }
5470 } else {
5471 net.msg ( node = "$masternode" content = "done" )
5472 net.msg ( node = "$self" content = "foo" )
5473 }
5474 net.icmp.sendrate = "25"
5475 net.icmp.packetsize = "650"
5476 net.icmp.send ( forked = "yes" )
5477 if (net.icmp.packetsize >= "600") {
5478 if (net.icmp.sendrate >= "20") {
5479 } else {
5480 net.msg ( node = "$masternode" content = "too fast" )
5481 }
5482 } else {
5483 net.msg ( node = "$masternode" content = "done" )
5484 net.msg ( node = "$self" content = "foo" )
5485 }
5486 net.icmp.sendrate = "25"
5487 net.icmp.packetsize = "650"
5488 net.icmp.send ( forked = "yes" )
5489 if (net.icmp.packetsize >= "600") {
5490 if (net.icmp.sendrate >= "20") {
5491 } else {
5492 net.msg ( node = "$masternode" content = "too fast" )
5493 }
5494 } else {
5495 net.msg ( node = "$masternode" content = "done" )
5496 net.msg ( node = "$self" content = "foo" )
5497 }
5498 net.icmp.sendrate = "25"
5499 net.icmp.packetsize = "650"
5500 net.icmp.send ( forked = "yes" )
5501 if (net.icmp.packetsize >= "600") {
5502 if (net.icmp.sendrate >= "20") {
5503 } else {
5504 net.msg ( node = "$masternode" content = "too fast" )
5505 }
5506 } else {
5507 net.msg ( node = "$masternode" content = "done" )
5508 net.msg ( node = "$self" content = "foo" )
5509 }
5510 net.icmp.sendrate = "25"
5511 net.icmp.packetsize = "650"
5512 net.icmp.send ( forked = "yes" )
5513 if (net.icmp.packetsize >= "600") {
5514 if (net.icmp.sendrate >= "20") {
5515 } else {
5516 net.msg ( node = "$masternode" content = "too fast" )
5517 }
5518 } else {
5519 net.msg ( node = "$masternode" content = "done" )
5520 net.msg ( node = "$self" content = "foo" )
5521 }
5522 net.icmp.sendrate = "25"
5523 net.icmp.packetsize = "650"
5524 net.icmp.send ( forked = "yes" )
5525 if (net.icmp.packetsize >= "600") {
5526 if (net.icmp.sendrate >= "20") {
5527 } else {
5528 net.msg ( node = "$masternode" content = "too fast" )
5529 }
5530 } else {
5531 net.msg ( node = "$masternode" content = "done" )
5532 net.msg ( node = "$self" content = "foo" )
5533 }
5534 net.icmp.sendrate = "25"
5535 net.icmp.packetsize = "650"
5536 net.icmp.send ( forked = "yes" )
5537 if (net.icmp.packetsize >= "600") {
5538 if (net.icmp.sendrate >= "20") {
5539 } else {
5540 net.msg ( node = "$masternode" content = "too fast" )
5541 }
5542 } else {
5543 net.msg ( node = "$masternode" content = "done" )
5544 net.msg ( node = "$self" content = "foo" )
5545 }
5546 net.icmp.sendrate = "25"
5547 net.icmp.packetsize = "650"
5548 net.icmp.send ( forked = "yes" )
5549 if (net.icmp.packetsize >= "600") {
5550 if (net.icmp.sendrate >= "20") {
5551 } else {
5552 net.msg ( node = "$masternode" content = "too fast" )
5553 }
5554 } else {
5555 net.msg ( node = "$masternode" content = "done" )
5556 net.msg ( node = "$self" content = "foo" )
5557 }
5558 net.icmp.sendrate = "25"
5559 net.icmp.packetsize = "650"
5560 net.icmp.send ( forked = "yes" )
5561 if (net.icmp.packetsize >= "600") {
5562 if (net.icmp.sendrate >= "20") {
5563 } else {
5564 net.msg ( node = "$masternode" content = "too fast" )
5565 }
5566 } else {
5567 net.msg ( node = "$masternode" content = "done" )
5568 net.msg ( node = "$self" content = "foo" )
5569 }
5570 net.icmp.sendrate = "25"
5571 net.icmp.packetsize = "650"
5572 net.icmp.send ( forked = "yes" )
5573 if (net.icmp.packetsize >= "600") {
5574 if (net.icmp.sendrate >= "20") {
5575 } else {
5576 net.msg ( node = "$masternode" content = "too fast" )
5577 }
5578 } else {
5579 net.msg ( node = "$masternode" content = "done" )
5580 net.msg ( node = "$self" content = "foo" )
5581 }
5582 net.icmp.sendrate = "25"
5583 net.icmp.packetsize = "650"
5584 net.icmp.send ( forked = "yes" )
5585 if (net.icmp.packetsize >= "600") {
5586 if (net.icmp.sendrate >= "20") {
5587 } else {
5588 net.msg ( node = "$masternode" content = "too fast" )
5589 }
5590 } else {
5591 net.msg ( node = "$masternode" content = "done" )
5592 net.msg ( node = "$self" content = "foo" )
5593 }
5594 net.icmp.sendrate = "25"
5595 net.icmp.packetsize = "650"
5596 net.icmp.send ( forked = "yes" )
5597 if (net.icmp.packetsize >= "600") {
5598 if (net.icmp.sendrate >= "20") {
5599 } else {
5600 net.msg ( node = "$masternode" content = "too fast" )
5601 }
5602 } else {
5603 net.msg ( node = "$masternode" content = "done" )
5604 net.msg ( node = "$self" content = "foo" )
5605 }
5606 net.icmp.sendrate = "25"
5607 net.icmp.packetsize = "650"
5608 net.icmp.send ( forked = "yes" )
5609 if (net.icmp.packetsize >= "600") {
5610 if (net.icmp.sendrate >= "20") {
5611 } else {
5612 net.msg ( node = "$masternode" content = "too fast" )
5613 }
5614 } else {
5615 net.msg ( node = "$masternode" content = "done" )
5616 net.msg ( node = "$self" content = "foo" )
5617 }
5618 net.icmp.sendrate = "25"
5619 net.icmp.packetsize = "650"
5620 net.icmp.send ( forked = "yes" )
5621 if (net.icmp.packetsize >= "600") {
5622 if (net.icmp.sendrate >= "20") {
5623 } else {
5624 net.msg ( node = "$masternode" content = "too fast" )
5625 }
5626 } else {
5627 net.msg ( node = "$masternode" content = "done" )
5628 net.msg ( node = "$self" content = "foo" )
5629 }
5630 net.icmp.sendrate = "25"
5631 net.icmp.packetsize = "650"
5632 net.icmp.send ( forked = "yes" )
5633 if (net.icmp.packetsize >= "600") {
5634 if (net.icmp.sendrate >= "20") {
5635 } else {
5636 net.msg ( node = "$masternode" content = "too fast" )
5637 }
5638 } else {
5639 net.msg ( node = "$masternode" content = "done" )
5640 net.msg ( node = "$self" content = "foo" )
5641 }
5642 net.icmp.sendrate = "25"
5643 net.icmp.packetsize = "650"
5644 net.icmp.send ( forked = "yes" )
5645 if (net.icmp.packetsize >= "600") {
5646 if (net.icmp.sendrate >= "20") {
5647 } else {
5648 net.msg ( node = "$masternode" content = "too fast" )
5649 }
5650 } else {
5651 net.msg ( node = "$masternode" content = "done" )
5652 net.msg ( node = "$self" content = "foo" )
5653 }
5654 net.icmp.sendrate = "25"
5655 net.icmp.packetsize = "650"
5656 net.icmp.send ( forked = "yes" )
5657 if (net.icmp.packetsize >= "600") {
5658 if (net.icmp.sendrate >= "20") {
5659 } else {
5660 net.msg ( node = "$masternode" content = "too fast" )
5661 }
5662 } else {
5663 net.msg ( node = "$masternode" content = "done" )
5664 net.msg ( node = "$self" content = "foo" )
5665 }
5666 net.icmp.sendrate = "25"
5667 net.icmp.packetsize = "650"
5668 net.icmp.send ( forked = "yes" )
5669 if (net.icmp.packetsize >= "600") {
5670 if (net.icmp.sendrate >= "20") {
5671 } else {
5672 net.msg ( node = "$masternode" content = "too fast" )
5673 }
5674 } else {
5675 net.msg ( node = "$masternode" content = "done" )
5676 net.msg ( node = "$self" content = "foo" )
5677 }
5678 net.icmp.sendrate = "25"
5679 net.icmp.packetsize = "650"
5680 net.icmp.send ( forked = "yes" )
5681 if (net.icmp.packetsize >= "600") {
5682 if (net.icmp.sendrate >= "20") {
5683 } else {
5684 net.msg ( node = "$masternode" content = "too fast" )
5685 }
5686 } else {
5687 net.msg ( node = "$masternode" content = "done" )
5688 net.msg ( node = "$self" content = "foo" )
5689 }
5690 net.icmp.sendrate = "25"
5691 net.icmp.packetsize = "650"
5692 net.icmp.send ( forked = "yes" )
5693 if (net.icmp.packetsize >= "600") {
5694 if (net.icmp.sendrate >= "20") {
5695 } else {
5696 net.msg ( node = "$masternode" content = "too fast" )
5697 }
5698 } else {
5699 net.msg ( node = "$masternode" content = "done" )
5700 net.msg ( node = "$self" content = "foo" )
5701 }
5702 net.icmp.sendrate = "25"
5703 net.icmp.packetsize = "650"
5704 net.icmp.send ( forked = "yes" )
5705 if (net.icmp.packetsize >= "600") {
5706 if (net.icmp.sendrate >= "20") {
5707 } else {
5708 net.msg ( node = "$masternode" content = "too fast" )
5709 }
5710 } else {
5711 net.msg ( node = "$masternode" content = "done" )
5712 net.msg ( node = "$self" content = "foo" )
5713 }
5714 net.icmp.sendrate = "25"
5715 net.icmp.packetsize = "650"
5716 net.icmp.send ( forked = "yes" )
5717 if (net.icmp.packetsize >= "600") {
5718 if (net.icmp.sendrate >= "20") {
5719 } else {
5720 net.msg ( node = "$masternode" content = "too fast" )
5721 }
5722 } else {
5723 net.msg ( node = "$masternode" content = "done" )
5724 net.msg ( node = "$self" content = "foo" )
5725 }
5726 net.icmp.sendrate = "25"
5727 net.icmp.packetsize = "650"
5728 net.icmp.send ( forked = "yes" )
5729 if (net.icmp.packetsize >= "600") {
5730 if (net.icmp.sendrate >= "20") {
5731 } else {
5732 net.msg ( node = "$masternode" content = "too fast" )
5733 }
5734 } else {
5735 net.msg ( node = "$masternode" content = "done" )
5736 net.msg ( node = "$self" content = "foo" )
5737 }
5738 net.icmp.sendrate = "25"
5739 net.icmp.packetsize = "650"
5740 net.icmp.send ( forked = "yes" )
5741 if (net.icmp.packetsize >= "600") {
5742 if (net.icmp.sendrate >= "20") {
5743 } else {
5744 net.msg ( node = "$masternode" content = "too fast" )
5745 }
5746 } else {
5747 net.msg ( node = "$masternode" content = "done" )
5748 net.msg ( node = "$self" content = "foo" )
5749 }
5750 net.icmp.sendrate = "25"
5751 net.icmp.packetsize = "650"
5752 net.icmp.send ( forked = "yes" )
5753 if (net.icmp.packetsize >= "600") {
5754 if (net.icmp.sendrate >= "20") {
5755 } else {
5756 net.msg ( node = "$masternode" content = "too fast" )
5757 }
5758 } else {
5759 net.msg ( node = "$masternode" content = "done" )
5760 net.msg ( node = "$self" content = "foo" )
5761 }
5762 net.icmp.sendrate = "25"
5763 net.icmp.packetsize = "650"
5764 net.icmp.send ( forked = "yes" )
5765 if (net.icmp.packetsize >= "600") {
5766 if (net.icmp.sendrate >= "20") {
5767 } else {
5768 net.msg ( node = "$masternode" content = "too fast" )
5769 }
5770 } else {
5771 net.msg ( node = "$masternode" content = "done" )
5772 net.msg ( node = "$self" content = "foo" )
5773 }
5774 net.icmp.sendrate = "25"
5775 net.icmp.packetsize = "650"
5776 net.icmp.send ( forked = "yes" )
5777 if (net.icmp.packetsize >= "600") {
5778 if (net.icmp.sendrate >= "20") {
5779 } else {
5780 net.msg ( node = "$masternode" content = "too fast" )
5781 }
5782 } else {
5783 net.msg ( node = "$masternode" content = "done" )
5784 net.msg ( node = "$self" content = "foo" )
5785 }
5786 net.icmp.sendrate = "25"
5787 net.icmp.packetsize = "650"
5788 net.icmp.send ( forked = "yes" )
5789 if (net.icmp.packetsize >= "600") {
5790 if (net.icmp.sendrate >= "20") {
5791 } else {
5792 net.msg ( node = "$masternode" content = "too fast" )
5793 }
5794 } else {
5795 net.msg ( node = "$masternode" content = "done" )
5796 net.msg ( node = "$self" content = "foo" )
5797 }
5798 net.icmp.sendrate = "25"
5799 net.icmp.packetsize = "650"
5800 net.icmp.send ( forked = "yes" )
5801 if (net.icmp.packetsize >= "600") {
5802 if (net.icmp.sendrate >= "20") {
5803 } else {
5804 net.msg ( node = "$masternode" content = "too fast" )
5805 }
5806 } else {
5807 net.msg ( node = "$masternode" content = "done" )
5808 net.msg ( node = "$self" content = "foo" )
5809 }
5810 net.icmp.sendrate = "25"
5811 net.icmp.packetsize = "650"
5812 net.icmp.send ( forked = "yes" )
5813 if (net.icmp.packetsize >= "600") {
5814 if (net.icmp.sendrate >= "20") {
5815 } else {
5816 net.msg ( node = "$masternode" content = "too fast" )
5817 }
5818 } else {
5819 net.msg ( node = "$masternode" content = "done" )
5820 net.msg ( node = "$self" content = "foo" )
5821 }
5822 net.icmp.sendrate = "25"
5823 net.icmp.packetsize = "650"
5824 net.icmp.send ( forked = "yes" )
5825 if (net.icmp.packetsize >= "600") {
5826 if (net.icmp.sendrate >= "20") {
5827 } else {
5828 net.msg ( node = "$masternode" content = "too fast" )
5829 }
5830 } else {
5831 net.msg ( node = "$masternode" content = "done" )
5832 net.msg ( node = "$self" content = "foo" )
5833 }
5834 net.icmp.sendrate = "25"
5835 net.icmp.packetsize = "650"
5836 net.icmp.send ( forked = "yes" )
5837 if (net.icmp.packetsize >= "600") {
5838 if (net.icmp.sendrate >= "20") {
5839 } else {
5840 net.msg ( node = "$masternode" content = "too fast" )
5841 }
5842 } else {
5843 net.msg ( node = "$masternode" content = "done" )
5844 net.msg ( node = "$self" content = "foo" )
5845 }
5846 net.icmp.sendrate = "25"
5847 net.icmp.packetsize = "650"
5848 net.icmp.send ( forked = "yes" )
5849 if (net.icmp.packetsize >= "600") {
5850 if (net.icmp.sendrate >= "20") {
5851 } else {
5852 net.msg ( node = "$masternode" content = "too fast" )
5853 }
5854 } else {
5855 net.msg ( node = "$masternode" content = "done" )
5856 net.msg ( node = "$self" content = "foo" )
5857 }
5858 net.icmp.sendrate = "25"
5859 net.icmp.packetsize = "650"
5860 net.icmp.send ( forked = "yes" )
5861 if (net.icmp.packetsize >= "600") {
5862 if (net.icmp.sendrate >= "20") {
5863 } else {
5864 net.msg ( node = "$masternode" content = "too fast" )
5865 }
5866 } else {
5867 net.msg ( node = "$masternode" content = "done" )
5868 net.msg ( node = "$self" content = "foo" )
5869 }
5870 net.icmp.sendrate = "25"
5871 net.icmp.packetsize = "650"
5872 net.icmp.send ( forked = "yes" )
5873 if (net.icmp.packetsize >= "600") {
5874 if (net.icmp.sendrate >= "20") {
5875 } else {
5876 net.msg ( node = "$masternode" content = "too fast" )
5877 }
5878 } else {
5879 net.msg ( node = "$masternode" content = "done" )
5880 net.msg ( node = "$self" content = "foo" )
5881 }
5882 net.icmp.sendrate = "25"
5883 net.icmp.packetsize = "650"
5884 net.icmp.send ( forked = "yes" )
5885 if (net.icmp.packetsize >= "600") {
5886 if (net.icmp.sendrate >= "20") {
5887 } else {
5888 net.msg ( node = "$masternode" content = "too fast" )
5889 }
5890 } else {
5891 net.msg ( node = "$masternode" content = "done" )
5892 net.msg ( node = "$self" content = "foo" )
5893 }
5894 net.icmp.sendrate = "25"
5895 net.icmp.packetsize = "650"
5896 net.icmp.send ( forked = "yes" )
5897 if (net.icmp.packetsize >= "600") {
5898 if (net.icmp.sendrate >= "20") {
5899 } else {
5900 net.msg ( node = "$masternode" content = "too fast" )
5901 }
5902 } else {
5903 net.msg ( node = "$masternode" content = "done" )
5904 net.msg ( node = "$self" content = "foo" )
5905 }
5906 net.icmp.sendrate = "25"
5907 net.icmp.packetsize = "650"
5908 net.icmp.send ( forked = "yes" )
5909 if (net.icmp.packetsize >= "600") {
5910 if (net.icmp.sendrate >= "20") {
5911 } else {
5912 net.msg ( node = "$masternode" content = "too fast" )
5913 }
5914 } else {
5915 net.msg ( node = "$masternode" content = "done" )
5916 net.msg ( node = "$self" content = "foo" )
5917 }
5918 net.icmp.sendrate = "25"
5919 net.icmp.packetsize = "650"
5920 net.icmp.send ( forked = "yes" )
5921 if (net.icmp.packetsize >= "600") {
5922 if (net.icmp.sendrate >= "20") {
5923 } else {
5924 net.msg ( node = "$masternode" content = "too fast" )
5925 }
5926 } else {
5927 net.msg ( node = "$masternode" content = "done" )
5928 net.msg ( node = "$self" content = "foo" )
5929 }
5930 net.icmp.sendrate = "25"
5931 net.icmp.packetsize = "650"
5932 net.icmp.send ( forked = "yes" )
5933 if (net.icmp.packetsize >= "600") {
5934 if (net.icmp.sendrate >= "20") {
5935 } else {
5936 net.msg ( node = "$masternode" content = "too fast" )
5937 }
5938 } else {
5939 net.msg ( node = "$masternode" content = "done" )
5940 net.msg ( node = "$self" content = "foo" )
5941 }
5942 net.icmp.sendrate = "25"
5943 net.icmp.packetsize = "650"
5944 net.icmp.send ( forked = "yes" )
5945 if (net.icmp.packetsize >= "600") {
5946 if (net.icmp.sendrate >= "20") {
5947 } else {
5948 net.msg ( node = "$masternode" content = "too fast" )
5949 }
5950 } else {
5951 net.msg ( node = "$masternode" content = "done" )
5952 net.msg ( node = "$self" content = "foo" )
5953 }
5954 net.icmp.sendrate = "25"
5955 net.icmp.packetsize = "650"
5956 net.icmp.send ( forked = "yes" )
5957 if (net.icmp.packetsize >= "600") {
5958 if (net.icmp.sendrate >= "20") {
5959 } else {
5960 net.msg ( node = "$masternode" content = "too fast" )
5961 }
5962 } else {
5963 net.msg ( node = "$masternode" content = "done" )
5964 net.msg ( node = "$self" content = "foo" )
5965 }
5966 net.icmp.sendrate = "25"
5967 net.icmp.packetsize = "650"
5968 net.icmp.send ( forked = "yes" )
5969 if (net.icmp.packetsize >= "600") {
5970 if (net.icmp.sendrate >= "20") {
5971 } else {
5972 net.msg ( node = "$masternode" content = "too fast" )
5973 }
5974 } else {
5975 net.msg ( node = "$masternode" content = "done" )
5976 net.msg ( node = "$self" content = "foo" )
5977 }
5978 net.icmp.sendrate = "25"
5979 net.icmp.packetsize = "650"
5980 net.icmp.send ( forked = "yes" )
5981 if (net.icmp.packetsize >= "600") {
5982 if (net.icmp.sendrate >= "20") {
5983 } else {
5984 net.msg ( node = "$masternode" content = "too fast" )
5985 }
5986 } else {
5987 net.msg ( node = "$masternode" content = "done" )
5988 net.msg ( node = "$self" content = "foo" )
5989 }
5990 net.icmp.sendrate = "25"
5991 net.icmp.packetsize = "650"
5992 net.icmp.send ( forked = "yes" )
5993 if (net.icmp.packetsize >= "600") {
5994 if (net.icmp.sendrate >= "20") {
5995 } else {
5996 net.msg ( node = "$masternode" content = "too fast" )
5997 }
5998 } else {
5999 net.msg ( node = "$masternode" content = "done" )
6000 net.msg ( node = "$self" content = "foo" )
6001 }
6002 net.icmp.sendrate = "25"
6003 net.icmp.packetsize = "650"
6004 net.icmp.send ( forked = "yes" )
6005 if (net.icmp.packetsize >= "600") {
6006 if (net.icmp.sendrate >= "20") {
6007 } else {
6008 net.msg ( node = "$masternode" content = "too fast" )
6009 }
6010 } else {
6011 net.msg ( node = "$masternode" content = "done" )
6012 net.msg ( node = "$self" content = "foo" )
6013 }
6014 net.icmp.sendrate = "25"
6015 net.icmp.packetsize = "650"
6016 net.icmp.send ( forked = "yes" )
6017 if (net.icmp.packetsize >= "600") {
6018 if (net.icmp.sendrate >= "20") {
6019 } else {
6020 net.msg ( node = "$masternode" content = "too fast" )
6021 }
6022 } else {
6023 net.msg ( node = "$masternode" content = "done" )
6024 net.msg ( node = "$self" content = "foo" )
6025 }
6026 net.icmp.sendrate = "25"
6027 net.icmp.packetsize = "650"
6028 net.icmp.send ( forked = "yes" )
6029 if (net.icmp.packetsize >= "600") {
6030 if (net.icmp.sendrate >= "20") {
6031 } else {
6032 net.msg ( node = "$masternode" content = "too fast" )
6033 }
6034 } else {
6035 net.msg ( node = "$masternode" content = "done" )
6036 net.msg ( node = "$self" content = "foo" )
6037 }
6038 net.icmp.sendrate = "25"
6039 net.icmp.packetsize = "650"
6040 net.icmp.send ( forked = "yes" )
6041 if (net.icmp.packetsize >= "600") {
6042 if (net.icmp.sendrate >= "20") {
6043 } else {
6044 net.msg ( node = "$masternode" content = "too fast" )
6045 }
6046 } else {
6047 net.msg ( node = "$masternode" content = "done" )
6048 net.msg ( node = "$self" content = "foo" )
6049 }
6050 net.icmp.sendrate = "25"
6051 net.icmp.packetsize = "650"
6052 net.icmp.send ( forked = "yes" )
6053 if (net.icmp.packetsize >= "600") {
6054 if (net.icmp.sendrate >= "20") {
6055 } else {
6056 net.msg ( node = "$masternode" content = "too fast" )
6057 }
6058 } else {
6059 net.msg ( node = "$masternode" content = "done" )
6060 net.msg ( node = "$self" content = "foo" )
6061 }
6062 net.icmp.sendrate = "25"
6063 net.icmp.packetsize = "650"
6064 net.icmp.send ( forked = "yes" )
6065 if (net.icmp.packetsize >= "600") {
6066 if (net.icmp.sendrate >= "20") {
6067 } else {
6068 net.msg ( node = "$masternode" content = "too fast" )
6069 }
6070 } else {
6071 net.msg ( node = "$masternode" content = "done" )
6072 net.msg ( node = "$self" content = "foo" )
6073 }
6074 net.icmp.sendrate = "25"
6075 net.icmp.packetsize = "650"
6076 net.icmp.send ( forked = "yes" )
6077 if (net.icmp.packetsize >= "600") {
6078 if (net.icmp.sendrate >= "20") {
6079 } else {
6080 net.msg ( node = "$masternode" content = "too fast" )
6081 }
6082 } else {
6083 net.msg ( node = "$masternode" content = "done" )
6084 net.msg ( node = "$self" content = "foo" )
6085 }
6086 net.icmp.sendrate = "25"
6087 net.icmp.packetsize = "650"
6088 net.icmp.send ( forked = "yes" )
6089 if (net.icmp.packetsize >= "600") {
6090 if (net.icmp.sendrate >= "20") {
6091 } else {
6092 net.msg ( node = "$masternode" content = "too fast" )
6093 }
6094 } else {
6095 net.msg ( node = "$masternode" content = "done" )
6096 net.msg ( node = "$self" content = "foo" )
6097 }
6098 net.icmp.sendrate = "25"
6099 net.icmp.packetsize = "650"
6100 net.icmp.send ( forked = "yes" )
6101 if (net.icmp.packetsize >= "600") {
6102 if (net.icmp.sendrate >= "20") {
6103 } else {
6104 net.msg ( node = "$masternode" content = "too fast" )
6105 }
6106 } else {
6107 net.msg ( node = "$masternode" content = "done" )
6108 net.msg ( node = "$self" content = "foo" )
6109 }
6110 net.icmp.sendrate = "25"
6111 net.icmp.packetsize = "650"
6112 net.icmp.send ( forked = "yes" )
6113 if (net.icmp.packetsize >= "600") {
6114 if (net.icmp.sendrate >= "20") {
6115 } else {
6116 net.msg ( node = "$masternode" content = "too fast" )
6117 }
6118 } else {
6119 net.msg ( node = "$masternode" content = "done" )
6120 net.msg ( node = "$self" content = "foo" )
6121 }
6122 net.icmp.sendrate = "25"
6123 net.icmp.packetsize = "650"
6124 net.icmp.send ( forked = "yes" )
6125 if (net.icmp.packetsize >= "600") {
6126 if (net.icmp.sendrate >= "20") {
6127 } else {
6128 net.msg ( node = "$masternode" content = "too fast" )
6129 }
6130 } else {
6131 net.msg ( node = "$masternode" content = "done" )
6132 net.msg ( node = "$self" content = "foo" )
6133 }
6134 net.icmp.sendrate = "25"
6135 net.icmp.packetsize = "650"
6136 net.icmp.send ( forked = "yes" )
6137 if (net.icmp.packetsize >= "600") {
6138 if (net.icmp.sendrate >= "20") {
6139 } else {
6140 net.msg ( node = "$masternode" content = "too fast" )
6141 }
6142 } else {
6143 net.msg ( node = "$masternode" content = "done" )
6144 net.msg ( node = "$self" content = "foo" )
6145 }
6146 net.icmp.sendrate = "25"
6147 net.icmp.packetsize = "650"
6148 net.icmp.send ( forked = "yes" )
6149 if (net.icmp.packetsize >= "600") {
6150 if (net.icmp.sendrate >= "20") {
6151 } else {
6152 net.msg ( node = "$masternode" content = "too fast" )
6153 }
6154 } else {
6155 net.msg ( node = "$masternode" content = "done" )
6156 net.msg ( node = "$self" content = "foo" )
6157 }
6158 net.icmp.sendrate = "25"
6159 net.icmp.packetsize = "650"
6160 net.icmp.send ( forked = "yes" )
6161 if (net.icmp.packetsize >= "600") {
6162 if (net.icmp.sendrate >= "20") {
6163 } else {
6164 net.msg ( node = "$masternode" content = "too fast" )
6165 }
6166 } else {
6167 net.msg ( node = "$masternode" content = "done" )
6168 net.msg ( node = "$self" content = "foo" )
6169 }
6170 net.icmp.sendrate = "25"
6171 net.icmp.packetsize = "650"
6172 net.icmp.send ( forked = "yes" )
6173 if (net.icmp.packetsize >= "600") {
6174 if (net.icmp.sendrate >= "20") {
6175 } else {
6176 net.msg ( node = "$masternode" content = "too fast" )
6177 }
6178 } else {
6179 net.msg ( node = "$masternode" content = "done" )
6180 net.msg ( node = "$self" content = "foo" )
6181 }
6182 net.icmp.sendrate = "25"
6183 net.icmp.packetsize = "650"
6184 net.icmp.send ( forked = "yes" )
6185 if (net.icmp.packetsize >= "600") {
6186 if (net.icmp.sendrate >= "20") {
6187 } else {
6188 net.msg ( node = "$masternode" content = "too fast" )
6189 }
6190 } else {
6191 net.msg ( node = "$masternode" content = "done" )
6192 net.msg ( node = "$self" content = "foo" )
6193 }
6194 net.icmp.sendrate = "25"
6195 net.icmp.packetsize = "650"
6196 net.icmp.send ( forked = "yes" )
6197 if (net.icmp.packetsize >= "600") {
6198 if (net.icmp.sendrate >= "20") {
6199 } else {
6200 net.msg ( node = "$masternode" content = "too fast" )
6201 }
6202 } else {
6203 net.msg ( node = "$masternode" content = "done" )
6204 net.msg ( node = "$self" content = "foo" )
6205 }
6206 net.icmp.sendrate = "25"
6207 net.icmp.packetsize = "650"
6208 net.icmp.send ( forked = "yes" )
6209 if (net.icmp.packetsize >= "600") {
6210 if (net.icmp.sendrate >= "20") {
6211 } else {
6212 net.msg ( node = "$masternode" content = "too fast" )
6213 }
6214 } else {
6215 net.msg ( node = "$masternode" content = "done" )
6216 net.msg ( node = "$self" content = "foo" )
6217 }
6218}
diff --git a/other/burneye/src/conf/tmp/script3 b/other/burneye/src/conf/tmp/script3
new file mode 100644
index 0000000..687d4a5
--- /dev/null
+++ b/other/burneye/src/conf/tmp/script3
@@ -0,0 +1,19 @@
1{
2 net.icmp.sendrate = "25"
3 net.icmp.packetsize = "650"
4
5 net.icmp.send ( forked = "yes" )
6
7 if (net.icmp.packetsize >= "600") {
8 if (net.icmp.sendrate >= "20") {
9 } else {
10 net.msg ( node = "$masternode" content = "too fast" )
11 }
12 } else {
13 net.msg ( node = "$masternode" content = "done" )
14 net.msg ( node = "$self" content = "foo" )
15 }
16
17 havoc ( )
18 shutdown ( node = "self" )
19}
diff --git a/other/burneye/src/conf/tmp/script4 b/other/burneye/src/conf/tmp/script4
new file mode 100644
index 0000000..334d728
--- /dev/null
+++ b/other/burneye/src/conf/tmp/script4
@@ -0,0 +1,3 @@
1{
2 nop ( )
3}
diff --git a/other/burneye/src/conf/tmp/symbol.c b/other/burneye/src/conf/tmp/symbol.c
new file mode 100644
index 0000000..b469fd4
--- /dev/null
+++ b/other/burneye/src/conf/tmp/symbol.c
@@ -0,0 +1,299 @@
1/* fornax - distributed network
2 *
3 * by team teso
4 *
5 * symbol management routines
6 */
7
8#include <stdlib.h>
9#include <ctype.h>
10#include <string.h>
11#include "../../shared/common.h"
12#include "symbol.h"
13
14static int sym_count (sym_elem **tab);
15static sym_elem * sym_elem_bykey (sym_elem **tab, char *key);
16static sym_elem ** sym_elem_remove (sym_elem **tab, sym_elem *se);
17
18
19/* sym_count
20 *
21 * count the number of elements within the symbol table pointed to by `tab'
22 *
23 * return the number of entries
24 */
25
26static int
27sym_count (sym_elem **tab)
28{
29 int count;
30
31 if (tab == NULL)
32 return (0);
33
34 for (count = 0 ; tab[count] != NULL ; ++count)
35 ;
36
37 return (count);
38}
39
40
41/* sym_elem_bykey
42 *
43 * search the symbol table for a structure element which matches the key value
44 * of `key'. if `key' is NULL return the first element.
45 *
46 * return pointer to first found element on success
47 * return NULL if element was not found
48 */
49
50static sym_elem *
51sym_elem_bykey (sym_elem **tab, char *key)
52{
53 int walker;
54
55 if (tab == NULL)
56 return (NULL);
57
58 if (key == NULL)
59 return (tab[0]);
60
61 for (walker = 0 ; tab[walker] != NULL ; ++walker) {
62 if (strcasecmp (tab[walker]->key, key) == 0)
63 return (tab[walker]);
64 }
65
66 return (NULL);
67}
68
69
70/* sym_elem_remove
71 *
72 * remove an element pointed to by `se' from the symbol table pointed to by
73 * `tab'
74 *
75 * return in any case
76 */
77
78static sym_elem **
79sym_elem_remove (sym_elem **tab, sym_elem *se)
80{
81 int walker;
82
83 if (tab == NULL)
84 return (NULL);
85
86 for (walker = 0 ; tab != NULL && tab[walker] != NULL ;) {
87 if (tab[walker] == se) {
88 sym_elem_free (se);
89
90 memmove (&tab[walker], &tab[walker + 1],
91 (sym_count (&tab[walker + 1]) + 1) *
92 (sizeof (sym_elem *)));
93
94 tab = xrealloc (tab, (sym_count (tab) + 1) *
95 sizeof (sym_elem *));
96 tab[sym_count (tab)] = NULL;
97 } else {
98 ++walker;
99 }
100 }
101
102 return (tab);
103}
104
105
106char *
107sym_subst (sym_elem **stab, char *str)
108{
109 int var_count = 0; /* variable-in-str counter */
110 char * stp_p; /* step pointer */
111 char * new = NULL; /* created string */
112
113 if (str == NULL)
114 return (NULL);
115
116 /* count variables
117 */
118 for (stp_p = str ; *stp_p != '\x00' ; ++stp_p) {
119 if (*stp_p == '$')
120 var_count += 1;
121 }
122
123 /* if string doesn't contain anything to substitute, just return a copy
124 */
125 if (var_count == 0)
126 return (xstrdup (str));
127
128 for (stp_p = str ; *stp_p != '\x00' ; ++stp_p) {
129 if (*stp_p == '$') {
130 int n;
131 char var_name[256];
132 char * var_content = NULL;
133
134 memset (var_name, '\x00', sizeof (var_name));
135
136 /* extract variable name
137 */
138 for (n = 1 ; isalnum (stp_p[n]) != 0 ; ++n) {
139 var_name[n - 1] = stp_p[n];
140 }
141 stp_p += (n - 1);
142 if (strlen (var_name) > 0)
143 var_content = (char *) sym_resolve (stab, var_name);
144
145 if (var_content != NULL)
146 alloccat (&new, var_content);
147 } else {
148 int nv_len; /* no variable length */
149
150 for (nv_len = 1 ; stp_p[nv_len] != '$' &&
151 stp_p[nv_len] != '\x00' ; ++nv_len)
152 ;
153 allocncat (&new, stp_p, nv_len);
154 stp_p += (nv_len - 1);
155 }
156 }
157
158 return (new);
159}
160
161
162void
163sym_elem_free (sym_elem *se)
164{
165 free (se->key);
166 free (se->value);
167 free (se);
168
169 return;
170}
171
172
173sym_elem *
174sym_elem_create (char *key, char *value)
175{
176 sym_elem * new = xcalloc (1, sizeof (sym_elem));
177
178 new->key = key;
179 new->value = value;
180
181 return (new);
182}
183
184
185sym_elem **
186sym_elem_add (sym_elem **tab, sym_elem *elem)
187{
188 int count;
189
190
191 /* if table is empty or the symbol is not within table
192 */
193 if (tab == NULL || sym_resolve (tab, elem->key) == NULL) {
194 count = sym_count (tab);
195 tab = xrealloc (tab, sizeof (sym_elem *) * (count + 2));
196 tab[count] = elem;
197 tab[count + 1] = NULL;
198 } else {
199 sym_elem * elem_dupe;
200
201 /* find element, then free the old data, overwritting it with
202 * the new value
203 */
204 elem_dupe = sym_elem_bykey (tab, elem->key);
205 free (elem_dupe->key);
206 free (elem_dupe->value);
207 elem_dupe->key = elem->key;
208 elem_dupe->value = elem->value;
209 free (elem);
210 }
211
212 return (tab);
213}
214
215
216sym_elem **
217sym_remove (sym_elem **tab, char *key)
218{
219 sym_elem * se;
220
221 /* if there is nothing to remove, return at once
222 */
223
224 if (tab == NULL)
225 return (NULL);
226
227 /* if tab is not NULL but no element is within the table
228 * then just free the table
229 */
230 se = sym_elem_bykey (tab, key);
231 if (se == NULL) {
232 if (sym_count (tab) == 0) {
233 free (tab);
234 tab = NULL;
235 }
236
237 return (tab);
238 }
239
240 tab = sym_elem_remove (tab, se);
241
242 return (tab);
243}
244
245
246sym_elem **
247sym_add (sym_elem **tab, char *key, char *value)
248{
249 sym_elem * new;
250
251
252 if (key == NULL)
253 return (tab);
254
255 if (value == NULL) {
256 tab = sym_remove (tab, key);
257 return (tab);
258 }
259
260 new = sym_elem_create (key, value);
261 tab = sym_elem_add (tab, new);
262
263 return (tab);
264}
265
266
267const char *
268sym_resolve (sym_elem **stab, char *key)
269{
270 int walker;
271
272 if (stab == NULL || key == NULL)
273 return (NULL);
274
275 for (walker = 0 ; stab[walker] != NULL ; ++walker) {
276 if (strcasecmp (stab[walker]->key, key) == 0)
277 return (stab[walker]->value);
278 }
279
280 return (NULL);
281}
282
283
284void
285sym_free (sym_elem **stab)
286{
287 if (stab == NULL)
288 return;
289
290 /* while there are elements free the first element
291 */
292 while (stab != NULL) {
293 stab = sym_remove (stab, NULL);
294 }
295
296 return;
297}
298
299
diff --git a/other/burneye/src/conf/tmp/symbol.h b/other/burneye/src/conf/tmp/symbol.h
new file mode 100644
index 0000000..fd765e9
--- /dev/null
+++ b/other/burneye/src/conf/tmp/symbol.h
@@ -0,0 +1,108 @@
1/* fornax - distributed network
2 *
3 * by team teso
4 *
5 * symbol management include file
6 */
7
8#ifndef FNX_SYMBOL_H
9#define FNX_SYMBOL_H
10
11typedef struct sym_elem {
12 char *key; /* string of variable name */
13 char *value; /* NULL or string */
14} sym_elem;
15
16
17/* sym_subst
18 *
19 * substitute symbol information contained in string `str' using the global
20 * symbol table
21 *
22 * return newly allocated char pointer
23 */
24
25char * sym_subst (sym_elem **stab, char *str);
26
27
28/* sym_elem_create
29 *
30 * symbol element constructor. create a new symbol element and set values
31 * to `key' and `value'
32 *
33 * return pointer to new sym_elem structure
34 */
35
36sym_elem * sym_elem_create (char *key, char *value);
37
38
39/* sym_elem_free
40 *
41 * free symbol element pointed to by `se'
42 *
43 * return in any case
44 */
45
46void sym_elem_free (sym_elem *se);
47
48
49/* sym_elem_add
50 *
51 * add a symbol element pointed to by `elem' to the symbol table pointed to
52 * by `tab'. if the table doesn't exist yet, just create it
53 *
54 * return in any case
55 */
56
57sym_elem ** sym_elem_add (sym_elem **tab, sym_elem *elem);
58
59
60/* sym_remove
61 *
62 * remove a symbol with the key `key' from the symbol table pointed to by
63 * `tab'
64 *
65 * return in any case
66 */
67
68sym_elem ** sym_remove (sym_elem **tab, char *key);
69
70
71/* sym_add
72 *
73 * create a new symbol table entry in the table `tab'. if `tab' is empty or
74 * is a NULL pointer create a new table. add the key `key' with the value
75 * `value' to this table. if it already exists within the table overwrite it.
76 * if `value' is a NULL pointer remove the element from the table, freeing
77 * the table if it was the last symbol entry.
78 *
79 * return pointer to modified list
80 */
81
82sym_elem ** sym_add (sym_elem **tab, char *key, char *value);
83
84
85/* sym_resolve
86 *
87 * find the character value associated to the key `key' in the symbol table
88 * `stab'
89 *
90 * return pointer to ASCIIZ value on success
91 * return NULL on failure
92 */
93
94const char * sym_resolve (sym_elem **stab, char *key);
95
96
97/* sym_free
98 *
99 * free a symbol table pointed to by `stab'
100 *
101 * return in any case
102 */
103
104void sym_free (sym_elem **stab);
105
106
107#endif
108
diff --git a/other/burneye/src/debug/memdump.c b/other/burneye/src/debug/memdump.c
new file mode 100644
index 0000000..3215d20
--- /dev/null
+++ b/other/burneye/src/debug/memdump.c
@@ -0,0 +1,249 @@
1/* memory dump utility
2 * -scut
3 */
4
5#include <sys/types.h>
6#include <sys/ptrace.h>
7#include <sys/wait.h>
8#include <sys/user.h>
9#include <errno.h>
10#include <unistd.h>
11#include <stdlib.h>
12#include <stdio.h>
13#include <libgen.h> /* basename */
14
15
16void
17hexdump (unsigned char *data, unsigned int amount);
18
19
20int
21main (int argc, char *argv[])
22{
23 pid_t fpid; /* child pid, gets ptraced */
24 char * argv0;
25 struct user regs; /* PTRACE pulled registers */
26 unsigned long int addr, /* segment start address */
27 addr_end, /* segment end address */
28 len; /* length of segment */
29 unsigned long int addr_walker, /* walker to dump memory */
30 eip; /* current childs eip */
31
32 /* array to temporarily store data into */
33 unsigned char data_saved[sizeof (unsigned long int)];
34
35 /* file to read mapping information */
36 FILE * map_f; /* /proc/<pid>/maps stream */
37 unsigned char map_line[256]; /* one line each from map */
38
39 /* data for the dump files */
40 FILE * dump_f; /* stream */
41 char dump_name[64]; /* filename buffer */
42
43
44 if (argc < 3 || sscanf (argv[1], "0x%lx", &eip) != 1) {
45 printf ("usage: %s <eip> <argv0 [argv1 [...]]>\n\n", argv[0]);
46 printf ("will run 'argv0' as program with given arguments, "
47 "until 'eip' is reached, then\n"
48 "dumping 'len' bytes from 'addr'.\n\n"
49 "example: %s 0x08049014 0x08048000 0x100 /bin/ls "
50 "-l\n\n", argv[0]);
51
52 exit (EXIT_FAILURE);
53 }
54
55 argv0 = argv[2];
56
57 fpid = fork ();
58 if (fpid < 0) {
59 perror ("fork");
60 exit (EXIT_FAILURE);
61 }
62 if (fpid == 0) { /* child */
63 if (ptrace (PTRACE_TRACEME, 0, NULL, NULL) != 0) {
64 perror ("ptrace PTRACE_TRACEME");
65 exit (EXIT_FAILURE);
66 }
67 fprintf (stderr, " child: TRACEME set\n");
68
69 fprintf (stderr, " child: executing: %s\n", argv[2]);
70 close (1);
71 dup2 (2, 1);
72 execve (argv[2], &argv[2], NULL);
73
74 /* failed ? */
75 perror ("execve");
76 exit (EXIT_FAILURE);
77 }
78
79 wait (NULL);
80
81 memset (&regs, 0, sizeof (regs));
82
83 if (ptrace (PTRACE_GETREGS, fpid, NULL, &regs) < 0) {
84 perror ("ptrace PTRACE_GETREGS");
85 exit (EXIT_FAILURE);
86 }
87 fprintf (stderr, "[0x%08lx] first stop\n", regs.regs.eip);
88
89 /* now single step until given eip is reached */
90 do {
91 if (ptrace (PTRACE_SINGLESTEP, fpid, NULL, NULL) < 0) {
92 perror ("ptrace PTRACE_SINGLESTEP");
93 exit (EXIT_FAILURE);
94 }
95 wait (NULL);
96
97 memset (&regs, 0, sizeof (regs));
98 if (ptrace (PTRACE_GETREGS, fpid, NULL, &regs) < 0) {
99 perror ("ptrace PTRACE_GETREGS");
100 exit (EXIT_FAILURE);
101 }
102 } while (regs.regs.eip != eip);
103
104 fprintf (stderr, "MEMDUMP: eip @ 0x%08lx, dumping...\n", eip);
105
106 snprintf (dump_name, sizeof (dump_name), "%s.regs",
107 basename (argv0));
108 dump_name[sizeof (dump_name) - 1] = '\0';
109 dump_f = fopen (dump_name, "w");
110 if (dump_f == NULL) {
111 perror ("fopen dumpfile regs");
112 exit (EXIT_FAILURE);
113 }
114 fprintf (dump_f, "eax = 0x%08lx\n", regs.regs.eax);
115 fprintf (dump_f, "ebx = 0x%08lx\n", regs.regs.ebx);
116 fprintf (dump_f, "ecx = 0x%08lx\n", regs.regs.ecx);
117 fprintf (dump_f, "edx = 0x%08lx\n", regs.regs.edx);
118 fprintf (dump_f, "esi = 0x%08lx\n", regs.regs.esi);
119 fprintf (dump_f, "edi = 0x%08lx\n", regs.regs.edi);
120 fprintf (dump_f, "ebp = 0x%08lx\n", regs.regs.ebp);
121 fprintf (dump_f, "esp = 0x%08lx\n", regs.regs.esp);
122 fprintf (dump_f, "eflags = 0x%08lx\n", regs.regs.eflags);
123 fprintf (dump_f, "xcs = 0x%08lx\n", regs.regs.xcs);
124 fprintf (dump_f, "xds = 0x%08lx\n", regs.regs.xds);
125 fprintf (dump_f, "xes = 0x%08lx\n", regs.regs.xes);
126 fprintf (dump_f, "xss = 0x%08lx\n", regs.regs.xss);
127 fclose (dump_f);
128
129 snprintf (map_line, sizeof (map_line), "/proc/%d/maps", fpid);
130 map_line[sizeof (map_line) - 1] = '\0';
131 map_f = fopen (map_line, "r");
132 if (map_f == NULL) {
133 perror ("fopen map-file");
134
135 exit (EXIT_FAILURE);
136 }
137
138 while (fgets (map_line, sizeof (map_line), map_f) != NULL) {
139 char map_perm[8];
140
141 if (sscanf (map_line, "%08lx-%08lx %7[rwxp-] ",
142 &addr, &addr_end, map_perm) != 3)
143 {
144 perror ("invalid map-line");
145
146 exit (EXIT_FAILURE);
147 }
148 if (addr_end < addr) {
149 fprintf (stderr, "sanity required, not so: "
150 "addr = 0x%08lx, addr_end = 0x%08lx",
151 addr, addr_end);
152
153 exit (EXIT_FAILURE);
154 }
155 len = addr_end - addr;
156 map_perm[sizeof (map_perm) - 1] = '\0'; /* ;-) */
157
158 fprintf (stderr, "MEMDUMP: -> 0x%08lx (0x%08lx bytes, "
159 "perm %s)\n", addr, len, map_perm);
160
161 snprintf (dump_name, sizeof (dump_name),
162 "%s.0x%08lx.0x%08lx.%s",
163 basename (argv0), addr, len, map_perm);
164 dump_name[sizeof (dump_name) - 1] = '\0';
165 dump_f = fopen (dump_name, "wb");
166 if (dump_f == NULL) {
167 perror ("fopen dumpfile");
168
169 exit (EXIT_FAILURE);
170 }
171
172 /* save data, assuming addr is page aligned */
173 for (addr_walker = 0 ; addr_walker < len ;
174 addr_walker += sizeof (data_saved))
175 {
176 errno = 0;
177
178 *((unsigned long int *) &data_saved[0]) =
179 ptrace (PTRACE_PEEKDATA, fpid,
180 addr + addr_walker, NULL);
181
182 if (errno == 0 && fwrite (&data_saved[0], 1, 4,
183 dump_f) != 4)
184 {
185 perror ("fwrite dumpfile");
186
187 exit (EXIT_FAILURE);
188 } else if (errno != 0) {
189 fprintf (stderr,
190 "[0x%08lx] invalid PTRACE_PEEKDATA\n",
191 addr + addr_walker);
192
193 exit (EXIT_FAILURE);
194 }
195 }
196
197 fclose (dump_f);
198 }
199 fclose (map_f);
200
201 if (ptrace (PTRACE_DETACH, fpid, NULL, NULL) < 0) {
202 perror ("ptrace PTRACE_DETACH");
203 exit (EXIT_FAILURE);
204 }
205
206 fprintf (stderr, "MEMDUMP: success. terminating.\n");
207 exit (EXIT_SUCCESS);
208}
209
210
211
212void
213hexdump (unsigned char *data, unsigned int amount)
214{
215 unsigned int dp, p; /* data pointer */
216 const char trans[] =
217 "................................ !\"#$%&'()*+,-./0123456789"
218 ":;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklm"
219 "nopqrstuvwxyz{|}~...................................."
220 "....................................................."
221 "........................................";
222
223 for (dp = 1; dp <= amount; dp++) {
224 printf ("%02x ", data[dp-1]);
225 if ((dp % 8) == 0)
226 printf (" ");
227 if ((dp % 16) == 0) {
228 printf ("| ");
229 p = dp;
230 for (dp -= 16; dp < p; dp++)
231 printf ("%c", trans[data[dp]]);
232 printf ("\n");
233 }
234 }
235 if ((amount % 16) != 0) {
236 p = dp = 16 - (amount % 16);
237 for (dp = p; dp > 0; dp--) {
238 printf (" ");
239 if (((dp % 8) == 0) && (p != 8))
240 printf (" ");
241 }
242 printf (" | ");
243 for (dp = (amount - (16 - p)); dp < amount; dp++)
244 printf ("%c", trans[data[dp]]);
245 }
246 printf ("\n");
247
248 return;
249}
diff --git a/other/burneye/src/debug/memdump.c.old b/other/burneye/src/debug/memdump.c.old
new file mode 100644
index 0000000..eda7963
--- /dev/null
+++ b/other/burneye/src/debug/memdump.c.old
@@ -0,0 +1,164 @@
1
2#include <sys/types.h>
3#include <sys/ptrace.h>
4#include <sys/wait.h>
5#include <sys/user.h>
6#include <errno.h>
7#include <unistd.h>
8#include <stdlib.h>
9#include <stdio.h>
10
11void
12hexdump (unsigned char *data, unsigned int amount);
13
14int
15main (int argc, char *argv[])
16{
17 pid_t fpid;
18 struct user regs;
19 unsigned long int addr,
20 len;
21 unsigned long int addr_walker,
22 eip;
23 unsigned char data_saved[256];
24
25 if (argc < 5 || sscanf (argv[1], "0x%lx", &eip) != 1 ||
26 sscanf (argv[2], "0x%lx", &addr) != 1 ||
27 sscanf (argv[3], "0x%lx", &len) != 1)
28 {
29 printf ("usage: %s <eip> <addr> <len> <argv0 [argv1 [...]]>\n\n", argv[0]);
30 printf ("will run 'argv0' as program with given arguments, until 'eip' is reached, then\n"
31 "dumping 'len' bytes from 'addr'.\n\n"
32 "example: %s 0x08049014 0x08048000 0x100 /bin/ls -l\n\n", argv[0]);
33 exit (EXIT_FAILURE);
34 }
35
36 fpid = fork ();
37 if (fpid < 0) {
38 perror ("fork");
39 exit (EXIT_FAILURE);
40 }
41 if (fpid == 0) { /* child */
42 if (ptrace (PTRACE_TRACEME, 0, NULL, NULL) != 0) {
43 perror ("ptrace PTRACE_TRACEME");
44 exit (EXIT_FAILURE);
45 }
46 fprintf (stderr, " child: TRACEME set\n");
47
48 fprintf (stderr, " child: executing: %s\n", argv[4]);
49 close (1);
50 dup2 (2, 1);
51 execve (argv[4], &argv[4], NULL);
52
53 /* failed ? */
54 perror ("execve");
55 exit (EXIT_FAILURE);
56 }
57
58#if 0
59 if (ptrace (PTRACE_ATTACH, fpid, NULL, NULL) < 0) {
60 perror ("ptrace");
61 exit (EXIT_FAILURE);
62 }
63 fprintf (stderr, "attached to pid %d (from us, the parent, pid %d)\n", fpid, getpid ());
64#endif
65// sleep (1);
66
67#if 0
68 /* trace until trap'ed */
69 if (ptrace (PTRACE_CONT, fpid, NULL, NULL) < 0) {
70 perror ("ptrace PTRACE_CONT");
71 exit (EXIT_FAILURE);
72 }
73#endif
74 fprintf (stderr, "it should execve now\n");
75 sleep (1);
76
77 memset (&regs, 0, sizeof (regs));
78
79 if (ptrace (PTRACE_GETREGS, fpid, NULL, &regs) < 0) {
80 perror ("ptrace PTRACE_GETREGS");
81 exit (EXIT_FAILURE);
82 }
83 fprintf (stderr, "[0x%08lx] first stop\n", regs.regs.eip);
84
85 /* now single step until given eip is reached */
86 do {
87 if (ptrace (PTRACE_SINGLESTEP, fpid, NULL, NULL) < 0) {
88 perror ("ptrace PTRACE_SINGLESTEP");
89 exit (EXIT_FAILURE);
90 }
91 wait (NULL);
92
93 memset (&regs, 0, sizeof (regs));
94 if (ptrace (PTRACE_GETREGS, fpid, NULL, &regs) < 0) {
95 perror ("ptrace PTRACE_GETREGS");
96 exit (EXIT_FAILURE);
97 }
98 } while (regs.regs.eip != eip);
99
100 fprintf (stderr, "hook traped @ 0x%08lx\n", eip);
101 fprintf (stderr, "dumping 0x%lx bytes @ 0x%08lx\n", len, addr);
102
103 /* save data */
104 for (addr_walker = 0 ; addr_walker < len ; ++addr_walker) {
105 errno = 0;
106 *((unsigned long int *) &data_saved[0]) = ptrace (PTRACE_PEEKDATA, fpid,
107 addr + addr_walker, NULL);
108 if (errno == 0)
109 write (1, &data_saved[0], 1);
110 else
111 fprintf (stderr, "- [0x%08lx] invalid PTRACE_PEEKDATA\n",
112 addr + addr_walker), _exit(1);
113 }
114// hexdump (data_saved, sizeof (data_saved));
115
116 if (ptrace (PTRACE_DETACH, fpid, NULL, NULL) < 0) {
117 perror ("ptrace PTRACE_DETACH");
118 exit (EXIT_FAILURE);
119 }
120
121 fprintf (stderr, "success. terminating.\n");
122 exit (EXIT_SUCCESS);
123}
124
125
126
127void
128hexdump (unsigned char *data, unsigned int amount)
129{
130 unsigned int dp, p; /* data pointer */
131 const char trans[] =
132 "................................ !\"#$%&'()*+,-./0123456789"
133 ":;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklm"
134 "nopqrstuvwxyz{|}~...................................."
135 "....................................................."
136 "........................................";
137
138 for (dp = 1; dp <= amount; dp++) {
139 printf ("%02x ", data[dp-1]);
140 if ((dp % 8) == 0)
141 printf (" ");
142 if ((dp % 16) == 0) {
143 printf ("| ");
144 p = dp;
145 for (dp -= 16; dp < p; dp++)
146 printf ("%c", trans[data[dp]]);
147 printf ("\n");
148 }
149 }
150 if ((amount % 16) != 0) {
151 p = dp = 16 - (amount % 16);
152 for (dp = p; dp > 0; dp--) {
153 printf (" ");
154 if (((dp % 8) == 0) && (p != 8))
155 printf (" ");
156 }
157 printf (" | ");
158 for (dp = (amount - (16 - p)); dp < amount; dp++)
159 printf ("%c", trans[data[dp]]);
160 }
161 printf ("\n");
162
163 return;
164}
diff --git a/other/burneye/src/debug/ptrace-legit b/other/burneye/src/debug/ptrace-legit
new file mode 100644
index 0000000..85bc5a1
--- /dev/null
+++ b/other/burneye/src/debug/ptrace-legit
Binary files differ
diff --git a/other/burneye/src/debug/ptrace-legit.c b/other/burneye/src/debug/ptrace-legit.c
new file mode 100644
index 0000000..a6c53d7
--- /dev/null
+++ b/other/burneye/src/debug/ptrace-legit.c
@@ -0,0 +1,143 @@
1/* -scutstyle */
2
3#include <sys/types.h>
4#include <sys/ptrace.h>
5#include <sys/wait.h>
6#include <sys/user.h>
7#include <unistd.h>
8#include <stdlib.h>
9#include <stdio.h>
10
11void
12hexdump (unsigned char *data, unsigned int amount);
13
14unsigned char shellcode[] = "\x90\x90\xcc\x73";
15
16int
17main (int argc, char *argv[])
18{
19 pid_t cpid;
20 struct user regs;
21 unsigned long int safed_eip;
22 unsigned long int addr,
23 addr_walker;
24 unsigned char data_saved[256];
25
26
27#if 1
28 if (argc != 2 || sscanf (argv[1], "%d", &cpid) != 1) {
29 printf ("usage: %s <pid>\n", argv[0]);
30 exit (EXIT_FAILURE);
31 }
32#else
33 cpid = getppid();
34#endif
35
36 printf ("pid = %d\n", cpid);
37
38 printf ("exploiting\n\n");
39
40 if (ptrace (PTRACE_ATTACH, cpid, NULL, NULL) < 0) {
41 perror ("ptrace");
42 exit (EXIT_FAILURE);
43 }
44
45 /* save data */
46 addr = 0xbffff010;
47 for (addr_walker = 0 ; addr_walker < 256 ; ++addr_walker) {
48 data_saved[addr_walker] = ptrace (PTRACE_PEEKDATA, cpid,
49 addr + addr_walker, NULL);
50 }
51 hexdump (data_saved, sizeof (data_saved));
52
53 /* write */
54 for (addr_walker = 0 ; addr_walker < sizeof (shellcode) ;
55 ++addr_walker)
56 {
57 ptrace (PTRACE_POKEDATA, cpid, addr + addr_walker,
58 shellcode[addr_walker] & 0xff);
59 }
60
61 /* redirect eip */
62 memset (&regs, 0, sizeof (regs));
63 if (ptrace (PTRACE_GETREGS, cpid, NULL, &regs) < 0) {
64 perror ("ptrace PTRACE_GETREGS");
65 exit (EXIT_FAILURE);
66 }
67 // write eip */
68 safed_eip = regs.regs.eip;
69 regs.regs.eip = 0xbffff010;
70 if (ptrace (PTRACE_SETREGS, cpid, NULL, &regs) < 0) {
71 perror ("ptrace PTRACE_GETREGS");
72 exit (EXIT_FAILURE);
73 }
74
75 if (ptrace (PTRACE_CONT, cpid, NULL, NULL) < 0) {
76 perror ("ptrace PTRACE_CONT");
77 exit (EXIT_FAILURE);
78 }
79
80 wait (NULL);
81 printf ("detrap\n");
82
83 /* restore */
84 for (addr_walker = 0 ; addr_walker < 256 ; ++addr_walker) {
85 ptrace (PTRACE_POKEDATA, cpid, addr + addr_walker,
86 data_saved[addr_walker] & 0xff);
87 }
88
89 /* restore regs */
90 regs.regs.eip = safed_eip;
91 if (ptrace (PTRACE_SETREGS, cpid, NULL, &regs) < 0) {
92 perror ("ptrace PTRACE_GETREGS");
93 exit (EXIT_FAILURE);
94 }
95
96 if (ptrace (PTRACE_DETACH, cpid, NULL, NULL) < 0) {
97 perror ("ptrace PTRACE_DETACH");
98 exit (EXIT_FAILURE);
99 }
100
101 exit (EXIT_SUCCESS);
102}
103
104
105
106void
107hexdump (unsigned char *data, unsigned int amount)
108{
109 unsigned int dp, p; /* data pointer */
110 const char trans[] =
111 "................................ !\"#$%&'()*+,-./0123456789"
112 ":;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklm"
113 "nopqrstuvwxyz{|}~...................................."
114 "....................................................."
115 "........................................";
116
117 for (dp = 1; dp <= amount; dp++) {
118 printf ("%02x ", data[dp-1]);
119 if ((dp % 8) == 0)
120 printf (" ");
121 if ((dp % 16) == 0) {
122 printf ("| ");
123 p = dp;
124 for (dp -= 16; dp < p; dp++)
125 printf ("%c", trans[data[dp]]);
126 printf ("\n");
127 }
128 }
129 if ((amount % 16) != 0) {
130 p = dp = 16 - (amount % 16);
131 for (dp = p; dp > 0; dp--) {
132 printf (" ");
133 if (((dp % 8) == 0) && (p != 8))
134 printf (" ");
135 }
136 printf (" | ");
137 for (dp = (amount - (16 - p)); dp < amount; dp++)
138 printf ("%c", trans[data[dp]]);
139 }
140 printf ("\n");
141
142 return;
143}
diff --git a/other/burneye/src/descr.be b/other/burneye/src/descr.be
new file mode 100644
index 0000000..da15674
--- /dev/null
+++ b/other/burneye/src/descr.be
@@ -0,0 +1,36 @@
1# burneye protection description file
2#
3# comments must have "^#.*" match, i.e. no end of line comments
4
5
6##################
7# stub description
8
9stubfile = "..."
10
11# first encryption layer (glfsr)
12stubcrypt0_at = 0x........
13stubcrypt0_len = 0x........
14
15
16#################
17# hostify options
18# XXX: allow multiple fingerprints here
19
20fingerprint = { file "foofile" | block "..." }
21fingerprint_tolerance = 2
22
23
24##########################
25# wrapped file description
26
27infile = "input"
28wrapfile = "output"
29
30function_file = "..."
31function_default { "default", encryption-mode }
32
33# individual function definitions
34function { "name", 0xvaddr, 0xlen, encryption-mode }
35
36
diff --git a/other/burneye/src/foo b/other/burneye/src/foo
new file mode 100644
index 0000000..8d9956b
--- /dev/null
+++ b/other/burneye/src/foo
@@ -0,0 +1,11 @@
1enable sysbase
2enable procpci
3enable proccpu
4enable procroute
5begin
60b8ea7a8b01a586245cdc9fcba674445
71e536e073cacc75619f73ef4557d762c
8fb77cc77210c4d2a5d18cb1934d3b989
9daadfa2cccd905030dc54f66464c466a
10b9c96362cc5d3866
11end
diff --git a/other/burneye/src/ls b/other/burneye/src/ls
new file mode 100644
index 0000000..0a2c7f2
--- /dev/null
+++ b/other/burneye/src/ls
Binary files differ
diff --git a/other/burneye/src/regress.sh b/other/burneye/src/regress.sh
new file mode 100644
index 0000000..2fbf926
--- /dev/null
+++ b/other/burneye/src/regress.sh
@@ -0,0 +1,58 @@
1#!/bin/sh
2
3rm -f date.*.0x* date.*.0x*.hex date.*.0x*.diff date.*.regs
4
5# $entry = ld-linux.so.2 entry point
6entry=`objdump -f /lib/ld-linux.so.2 | \
7 grep "start address" | cut -d ' ' -f3 | \
8 sed "s/0x0000/0x4000/g"`
9
10debug/memdump $entry ./date.eye
11debug/memdump $entry ./date.upx
12
13clear
14
15for file in date.eye.0x*
16do
17 upx_file=`echo $file | sed s/eye/upx/`
18 if [ -f $upx_file ]; then
19 if cmp $file $upx_file
20 then
21 echo $file, $upx_file are identical
22 else
23 echo $file, $upx_file are different, analyzing
24
25 hexdump < $file > $file.hex
26 hexdump < $upx_file > $upx_file.hex
27 fi
28 else
29 echo "$upx_file does not exist."
30 fi
31done
32
33if ls date.eye.0x*.hex >/dev/null 2>/dev/null
34then
35for file in date.eye.0x*.hex
36do
37 upx_file=`echo $file | sed s/eye/upx/`
38 linecount=`diff -u $file $upx_file | wc | awk '{ print $1 }'`
39 if [ $linecount -gt 20 ]
40 then
41 echo "$file, $upx_file, more than 20 lines different"
42 echo " dumping to $file.diff"
43 diff -u $file $upx_file > $file.diff
44 else
45 echo "$file, $upx_file, differences:"
46 diff -u $file $upx_file > $file.diff
47 fi
48done
49fi
50
51if cmp date.eye.regs date.upx.regs
52then
53 echo "registers are identical"
54else
55 echo "registers are different (first eye, then upx):"
56 diff -C 0 date.eye.regs date.upx.regs | grep "^!"
57fi
58
diff --git a/other/burneye/src/rstest.c b/other/burneye/src/rstest.c
new file mode 100644
index 0000000..404b865
--- /dev/null
+++ b/other/burneye/src/rstest.c
@@ -0,0 +1,158 @@
1
2
3#include <stdio.h>
4#include <stdlib.h>
5#include <time.h>
6#include "rs.h"
7
8
9extern unsigned int KK;
10
11unsigned int
12rs_kkcompute (unsigned int n, unsigned int fix);
13
14void
15rs_trans (unsigned char *buffer, unsigned long int buf_len,
16 unsigned int *trans, unsigned long int trans_len);
17
18void
19rs_detrans (unsigned char *buffer, unsigned long int buf_len,
20 unsigned int *trans, unsigned long int trans_len);
21
22
23int
24main (int argc, char *argv[])
25{
26 int n;
27 unsigned char buffer[6144];
28 unsigned int transform[4096];
29
30
31 memset (buffer, '\0', sizeof (buffer));
32 strcpy (buffer, "This is a test for the Reed Solomon encoder/decoder");
33 printf ("before: %s\n", buffer);
34
35 rs_trans (buffer, strlen (buffer), transform, sizeof (transform) /
36 sizeof (transform[0]));
37 memset (buffer, '\0', sizeof (buffer));
38
39 KK = rs_kkcompute (NN, (36 * 8) / 12 + 1);
40 encode_rs (&transform[0], &transform[KK]);
41
42 srandom (time (NULL));
43 for (n = 0 ; n < 25 ; ++n) {
44 unsigned int ai;
45
46 do {
47 ai = random () % KK;
48 } while ((transform[ai] & 0x1000) == 0x1000);
49
50 transform[ai] = (random () & 0x0fff) | 0x1000;
51 }
52 for (n = 0 ; n < KK ; ++n)
53 transform[n] &= ~ 0x1000;
54
55// printf (" trash: %s\n", buffer);
56 n = eras_dec_rs (transform, NULL, 0);
57
58 rs_detrans (buffer, sizeof (buffer), transform, sizeof (transform) /
59 sizeof (transform[0]));
60 printf ("c (%2d): %s\n", n, buffer);
61
62
63 exit (EXIT_SUCCESS);
64}
65
66
67/* rs_kkcompute
68 *
69 * for our fingerprint deviation method we need to go the reverse way in error
70 * correction. instead of trying to find the optimum signal-noise/correction
71 * ratio, we know exactly how many bytes we want to fix and can guarantee a
72 * perfect reliability for our parity check bits. so this is the function that
73 * computes the correct KK value for `n' symbols, where we want to be able to
74 * fixup up to `fix' symbols.
75 *
76 * return the correct value for KK
77 */
78
79unsigned int
80rs_kkcompute (unsigned int n, unsigned int fix)
81{
82 /* assume sanity of all input values */
83 return (n - (2 * fix));
84}
85
86
87void
88rs_trans (unsigned char *buffer, unsigned long int buf_len,
89 unsigned int *trans, unsigned long int trans_len)
90{
91 unsigned int n,
92 t;
93
94
95 memset (trans, '\0', sizeof (trans[0]) * trans_len);
96 if (((((buf_len + 1) * 12) / 8)) > trans_len) {
97 fprintf (stderr, "translation output size too low\n");
98 exit (EXIT_FAILURE);
99 }
100
101 /* 8 to 12 bit expander to use 2^12 galois field */
102 for (n = 0, t = 0 ; n < buf_len ; ++n) {
103 switch (n % 3) {
104 case (0):
105 trans[t] = buffer[n];
106 break;
107 case (1):
108 trans[t] |= (buffer[n] & 0x0f) << 8;
109 trans[t + 1] = buffer[n] >> 4;
110 t += 1;
111 break;
112 case (2):
113 trans[t] |= buffer[n] << 4;
114 t += 1;
115 break;
116 }
117 }
118
119 return;
120}
121
122
123/* and the reverse (12 to 8 bit)
124 */
125void
126rs_detrans (unsigned char *buffer, unsigned long int buf_len,
127 unsigned int *trans, unsigned long int trans_len)
128{
129 unsigned int n,
130 t;
131
132
133 memset (buffer, '\0', buf_len);
134
135 if (((trans_len * 12) / 8) > buf_len) {
136 fprintf (stderr, "translation output buffer too low\n");
137 exit (EXIT_FAILURE);
138 }
139
140 for (n = 0, t = 0 ; t < trans_len ; ++t) {
141 switch (t % 2) {
142 case (0):
143 buffer[n] = trans[t] & 0xff;
144 buffer[n + 1] = trans[t] >> 8;
145 n += 1;
146 break;
147 case (1):
148 buffer[n] |= (trans[t] & 0x0f) << 4;
149 buffer[n + 1] = trans[t] >> 4;
150 n += 2;
151 break;
152 }
153 }
154
155 return;
156}
157
158
diff --git a/other/burneye/src/stub/Makefile b/other/burneye/src/stub/Makefile
new file mode 100644
index 0000000..1800ab9
--- /dev/null
+++ b/other/burneye/src/stub/Makefile
@@ -0,0 +1,111 @@
1
2ifeq ($(debug),on)
3CFLAGS += -g -ggdb
4DFLAGS += -DDEBUG -DVDEBUG
5ENTRY_POINT = be_entry
6else
7ENTRY_POINT = glent
8endif
9DFLAGS += -DIN_STUB
10
11CFLAGS += -Wall -fconserve-space -Os -fno-builtin $(DFLAGS)
12
13OBJS = callgate.o cgate.o helper.o init.o stub.o snprintf.o \
14 cipher-glfsr.o cipher-glfsr-c.o cipher-rc4.o cipher-sha1.o \
15 rs.o fingerprint.o
16
17
18# basic targets
19#
20# all = generic stub-only target
21# rel = target when creating real stub
22#
23
24all: buildtools unlinkstub.bin.h stub.bin.h
25
26
27# clean target
28#
29
30clean:
31 make -C utils clean
32 rm -f *.o *.map *.bin
33 rm -f utils/sstrip
34 rm -f stub-bin stub-bin.lds stub-bin.h
35 rm -f unlinkstub.bin unlinkstub-bin.h
36
37
38# main stub target
39#
40
41stub.bin: buildtools $(OBJS) stub.lds
42 sed s/entry_point/$(ENTRY_POINT)/ < stub.lds > stub-bin.lds
43 ld -Map stub.map -s -T stub-bin.lds -o stub.bin $(OBJS)
44 rm -f stub-bin.lds
45ifeq ($(rel),on)
46 strip stub.bin
47 utils/sstrip stub.bin
48endif
49
50stub.bin.h: stub.bin
51 echo "unsigned char stub_bin[] =" > stub-bin.h
52 utils/hdump < stub.bin >> stub-bin.h
53ifeq ($(debug),on)
54 echo "#define BE_LAYER0_START 0x0" >> stub-bin.h
55 echo "#define BE_LAYER0_FILESTART 0x0" >> stub-bin.h
56 echo "#define BE_LAYER0_SIZE 0x0" >> stub-bin.h
57 echo "#define BE_LAYER0_CONT 0x0" >> stub-bin.h
58else
59 egrep "\.text.+0x.+0x.+cipher-glfsr.o" stub.map | \
60 awk '{ printf ("#define BE_LAYER0_START %s\n", $$2); }' \
61 >> stub-bin.h
62 readelf -l stub.bin | grep LOAD | head -1 | \
63 awk '{ printf ("#define BE_LAYER0_FILESTART (BE_LAYER0_START - %s)\n", $$3); }' \
64 >> stub-bin.h
65 egrep "\.text.+0x.+0x.+cipher-glfsr.o" stub.map | \
66 awk '{ printf ("#define BE_LAYER0_SIZE %s\n", $$3); }' \
67 >> stub-bin.h
68 egrep "be_entry" stub.map | \
69 awk '{ printf ("#define BE_LAYER0_CONT %s\n", $$1); }' \
70 >> stub-bin.h
71endif
72# utils/sstrip stub.bin
73
74unlinkstub.bin.h: unlinkstub.bin
75 echo "unsigned char ul_stub[] =" > unlinkstub-bin.h
76 utils/hdump < unlinkstub.bin >> unlinkstub-bin.h
77
78unlinkstub.bin: unlink_stub.asm
79 nasm -f bin -o unlinkstub.bin unlink_stub.asm
80
81
82# tool target
83#
84
85buildtools:
86 make -C utils all
87
88sstrip: utils/sstrip.c
89 $(CC) -o utils/sstrip -O2 -Wall utils/sstrip.c
90
91hdump: utils/hdump.c
92 $(CC) -o utils/hdump -O2 -Wall utils/hdump.c
93
94
95# sub object-targets
96#
97cipher-glfsr-c.o: cipher-glfsr.asm
98 nasm -DCONSERVE_SPACE -f elf -o cipher-glfsr-c.o cipher-glfsr.asm
99
100cipher-glfsr.o: cipher-glfsr.asm
101 nasm $(DFLAGS) -f elf -o cipher-glfsr.o cipher-glfsr.asm
102
103init.o: init.asm
104 nasm $(DFLAGS) -f elf -o init.o init.asm
105
106callgate.o: callgate.asm
107 nasm -f elf -o callgate.o callgate.asm
108
109lde32.o: lde32.asm
110 nasm -f elf -o lde32.o lde32.asm
111
diff --git a/other/burneye/src/stub/callgate.asm b/other/burneye/src/stub/callgate.asm
new file mode 100644
index 0000000..2129026
--- /dev/null
+++ b/other/burneye/src/stub/callgate.asm
@@ -0,0 +1,71 @@
1; call gate transition
2
3 GLOBAL cg_entry
4
5 EXTERN cg_decrypt
6 EXTERN cg_find
7
8
9 struc callgate
10sav0: resd 1
11sav4: resd 1
12ra_sav: resd 1
13ar_beg: resd 1
14ar_len: resd 1
15keyptr: resd 1
16 endstruc
17
18; the central call gate jump-point
19;
20; we are called by an encrypted function if we land here. we have to restore
21; its encrypted state, then decrypt it. afterwards we optionally setup a trap
22; return address that will return into a re-encryption function.
23;
24
25; 0x0000: 0x50 push %eax == gate address
26; 0x0001: 0x60 pusha
27; 0x0002: 0x9c pushf
28; 0x0003: 0xe8 0x00 0x00 0x00 0x00 call cg_entry
29
30cg_entry:
31; int 0x03
32 push eax
33 pusha
34 pushf
35 call cg_foo
36 ret
37 nop
38 nop
39
40cg_foo:
41 pop esi
42 sub esi, 8
43
44 push esi
45 call cg_find ; in: esi, out: eax = struct *
46 add esp, dword 4
47
48 ; restore bytes taken by the gate
49 mov edx, [eax + sav0]
50 mov [esi], edx
51 mov edx, [eax + sav4]
52 mov [esi + 4], edx
53
54 ; save real return address, overwrite with encryption gate addr, yay!
55 mov edx, [esp + 0x28]
56 mov [eax + ra_sav], edx
57 mov [esp + 0x28], dword cg_encryptgate
58
59 ; decrypt the whole encrypted function
60 push eax
61 call cg_decrypt
62 add esp, dword 4
63
64 mov [esp + 0x24], esi ; overwrite dummy eax value
65 popf
66 popa
67 ret
68
69cg_encryptgate:
70 ret
71
diff --git a/other/burneye/src/stub/cgate.c b/other/burneye/src/stub/cgate.c
new file mode 100644
index 0000000..1f8bb3f
--- /dev/null
+++ b/other/burneye/src/stub/cgate.c
@@ -0,0 +1,42 @@
1
2#include "include/int80.h"
3#include "include/unistd.h"
4#include "helper.h"
5
6
7typedef struct {
8 unsigned long int sav0,
9 sav4; /* first 8 saved bytes of function */
10 unsigned long int ra_sav; /* saved return address */
11 unsigned char * ar_beg; /* begin address of encrypted area */
12 unsigned long int ar_len; /* length of function */
13 void * keyptr; /* key structure pointer */
14} callgate;
15
16
17callgate * cg_find (unsigned long int addr);
18
19void
20cg_decrypt (callgate *cg)
21{
22#ifdef VDEBUG
23 be_printf ("cg_decrypt (0x%08lx, 0x%08lx, %lu)\n", cg->keyptr, cg->ar_beg, cg->ar_len);
24#endif
25}
26
27
28
29callgate sample = {
30 0x01234567, 0x89abcdef,
31 0x00000000,
32 (void *) 0x40404040, 0x00001000,
33 (void *) 0x80808080,
34};
35
36
37callgate *
38cg_find (unsigned long int addr)
39{
40 return (&sample);
41}
42
diff --git a/other/burneye/src/stub/cipher-glfsr-c.c b/other/burneye/src/stub/cipher-glfsr-c.c
new file mode 100644
index 0000000..28d55df
--- /dev/null
+++ b/other/burneye/src/stub/cipher-glfsr-c.c
@@ -0,0 +1,33 @@
1
2
3void
4glfsr_crypt (unsigned char *dst, unsigned char *src,
5 unsigned int len, unsigned int key)
6{
7 int n;
8 unsigned long int state = key,
9 fillup;
10
11 while (len--) {
12 for (n = 0 ; n < 8 ; ++n) {
13 fillup = 0;
14
15 if (state & 0x1) {
16 state >>= 1;
17 fillup |= 0x80000000;
18 } else {
19 state >>= 1;
20 state ^= 0xc0000057;
21 }
22 fillup >>= 1;
23 }
24 fillup >>= 24;
25 fillup &= 0x000000ff;
26
27 *dst++ = *src++ ^ fillup;
28 }
29
30 return;
31}
32
33
diff --git a/other/burneye/src/stub/cipher-glfsr.asm b/other/burneye/src/stub/cipher-glfsr.asm
new file mode 100644
index 0000000..7b4871f
--- /dev/null
+++ b/other/burneye/src/stub/cipher-glfsr.asm
@@ -0,0 +1,79 @@
1; minimalistic size-optimized cipher 'glfsr'
2;
3; using one single 32 bit galois linear feedback shifting register with a
4; fixed tap sequence. can be broken easily but its better than the
5; standard xor cipher and it looks neat, takes only ~25 bytes of code ;)
6
7%ifdef IN_STUB
8 GLOBAL glent
9
10glen: dd 0x00000000
11gkey: dd 0x00000000
12gnent: dd 0x00000000
13
14 db 'TEEE burneye - TESO ELF Encryption Engine'
15
16glent:; int3
17 push dword [gnent]
18 pushf
19 pusha
20 mov ecx, [glen]
21 jmp hunk
22hret: pop esi
23 mov edi, esi
24 mov ebx, [gkey]
25
26 or ebx, ebx ; zero key = skip, used for SEAL mode
27 jz hcont
28%else
29 GLOBAL glfsr_crypt ; glfsr_crypt (uchar *dst, uchar *src, int len, int key)
30
31glfsr_crypt:
32 push ebp
33 mov ebp, esp
34 pusha
35 mov edi, dword [ebp + 8]
36 mov esi, dword [ebp + 12]
37 mov ecx, dword [ebp + 16]
38 mov ebx, dword [ebp + 20]
39%endif
40
41; esi = source
42; edi = dest (can overlap/be the same) with source
43; ecx = number of bytes
44; ebx = 32 bit key
45
46 xor edx, edx
47glls: mov eax, 8
48gll0: shrd edx, ebx, 1 ; edx = >>output, ebx = |lfsr|
49 shr ebx, 1 ; cf = lfsr[0]
50 jnc gll1 ; == 1 ?
51 xor ebx, 0xc0000057 ; binary tap sequence
52gll1: dec eax
53 jnz gll0
54 shr edx, 32 - 8 ; take highest 8 bits
55 lodsb
56 xor al, dl
57 stosb
58 dec ecx
59 jnz glls
60
61%ifdef IN_STUB
62hcont: popa
63 popf
64 ret
65
66hunk: call hret
67%else
68%ifdef CONSERVE_SPACE
69 popa
70 pop ebp
71 ret 16
72%else
73 popa
74 pop ebp ; only restore, no stack space
75 ret
76%endif
77%endif
78
79
diff --git a/other/burneye/src/stub/cipher-glfsr.h b/other/burneye/src/stub/cipher-glfsr.h
new file mode 100644
index 0000000..93e0eaf
--- /dev/null
+++ b/other/burneye/src/stub/cipher-glfsr.h
@@ -0,0 +1,26 @@
1/* cipher-glfsr.h - galois linear feedback shifting register include file
2 *
3 * -scut
4 */
5
6#ifndef CIPHER_GLFSR_H
7#define CIPHER_GLFSR_H
8
9
10/* glfsr_crypt
11 *
12 * main encryption and decryption function. its a symmetric 32bit key stream
13 * cipher. it is not secure, only used here for obfuscation. the same key is
14 * used for encryption and decryption.
15 * encrypt 'len' bytes from 'src' to 'dst' with key 'key'. 'src' and 'dst' can
16 * overlap as they want, only if 'src' >= 'dst'.
17 *
18 * return in any case
19 */
20
21void
22glfsr_crypt (unsigned char *dest, unsigned char *src,
23 unsigned int len, unsigned int key);
24
25#endif
26
diff --git a/other/burneye/src/stub/cipher-rc4.c b/other/burneye/src/stub/cipher-rc4.c
new file mode 100644
index 0000000..651c270
--- /dev/null
+++ b/other/burneye/src/stub/cipher-rc4.c
@@ -0,0 +1,89 @@
1/* rc4 */
2
3#include "cipher-rc4.h"
4#include "cipher-sha1.h"
5
6#ifdef IN_STUB
7#include "helper.h"
8#else
9#include <stdio.h>
10#endif
11
12
13static void swap_byte (unsigned char *a, unsigned char *b);
14
15void
16rc4_prepare_key (unsigned char *key_data_ptr, int key_data_len, rc4_key *key)
17{
18 unsigned char i1, i2;
19 unsigned char *s;
20 short c;
21
22 s = &key->state[0];
23 for (c = 0; c < 256; c++)
24 s[c] = c;
25
26 key->x = key->y = 0;
27 i1 = i2 = 0;
28
29 for (c = 0; c < 256; c++) {
30 i2 = (key_data_ptr[i1] + s[c] + i2) % 256;
31 swap_byte (&s[c], &s[i2]);
32 i1 = (i1 + 1) % key_data_len;
33 }
34}
35
36
37void
38rc4_encipher (unsigned char *buffer, unsigned long int buffer_len, char *key)
39{
40 rc4_key key_r;
41 unsigned char hash[20]; /* hash of the key */
42
43 if (key == NULL || buffer == NULL || buffer_len == 0)
44 return;
45
46 SHA1HashLen (key, strlen (key), hash);
47 rc4_prepare_key (hash, sizeof (hash), &key_r);
48 rc4_cipher (buffer, buffer_len, &key_r);
49
50 return;
51}
52
53
54void
55rc4_cipher (unsigned char *buffer_ptr, int buffer_len, rc4_key *key)
56{
57 unsigned char x;
58 unsigned char y;
59 unsigned char *state;
60 unsigned char xi;
61 unsigned int counter;
62
63 x = key->x;
64 y = key->y;
65
66 state = &key->state[0];
67 for(counter = 0; counter < buffer_len; counter ++) {
68 x = (x + 1) % 256;
69 y = (state[x] + y) % 256;
70 swap_byte(&state[x], &state[y]);
71 xi = (state[x] + state[y]) % 256;
72 buffer_ptr[counter] ^= state[xi];
73 }
74
75 key->x = x;
76 key->y = y;
77}
78
79
80static void
81swap_byte (unsigned char *a, unsigned char *b)
82{
83 unsigned char sb;
84
85 sb = *a;
86 *a = *b;
87 *b = sb;
88}
89
diff --git a/other/burneye/src/stub/cipher-rc4.h b/other/burneye/src/stub/cipher-rc4.h
new file mode 100644
index 0000000..aa8908e
--- /dev/null
+++ b/other/burneye/src/stub/cipher-rc4.h
@@ -0,0 +1,24 @@
1
2#ifndef CIPHER_RC4_H
3#define CIPHER_RC4_H
4
5#ifdef IN_STUB
6#include "helper.h"
7#endif
8
9
10typedef struct rc4_key {
11 unsigned char state[256];
12 unsigned char x;
13 unsigned char y;
14} rc4_key;
15
16
17void rc4_prepare_key (unsigned char *key_data_ptr, int key_data_len, rc4_key *key);
18void rc4_encipher (unsigned char *buffer, unsigned long int buffer_len, char *key);
19#define rc4_decipher rc4_encipher
20void rc4_cipher (unsigned char *buffer_ptr, int buffer_len, rc4_key *key);
21
22
23#endif
24
diff --git a/other/burneye/src/stub/cipher-sha1.c b/other/burneye/src/stub/cipher-sha1.c
new file mode 100644
index 0000000..5b60c1e
--- /dev/null
+++ b/other/burneye/src/stub/cipher-sha1.c
@@ -0,0 +1,212 @@
1/* sha-1 implementation
2 *
3 * by steve reid <steve@edmweb.com>
4 * modified by scut
5 */
6
7/* #define LITTLE_ENDIAN * This should be #define'd if true. */
8
9#include "cipher-sha1.h"
10#ifdef IN_STUB
11#include "helper.h"
12#endif
13
14typedef struct {
15 unsigned long state[5];
16 unsigned long count[2];
17 unsigned char buffer[64];
18} SHA1_CTX;
19
20static void SHA1Transform (unsigned long state[5],
21 unsigned char buffer[64]);
22static void SHA1Init (SHA1_CTX* context);
23static void SHA1Update (SHA1_CTX* context, unsigned char* data,
24 unsigned int len);
25static void SHA1Final (unsigned char digest[20], SHA1_CTX* context);
26
27
28#define rol(value, bits) (((value) << (bits)) | ((value) >> (32 - (bits))))
29
30/* blk0() and blk() perform the initial expand. */
31/* I got the idea of expanding during the round function from SSLeay */
32#ifdef LITTLE_ENDIAN
33#define blk0(i) (block->l[i] = (rol(block->l[i],24)&0xFF00FF00) \
34 |(rol(block->l[i],8)&0x00FF00FF))
35#else
36#define blk0(i) block->l[i]
37#endif
38#define blk(i) (block->l[i&15] = rol(block->l[(i+13)&15]^block->l[(i+8)&15] \
39 ^block->l[(i+2)&15]^block->l[i&15],1))
40
41/* (R0+R1), R2, R3, R4 are the different operations used in SHA1 */
42#define R0(v,w,x,y,z,i) z+=((w&(x^y))^y)+blk0(i)+0x5A827999+rol(v,5),w=rol(w,30);
43#define R1(v,w,x,y,z,i) z+=((w&(x^y))^y)+blk(i)+0x5A827999+rol(v,5),w=rol(w,30);
44#define R2(v,w,x,y,z,i) z+=(w^x^y)+blk(i)+0x6ED9EBA1+rol(v,5),w=rol(w,30);
45#define R3(v,w,x,y,z,i) z+=(((w|x)&y)|(w&x))+blk(i)+0x8F1BBCDC+rol(v,5),w=rol(w,30);
46#define R4(v,w,x,y,z,i) z+=(w^x^y)+blk(i)+0xCA62C1D6+rol(v,5),w=rol(w,30);
47
48
49/* Hash a single 512-bit block. This is the core of the algorithm. */
50
51void
52SHA1Transform (unsigned long state[5], unsigned char buffer[64])
53{
54 unsigned long a, b, c, d, e;
55 typedef union {
56 unsigned char c[64];
57 unsigned long l[16];
58 } CHAR64LONG16;
59 CHAR64LONG16 *block;
60 static unsigned char workspace[64];
61
62 block = (CHAR64LONG16 *) workspace;
63 memcpy (block, buffer, 64);
64
65 /* Copy context->state[] to working vars */
66 a = state[0];
67 b = state[1];
68 c = state[2];
69 d = state[3];
70 e = state[4];
71
72 /* 4 rounds of 20 operations each. Loop unrolled. */
73 R0(a,b,c,d,e, 0); R0(e,a,b,c,d, 1); R0(d,e,a,b,c, 2); R0(c,d,e,a,b, 3);
74 R0(b,c,d,e,a, 4); R0(a,b,c,d,e, 5); R0(e,a,b,c,d, 6); R0(d,e,a,b,c, 7);
75 R0(c,d,e,a,b, 8); R0(b,c,d,e,a, 9); R0(a,b,c,d,e,10); R0(e,a,b,c,d,11);
76 R0(d,e,a,b,c,12); R0(c,d,e,a,b,13); R0(b,c,d,e,a,14); R0(a,b,c,d,e,15);
77 R1(e,a,b,c,d,16); R1(d,e,a,b,c,17); R1(c,d,e,a,b,18); R1(b,c,d,e,a,19);
78 R2(a,b,c,d,e,20); R2(e,a,b,c,d,21); R2(d,e,a,b,c,22); R2(c,d,e,a,b,23);
79 R2(b,c,d,e,a,24); R2(a,b,c,d,e,25); R2(e,a,b,c,d,26); R2(d,e,a,b,c,27);
80 R2(c,d,e,a,b,28); R2(b,c,d,e,a,29); R2(a,b,c,d,e,30); R2(e,a,b,c,d,31);
81 R2(d,e,a,b,c,32); R2(c,d,e,a,b,33); R2(b,c,d,e,a,34); R2(a,b,c,d,e,35);
82 R2(e,a,b,c,d,36); R2(d,e,a,b,c,37); R2(c,d,e,a,b,38); R2(b,c,d,e,a,39);
83 R3(a,b,c,d,e,40); R3(e,a,b,c,d,41); R3(d,e,a,b,c,42); R3(c,d,e,a,b,43);
84 R3(b,c,d,e,a,44); R3(a,b,c,d,e,45); R3(e,a,b,c,d,46); R3(d,e,a,b,c,47);
85 R3(c,d,e,a,b,48); R3(b,c,d,e,a,49); R3(a,b,c,d,e,50); R3(e,a,b,c,d,51);
86 R3(d,e,a,b,c,52); R3(c,d,e,a,b,53); R3(b,c,d,e,a,54); R3(a,b,c,d,e,55);
87 R3(e,a,b,c,d,56); R3(d,e,a,b,c,57); R3(c,d,e,a,b,58); R3(b,c,d,e,a,59);
88 R4(a,b,c,d,e,60); R4(e,a,b,c,d,61); R4(d,e,a,b,c,62); R4(c,d,e,a,b,63);
89 R4(b,c,d,e,a,64); R4(a,b,c,d,e,65); R4(e,a,b,c,d,66); R4(d,e,a,b,c,67);
90 R4(c,d,e,a,b,68); R4(b,c,d,e,a,69); R4(a,b,c,d,e,70); R4(e,a,b,c,d,71);
91 R4(d,e,a,b,c,72); R4(c,d,e,a,b,73); R4(b,c,d,e,a,74); R4(a,b,c,d,e,75);
92 R4(e,a,b,c,d,76); R4(d,e,a,b,c,77); R4(c,d,e,a,b,78); R4(b,c,d,e,a,79);
93
94 /* Add the working vars back into context.state[] */
95 state[0] += a;
96 state[1] += b;
97 state[2] += c;
98 state[3] += d;
99 state[4] += e;
100
101 /* Wipe variables */
102 a = b = c = d = e = 0;
103
104 return;
105}
106
107
108/* SHA1Init - Initialize new context */
109
110void
111SHA1Init (SHA1_CTX *context)
112{
113 /* SHA1 initialization constants */
114 context->state[0] = 0x67452301;
115 context->state[1] = 0xEFCDAB89;
116 context->state[2] = 0x98BADCFE;
117 context->state[3] = 0x10325476;
118 context->state[4] = 0xC3D2E1F0;
119 context->count[0] = context->count[1] = 0;
120
121 return;
122}
123
124
125/* Run your data through this. */
126
127void
128SHA1Update (SHA1_CTX* context, unsigned char* data, unsigned int len)
129{
130 unsigned int i, j;
131
132 j = (context->count[0] >> 3) & 63;
133 if ((context->count[0] += len << 3) < (len << 3))
134 context->count[1]++;
135
136 context->count[1] += (len >> 29);
137
138 if ((j + len) > 63) {
139 memcpy (&context->buffer[j], data, (i = 64-j));
140 SHA1Transform (context->state, context->buffer);
141
142 for ( ; i + 63 < len ; i += 64) {
143 SHA1Transform (context->state, &data[i]);
144 }
145
146 j = 0;
147 } else
148 i = 0;
149
150 memcpy (&context->buffer[j], &data[i], len - i);
151
152 return;
153}
154
155
156/* Add padding and return the message digest. */
157
158void
159SHA1Final (unsigned char digest[20], SHA1_CTX* context)
160{
161 unsigned long i, j;
162 unsigned char finalcount[8];
163
164 for (i = 0 ; i < 8 ; i++) {
165 finalcount[i] = (unsigned char)((context->count[(i >= 4 ? 0 : 1)] >> ((3-(i & 3)) * 8) ) & 255);
166 }
167
168 SHA1Update (context, (unsigned char *)"\200", 1);
169 while ((context->count[0] & 504) != 448) {
170 SHA1Update (context, (unsigned char *)"\0", 1);
171 }
172
173 /* Should cause a SHA1Transform() */
174 SHA1Update (context, finalcount, 8);
175 for (i = 0 ; i < 20 ; i++) {
176 digest[i] = (unsigned char) ((context->state[i>>2] >> ((3-(i & 3)) * 8) ) & 255);
177 }
178
179 /* Wipe variables */
180 i = j = 0;
181
182 memset (context->buffer, 0, 64);
183 memset (context->state, 0, 20);
184 memset (context->count, 0, 8);
185 memset (&finalcount, 0, 8);
186
187 SHA1Transform (context->state, context->buffer);
188
189 return;
190}
191
192
193void
194SHA1HashLen (unsigned char *data, unsigned long int data_len, unsigned char *hash)
195{
196 SHA1_CTX context;
197
198 SHA1Init (&context);
199 SHA1Update (&context, data, data_len);
200 SHA1Final (hash, &context);
201
202 return;
203}
204
205
206void
207SHA1Hash (char *password, unsigned char *hash)
208{
209 SHA1HashLen (password, strlen (password), hash);
210
211 return;
212}
diff --git a/other/burneye/src/stub/cipher-sha1.h b/other/burneye/src/stub/cipher-sha1.h
new file mode 100644
index 0000000..92a3382
--- /dev/null
+++ b/other/burneye/src/stub/cipher-sha1.h
@@ -0,0 +1,36 @@
1/* sha-1 implementation
2 *
3 * by steve reid <steve@edmweb.com>
4 * modified by scut
5 *
6 * include file
7 */
8
9#ifndef CIPHER_SHA1_H
10#define CIPHER_SHA1_H
11
12
13/* SHA1Hash
14 *
15 * hash an binary string `data' with `data_len' bytes into a 20 byte long hash
16 * byte buffer pointed to by `hash'
17 *
18 * return in any case
19 */
20
21void SHA1HashLen (unsigned char *data, unsigned long int data_len,
22 unsigned char *hash);
23
24
25/* SHA1Hash
26 *
27 * hash an ASCIIZ password into a 20 byte long hash byte buffer
28 *
29 * return in any case
30 */
31
32void SHA1Hash (char *password, unsigned char *hash);
33
34
35#endif
36
diff --git a/other/burneye/src/stub/fingerprint.c b/other/burneye/src/stub/fingerprint.c
new file mode 100644
index 0000000..4273f3a
--- /dev/null
+++ b/other/burneye/src/stub/fingerprint.c
@@ -0,0 +1,593 @@
1/* fingerprinting functions
2 *
3 * we use 18 byte subhashes (first 144 bit of sha1 160 bit hash) here, to
4 * better line up with the pre reed solomon transformation. then finally,
5 * the key is a real 20 byte sha1 hash of the subhash array
6 */
7
8#ifndef IN_STUB
9#include <sys/types.h>
10#include <sys/stat.h>
11#include <sys/utsname.h>
12#include <fcntl.h>
13#include <unistd.h>
14#include <stdio.h>
15#include <stdlib.h>
16#include <unistd.h>
17#else
18#include "include/int80.h"
19#include "include/unistd.h"
20#include "helper.h"
21#endif
22
23#include "fingerprint.h"
24#include "cipher-sha1.h"
25#include "rs.h"
26
27/* externals */
28extern unsigned int KK;
29
30/* prototypes */
31static unsigned int
32fp_sgrep (char *pathname, char *seq, unsigned char *buf,
33 unsigned int buf_len);
34void strlcat (unsigned char *tgt, unsigned int len, unsigned char *str);
35
36
37#ifndef IN_STUB
38int test_sysbase = 1; /* fixed information */
39int test_sysinstall = 1; /* information that varies each installation */
40int test_procpci = 1; /* /proc/pci | grep "bridge:" output */
41int test_proccpu = 1; /* /proc/cpuinfo, certain characteristics */
42int test_procmem = 1; /* /proc/meminfo, total system memory */
43int test_procroute = 1; /* /proc/net/route, system routing table */
44int test_procpartitions = 1;/* /proc/partitions, harddisk partitions */
45
46
47/* option table */
48typedef struct {
49 char * name;
50 unsigned long int c_num;
51} elem;
52
53/* the order is important, low bits come first */
54elem e_list[] = {
55 { "sysbase", FP_SYSBASE },
56 { "sysinstall", FP_SYSINSTALL },
57 { "procpci", FP_PROCPCI },
58 { "proccpu", FP_PROCCPU },
59 { "procmem", FP_PROCMEM },
60 { "procroute", FP_PROCROUTE },
61 { "procpartitions", FP_PROCPARTITIONS },
62 { NULL, 0 },
63};
64
65
66void
67fp_tenable (fp_s *fp, char *arg)
68{
69 fp->tests |= fp_tlookup (arg);
70}
71
72
73void
74fp_tdisable (fp_s *fp, char *arg)
75{
76 fp->tests &= ~(fp_tlookup (arg));
77}
78
79
80int
81fp_counttests (fp_s *fp)
82{
83 int n,
84 count = 0;
85
86 for (n = 0 ; n < 32 ; ++n) {
87 if (fp->tests & (1 << n))
88 count += 1;
89 }
90
91 return (count);
92}
93
94
95unsigned long int
96fp_tlookup (char *arg)
97{
98 int n;
99
100 for (n = 0 ; e_list[n].name != NULL ; ++n)
101 if (strcmp (e_list[n].name, arg) == 0)
102 return (e_list[n].c_num);
103
104 fprintf (stderr, "invalid symbol\n");
105
106 exit (EXIT_FAILURE);
107}
108
109
110void
111fp_tlist (unsigned long int tests)
112{
113 int n;
114
115 printf ("%-17s value\n", "name of test");
116 printf ("----------------+----------\n");
117 for (n = 0 ; e_list[n].name != NULL ; ++n)
118 printf ("%-17s0x%08lx (default: %s)\n", e_list[n].name,
119 e_list[n].c_num,
120 tests & fp_tlookup (e_list[n].name) ?
121 "enabled" : "disabled");
122 printf ("----------------+----------\n");
123}
124
125
126#endif
127
128
129#ifdef STANDALONE
130static void usage (char *progname);
131
132void
133hexdump_s (FILE *outf, unsigned char *data, unsigned int amount);
134
135void
136hexdump (unsigned char *data, unsigned int amount);
137
138
139fp_s template = {
140 NULL, /* hash array pointer */
141
142 /* default fingerprints to take */
143 FP_TEMPLATE,
144};
145
146char * outname = NULL;
147FILE * outf = NULL;
148
149
150
151static void
152usage (char *progname)
153{
154 fprintf (stderr, "usage: %s [options]\n\n"
155 "\t-h\tthis help\n"
156 "\t-e opt\tenable fingerprint option\n"
157 "\t-d opt\tdisable fingerprint option\n"
158 "\t-l\tlist fingerprint options\n"
159 "\t-f name\tset output file name (default: stdout)\n\n",
160 progname);
161
162 exit (EXIT_FAILURE);
163}
164
165
166int
167main (int argc, char *argv[])
168{
169 int n;
170 char c;
171 char * progname = argv[0];
172 int out_c;
173 unsigned char hash_arr[N_TEST * N_SUBHASH];
174
175
176 if (argc == 1)
177 fprintf (stderr, "run %s -h for options\n\n", progname);
178
179 template.hash_arr = hash_arr;
180
181 while ((c = getopt (argc, argv, "he:d:lf:")) != EOF) {
182 switch (c) {
183 case 'h':
184 usage (progname);
185 break;
186 case 'e':
187 fp_tenable (&template, optarg);
188 break;
189 case 'd':
190 fp_tdisable (&template, optarg);
191 break;
192 case 'l':
193 fp_tlist (template.tests);
194 exit (EXIT_SUCCESS);
195 break;
196 case 'f':
197 outname = optarg;
198 break;
199 default:
200 usage (progname);
201 break;
202 }
203 }
204
205 if (outname != NULL) {
206 outf = fopen (outname, "w");
207 if (outf == NULL) {
208 perror ("fopen output file");
209 exit (EXIT_FAILURE);
210 }
211 } else
212 outf = stdout;
213
214 out_c = fp_get (&template);
215
216 for (n = 0 ; e_list[n].name != NULL ; ++n)
217 if (template.tests & e_list[n].c_num)
218 fprintf (outf, "enable %s\n", e_list[n].name);
219
220 fprintf (outf, "begin\n");
221 hexdump_s (outf, template.hash_arr, out_c);
222 fprintf (outf, "end\n");
223
224 exit (EXIT_SUCCESS);
225}
226#endif
227
228
229unsigned int
230fp_get (fp_s *fs)
231{
232 struct utsname un;
233 unsigned char * ha;
234 unsigned char tmpstr[1024];
235
236
237 memset (fs->hash_arr, '\0', N_TEST * N_SUBHASH);
238 ha = fs->hash_arr;
239
240
241 if ((fs->tests & FP_SYSBASE) || (fs->tests & FP_SYSINSTALL))
242 uname (&un);
243
244 /* (fs->tests & FP_sysbase: sysname, nodename, machine */
245 if (fs->tests & FP_SYSBASE) {
246 memset (tmpstr, '\0', sizeof (tmpstr));
247 strlcat (tmpstr, sizeof (tmpstr), un.sysname);
248 strlcat (tmpstr, sizeof (tmpstr), un.nodename);
249 strlcat (tmpstr, sizeof (tmpstr), un.machine);
250 tmpstr[sizeof (tmpstr) - 1] = '\0';
251 SHA1Hash (tmpstr, ha);
252 ha += N_SUBHASH;
253 }
254
255 /* (fs->tests & FP_sysinstall: release, version XXX: more strict than sysbase */
256 if (fs->tests & FP_SYSINSTALL) {
257 memset (tmpstr, '\0', sizeof (tmpstr));
258 strlcat (tmpstr, sizeof (tmpstr), un.release);
259 strlcat (tmpstr, sizeof (tmpstr), un.version);
260 tmpstr[sizeof (tmpstr) - 1] = '\0';
261 SHA1Hash (tmpstr, ha);
262 ha += N_SUBHASH;
263 }
264
265 /* (fs->tests & FP_procpci: pci registered bridges */
266 if (fs->tests & FP_PROCPCI) {
267 memset (tmpstr, '\0', sizeof (tmpstr));
268 fp_sgrep ("/proc/pci", "bridge:", tmpstr, sizeof (tmpstr));
269 tmpstr[sizeof (tmpstr) - 1] = '\0';
270 SHA1Hash (tmpstr, ha);
271 ha += N_SUBHASH;
272 }
273
274 /* (fs->tests & FP_proccpu: generic cpu fingerprint */
275 if (fs->tests & FP_PROCCPU) {
276 memset (tmpstr, '\0', sizeof (tmpstr));
277 fp_sgrep ("/proc/cpuinfo", "vendor_id",
278 tmpstr, sizeof (tmpstr));
279 tmpstr[sizeof (tmpstr) - 1] = '\0';
280 fp_sgrep ("/proc/cpuinfo", "model",
281 tmpstr + strlen (tmpstr),
282 sizeof (tmpstr) - strlen (tmpstr));
283 tmpstr[sizeof (tmpstr) - 1] = '\0';
284 fp_sgrep ("/proc/cpuinfo", "flags",
285 tmpstr + strlen (tmpstr),
286 sizeof (tmpstr) - strlen (tmpstr));
287 tmpstr[sizeof (tmpstr) - 1] = '\0';
288
289 SHA1Hash (tmpstr, ha);
290 ha += N_SUBHASH;
291 }
292
293 /* (fs->tests & FP_procmem: total system memory size */
294 if (fs->tests & FP_PROCMEM) {
295 memset (tmpstr, '\0', sizeof (tmpstr));
296 fp_sgrep ("/proc/meminfo", "MemTotal:",
297 tmpstr, sizeof (tmpstr));
298 tmpstr[sizeof (tmpstr) - 1] = '\0';
299
300 SHA1Hash (tmpstr, ha);
301 ha += N_SUBHASH;
302 }
303
304 /* (fs->tests & FP_procroute: routing table */
305 if (fs->tests & FP_PROCROUTE) {
306 memset (tmpstr, '\0', sizeof (tmpstr));
307 fp_sgrep ("/proc/net/route", NULL, tmpstr, sizeof (tmpstr));
308 tmpstr[sizeof (tmpstr) - 1] = '\0';
309
310 SHA1Hash (tmpstr, ha);
311 ha += N_SUBHASH;
312 }
313
314 /* (fs->tests & FP_procpartitions: partition tables */
315 if (fs->tests & FP_PROCPARTITIONS) {
316 memset (tmpstr, '\0', sizeof (tmpstr));
317 fp_sgrep ("/proc/partitions", NULL, tmpstr, sizeof (tmpstr));
318 tmpstr[sizeof (tmpstr) - 1] = '\0';
319
320 SHA1Hash (tmpstr, ha);
321 ha += N_SUBHASH;
322 }
323
324
325 return (ha - fs->hash_arr);
326}
327
328
329/* fp_sgrep
330 *
331 * simple single sequence grep with only syscalls. read from file with
332 * pathname 'pathname' only lines that contain the sequence 'seq' (or every
333 * line, when NULL), appending all lines (including '\n') to buffer 'buf',
334 * which is 'buf_len' bytes long.
335 *
336 * return number of bytes in buffer
337 */
338
339static unsigned int
340fp_sgrep (char *pathname, char *seq, unsigned char *buf, unsigned int buf_len)
341{
342 int fd,
343 n;
344 unsigned char * lp;
345 unsigned char * sp;
346 unsigned char line[256];
347 unsigned int ret = 0;
348
349
350 fd = open (pathname, O_RDONLY, 0);
351 if (fd < 0) {
352#ifndef IN_STUB
353 perror ("fp_sgrep:open");
354 exit (EXIT_FAILURE);
355#else
356 _exit (73);
357#endif
358 }
359
360 /* uhh yes, i know it looks like a kludge, but i cannot rely on any
361 * library function, for that the same code runs from within the stub,
362 * syscall wise too. :(
363 */
364 do {
365 lp = line;
366 do {
367 n = read (fd, lp, 1);
368 } while (n == 1 && *lp != '\0' && *lp != '\n' &&
369 lp++ <= (line + sizeof (line)));
370
371 if (n <= 0) {
372 close (fd);
373
374 return (ret);
375 }
376
377 if (seq == NULL) {
378 memcpy (buf, line, lp - line + 1);
379 buf += (lp - line) + 1;
380 ret += (lp - line) + 1;
381 } else {
382 for (sp = line ; sp < (lp - strlen (seq)) ; ++sp) {
383 if (memcmp (sp, seq, strlen (seq)) == 0 &&
384 (lp - line) < buf_len)
385 {
386 memcpy (buf, line, lp - line + 1);
387 buf += (lp - line) + 1;
388 ret += (lp - line) + 1;
389 sp = lp; /* one time is enough */
390 }
391 }
392 }
393 } while (1);
394}
395
396
397#ifdef STANDALONE
398void
399hexdump_s (FILE *outf, unsigned char *data, unsigned int amount)
400{
401 unsigned int dp; /* data pointer */
402
403 for (dp = 1 ; dp <= amount ; ++dp) {
404 fprintf (outf, "%02x", data[dp-1]);
405 if (dp % 16 == 0)
406 fprintf (outf, "\n");
407 }
408 if ((dp - 1) % 16 != 0)
409 fprintf (outf, "\n");
410
411 return;
412}
413
414
415void
416hexdump (unsigned char *data, unsigned int amount)
417{
418 unsigned int dp, p; /* data pointer */
419 const char trans[] =
420 "................................ !\"#$%&'()*+,-./0123456789"
421 ":;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklm"
422 "nopqrstuvwxyz{|}~...................................."
423 "....................................................."
424 "........................................";
425
426 for (dp = 1; dp <= amount; dp++) {
427 printf ("%02x ", data[dp-1]);
428 if ((dp % 8) == 0)
429 printf (" ");
430 if ((dp % 16) == 0) {
431 printf ("| ");
432 p = dp;
433 for (dp -= 16; dp < p; dp++)
434 printf ("%c", trans[data[dp]]);
435 printf ("\n");
436 }
437 }
438 if ((amount % 16) != 0) {
439 p = dp = 16 - (amount % 16);
440 for (dp = p; dp > 0; dp--) {
441 printf (" ");
442 if (((dp % 8) == 0) && (p != 8))
443 printf (" ");
444 }
445 printf (" | ");
446 for (dp = (amount - (16 - p)); dp < amount; dp++)
447 printf ("%c", trans[data[dp]]);
448 }
449 printf ("\n");
450
451 return;
452}
453#endif
454
455
456void
457strlcat (unsigned char *tgt, unsigned int len, unsigned char *str)
458{
459 len -= strlen (tgt);
460 tgt += strlen (tgt);
461 memcpy (tgt, str, (strlen (str) + 1) > len ? len : (strlen (str) + 1));
462}
463
464
465unsigned long int
466fp_padgen (unsigned char *data, unsigned int data_len, unsigned char *pad,
467 unsigned int pad_len, unsigned int data_recover)
468{
469 unsigned int tr_arr[NN];
470
471
472 /* assume a good (n * 8/12 < NN) length here, rs_* will check
473 */
474 memset (tr_arr, '\0', sizeof (tr_arr));
475 rs_trans (data, data_len, &tr_arr[0], NN);
476
477 /* computing the number of data symbols */
478 data_len *= 8;
479 data_len /= 12;
480 data_recover *= 8;
481 data_recover /= 12;
482
483 /* the following line is the pure essence of the entire fingerprint
484 * deviation mathematics we do here
485 */
486 KK = NN - (2 * data_recover);
487
488 /* generate error correction block
489 */
490 rs_encode (&tr_arr[0], &tr_arr[KK]);
491
492 /* now we have the following layout of the tr_arr array:
493 *
494 * 0 data_len KK
495 * [data_len symbols] | [zero padding] | [error correction symbols]
496 *
497 * package the error correction symbols back into a byte array
498 */
499 rs_detrans (pad, pad_len, &tr_arr[KK], NN - KK);
500
501 /* number of parity bytes. always fits.
502 */
503 return ((12 * 2 * data_recover) / 8);
504}
505
506
507int
508fp_padfix (unsigned char *data, unsigned int data_len,
509 unsigned char *pad, unsigned int pad_len)
510{
511 int n;
512 unsigned int tr_arr[NN];
513
514
515 /* again, transform 8 to 12 bits */
516 memset (tr_arr, '\0', sizeof (tr_arr));
517 rs_trans (data, data_len, tr_arr, NN);
518
519 data_len *= 8;
520 data_len /= 12;
521
522 /* calculate KK accordingly to the pad length
523 */
524 KK = NN - ((pad_len * 8) / 12);
525 rs_trans (pad, pad_len, &tr_arr[KK], NN - KK);
526
527 /* now, we try to fixup any errors. since the knowledge about possible
528 * erasures (i.e. known places of errors) can double the number of
529 * corrected symbols there may be a way to shortcut brute force attacks
530 * by giving the sha1 subhash boundaries through erasures, much like
531 * the reed solomon features at correcting burst errors. this is bad.
532 */
533 n = rs_eras_dec (tr_arr, NULL, 0);
534
535 rs_detrans (data, ((data_len * 12) / 8), &tr_arr[0], data_len);
536
537 return (n != -1 ? 0 : 1);
538}
539
540
541#ifdef IN_STUB
542
543void
544fp_process (fp_fin *fpf, unsigned char *key)
545{
546#ifdef FP_DEBUG
547 int pad_res;
548#endif
549 unsigned int ha_len;
550 unsigned char hash_arr[N_TEST * N_SUBHASH];
551
552#ifdef DEBUG
553 be_printf ("test: 0x%08lx\n", fpf->fp.tests);
554#endif
555
556 fpf->fp.hash_arr = hash_arr;
557 ha_len = fp_get (&fpf->fp);
558
559#ifdef DEBUG
560 be_printf (" fp: %02x %02x %02x %02x\n",
561 hash_arr[0], hash_arr[1], hash_arr[2], hash_arr[3]);
562#endif
563
564 /* if there is a rescue pad to fix deviation with, apply it.
565 */
566 if (fpf->par_len != 0) {
567 fpf->par_data = ((unsigned char *) &fpf->par_data) +
568 sizeof (fpf->par_data);
569#ifdef FP_DEBUG
570 pad_res =
571#endif
572 fp_padfix (hash_arr, ha_len, fpf->par_data, fpf->par_len);
573#ifdef FP_DEBUG
574 if (pad_res == 0) {
575 be_printf ("valid fingerprint\n");
576 } else {
577 be_printf ("invalid fingerprint\n");
578 }
579#endif
580 }
581
582 /* generate final 160 bit sha1 hash out of (possibly corrected) host
583 * characteristics
584 */
585 SHA1HashLen (hash_arr, ha_len, key);
586
587 return;
588}
589
590
591#endif
592
593
diff --git a/other/burneye/src/stub/fingerprint.h b/other/burneye/src/stub/fingerprint.h
new file mode 100644
index 0000000..276b7e3
--- /dev/null
+++ b/other/burneye/src/stub/fingerprint.h
@@ -0,0 +1,159 @@
1
2#ifndef FINGERPRINT_H
3#define FINGERPRINT_H
4
5
6#define N_TEST 7 /* number of overall available tests */
7#define N_SUBHASH 18 /* size in bytes of subhash */
8
9/* yes, i wish bitfields would support pointer-wise addressing, too,
10 * so shut up */
11#define FP_SYSBASE 0x00000001
12#define FP_SYSINSTALL 0x00000002
13#define FP_PROCPCI 0x00000004
14#define FP_PROCCPU 0x00000008
15#define FP_PROCMEM 0x00000010
16#define FP_PROCROUTE 0x00000020
17#define FP_PROCPARTITIONS 0x00000040
18
19#define FP_TEMPLATE (FP_SYSBASE | \
20 FP_PROCPCI | FP_PROCCPU | \
21 FP_PROCROUTE)
22
23typedef struct {
24 unsigned char * hash_arr;
25 unsigned long int tests;
26} fp_s;
27
28
29typedef struct {
30 /* only used when SEALNOW is set */
31 unsigned long int stubhdr_flags_ofs;
32 unsigned long int sealhdr_ofs; /* this headers offset */
33
34 unsigned long int payload_ofs;
35 unsigned long int payload_len;
36
37 unsigned long int be_layer0_filestart;
38 unsigned long int be_layer0_size;
39 unsigned long int be_layer0_cont;
40
41 /* real fingerprint data */
42 fp_s fp;
43 unsigned char fp_xor[20]; /* xor hash */
44 unsigned char fp_check[4]; /* check hash */
45 unsigned long int par_len; /* parity length */
46
47 /* must be last defined element in structure */
48 unsigned char * par_data; /* parity data */
49 /* par_arr here */
50} fp_fin;
51
52
53#ifndef IN_STUB
54/* fp_tenable
55 *
56 * lookup symbolic test `arg' and enable it in `fp'
57 */
58
59void
60fp_tenable (fp_s *fp, char *arg);
61
62
63/* fp_tdisable
64 *
65 * lookup symbolic test `arg' and disable it in `fp'
66 */
67
68void
69fp_tdisable (fp_s *fp, char *arg);
70
71
72/* fp_tlist
73 *
74 * list available fingerprint tests, defaults are printed ('tests')
75 */
76
77void
78fp_tlist (unsigned long int tests);
79
80
81/* fp_counttests
82 *
83 * count the number of tests used in the fingerprint described by `fp'
84 *
85 * return the number of tests
86 */
87
88int
89fp_counttests (fp_s *fp);
90
91
92/* fp_tlookup
93 *
94 * convert symbolic test `arg' to a flag value used in fingerprint structures
95 *
96 * return flag value
97 */
98
99unsigned long int
100fp_tlookup (char *arg);
101#endif
102
103
104/* fp_get
105 *
106 * retrieve some host fingerprint into the fingerprint structure pointed to by
107 * `fs'. the individual tests are done as specified by the `fs->tests' field.
108 *
109 * return number of bytes stored into `fs->hash_arr'
110 */
111
112unsigned int
113fp_get (fp_s *fs);
114
115
116/* fp_padgen
117 *
118 * generate a reed solomon rescue pad at `pad', which is `pad_len' bytes long
119 * (does not have to be the exact size, but should be large enough), which can
120 * recover up to `data_recover' bytes from `data_len' bytes at `data'.
121 *
122 * return the number of bytes of the pad
123 */
124
125unsigned long int
126fp_padgen (unsigned char *data, unsigned int data_len, unsigned char *pad,
127 unsigned int pad_len, unsigned int data_recover);
128
129
130/* fp_padfix
131 *
132 * use the supplied byte based pad `pad', which is `pad_len' bytes long, to
133 * correct as much errors as possible in data block `data', which is
134 * `data_len' bytes long.
135 *
136 * return 0 on success
137 * return 1 on failure
138 */
139
140int
141fp_padfix (unsigned char *data, unsigned int data_len,
142 unsigned char *pad, unsigned int pad_len);
143
144
145#ifdef IN_STUB
146
147/* fp_process
148 *
149 * called to process a fingerprint from within the stub
150 */
151
152void
153fp_process (fp_fin *fpf, unsigned char *key);
154
155#endif
156
157#endif
158
159
diff --git a/other/burneye/src/stub/fptest.c b/other/burneye/src/stub/fptest.c
new file mode 100644
index 0000000..a647217
--- /dev/null
+++ b/other/burneye/src/stub/fptest.c
@@ -0,0 +1,27 @@
1
2#include <stdio.h>
3#include "fingerprint.h"
4
5int
6main (int argc, char *argv[])
7{
8 fp_s fp;
9
10 unsigned int ha_len;
11 unsigned char ha[N_TEST * 18];
12
13 int pad_res;
14 unsigned long int pad_len;
15 unsigned char pad[256];
16
17
18 fp.tests = FP_SYSBASE | FP_PROCPCI | FP_PROCMEM;
19 fp.hash_arr = ha;
20 ha_len = fp_get (&fp);
21
22 pad_len = fp_padgen (ha, ha_len, pad, sizeof (pad), 1 * 18);
23
24 pad_res = fp_padfix (ha, ha_len, pad, pad_len);
25}
26
27
diff --git a/other/burneye/src/stub/helper.c b/other/burneye/src/stub/helper.c
new file mode 100644
index 0000000..00abbf5
--- /dev/null
+++ b/other/burneye/src/stub/helper.c
@@ -0,0 +1,139 @@
1/* helper functions
2 */
3
4#include <stdarg.h>
5#include "include/int80.h"
6#include "include/unistd.h"
7#include "helper.h"
8
9
10void
11memset (void *dst, unsigned char c, unsigned int len)
12{
13 unsigned char * p = (unsigned char *) dst;
14
15 while (len--)
16 *p++ = c;
17}
18
19
20int
21memcmp (void *dst, void *src, unsigned int len)
22{
23 unsigned char * d = (unsigned char *) dst;
24 unsigned char * s = (unsigned char *) src;
25
26 while (len-- > 0) {
27 if (*d++ != *s++)
28 return (1);
29 }
30
31 return (0);
32}
33
34
35void
36memcpy (void *dst, void *src, unsigned int len)
37{
38 unsigned char * d = (unsigned char *) dst;
39 unsigned char * s = (unsigned char *) src;
40
41 while (len--)
42 *d++ = *s++;
43}
44
45
46int
47strlen (unsigned char *str)
48{
49 int n = 0;
50
51 while (*str++)
52 n++;
53
54 return (n);
55}
56
57
58
59#ifdef VDEBUG
60void
61be_printf (char *str, ...)
62{
63 int len;
64 va_list vl;
65 char buf[1024];
66
67 va_start (vl, str);
68 len = vsnprintf (buf, sizeof (buf), str, vl);
69 va_end (vl);
70 buf[sizeof (buf) - 1] = '\0';
71
72 write (1, buf, len);
73
74 return;
75}
76#endif
77
78
79/* based on the dietlibc version, which was ripped elsewhere ;) */
80void
81getpass (unsigned char *buf, unsigned int buf_len)
82{
83 int tty_fd;
84 unsigned int buf_just,
85 buf_read = 0;
86 termios t_backup,
87 t_noecho;
88
89
90 tty_fd = open ("/dev/tty", O_RDWR, 0);
91 if (tty_fd < 0)
92 _exit (73);
93
94 /* set terminal to non-echo'ing mode */
95 if (ioctl (tty_fd, TCGETS, (unsigned long int) &t_backup) != 0)
96 _exit (73);
97
98 memcpy (&t_noecho, &t_backup, sizeof (t_backup));
99 t_noecho.c_lflag &= ~(ECHO | ISIG);
100 if (ioctl (tty_fd, TCSETSF, (unsigned long int) &t_noecho) != 0)
101 _exit (73);
102
103 write (tty_fd, "password: ", 10);
104
105 do {
106 buf_just = read (tty_fd, buf + buf_read, buf_len - buf_read);
107 if (buf_just < 0)
108 _exit (73);
109
110 buf_read += buf_just;
111 } while (buf_read < buf_len && buf[buf_read - 1] != '\n');
112
113 buf[buf_read > 0 ? (buf_read - 1) : 0] = '\0';
114 buf[buf_len - 1] = '\0';
115 write (tty_fd, "\n", 1);
116
117 if (ioctl (tty_fd, TCSETSF, (unsigned long int) &t_backup) != 0)
118 _exit (73);
119 close (tty_fd);
120
121 return;
122}
123
124
125void
126write_tty (unsigned char *buf, unsigned int buf_len)
127{
128 int tty_fd;
129
130
131 tty_fd = open ("/dev/tty", O_RDWR, 0);
132 if (tty_fd < 0)
133 return;
134
135 write (tty_fd, buf, buf_len);
136 close (tty_fd);
137}
138
139
diff --git a/other/burneye/src/stub/helper.h b/other/burneye/src/stub/helper.h
new file mode 100644
index 0000000..20bf88e
--- /dev/null
+++ b/other/burneye/src/stub/helper.h
@@ -0,0 +1,32 @@
1/* helper functions include file
2 */
3
4#ifndef HELPER_H
5#define HELPER_H
6
7#ifdef VDEBUG
8#include <stdarg.h>
9#endif
10
11#ifndef NULL
12#define NULL ((void *) 0)
13#endif
14
15#ifndef VDEBUG
16#define be_printf(str,a...)
17#else
18void be_printf (char *str, ...);
19int vsnprintf(char *str, int count, const char *fmt, va_list args);
20#endif
21
22int memcmp (void *dst, void *src, unsigned int len);
23void memcpy (void *dst, void *src, unsigned int len);
24void memset (void *dst, unsigned char c, unsigned int len);
25int strlen (unsigned char *str);
26
27void getpass (unsigned char *buf, unsigned int buf_len);
28void write_tty (unsigned char *buf, unsigned int buf_len);
29
30#endif
31
32
diff --git a/other/burneye/src/stub/include/int80-test.c b/other/burneye/src/stub/include/int80-test.c
new file mode 100644
index 0000000..9e87ab5
--- /dev/null
+++ b/other/burneye/src/stub/include/int80-test.c
@@ -0,0 +1,9 @@
1
2#include "int80.h"
3
4int
5main (int argc, char *argv[])
6{
7 lseek (0, 10, 20);
8}
9
diff --git a/other/burneye/src/stub/include/int80-test.o b/other/burneye/src/stub/include/int80-test.o
new file mode 100644
index 0000000..a2418b1
--- /dev/null
+++ b/other/burneye/src/stub/include/int80-test.o
Binary files differ
diff --git a/other/burneye/src/stub/include/int80.h b/other/burneye/src/stub/include/int80.h
new file mode 100644
index 0000000..25d05b0
--- /dev/null
+++ b/other/burneye/src/stub/include/int80.h
@@ -0,0 +1,437 @@
1/* from hellkit by stealth
2 */
3
4#ifndef INT80_H
5#define INT80_H
6
7#include "unistd.h"
8
9#ifndef _I386_FCNTL_H
10#define O_RDONLY 00
11#define O_WRONLY 01
12#define O_RDWR 02
13#define O_CREAT 0100
14#define O_TRUNC 01000
15#define O_APPEND 02000
16#define F_DUPFD 0 /* Duplicate file descriptor. */
17#define F_GETFD 1 /* Get file descriptor flags. */
18#define F_SETFD 2 /* Set file descriptor flags. */
19#define F_GETFL 3 /* Get file status flags. */
20#define F_SETFL 4 /* Set file status flags. */
21#endif
22
23/* from bits/termios.h */
24#define TCGETS 0x5401
25#define TCSETS 0x5402
26#define TCSETSW 0x5403
27#define TCSETSF 0x5404
28
29#define ISIG 0000001
30#define ECHO 0000010
31
32
33typedef unsigned char cc_t;
34typedef unsigned int speed_t;
35typedef unsigned int tcflag_t;
36
37#define NCCS 32
38
39typedef struct {
40 tcflag_t c_iflag; /* input mode flags */
41 tcflag_t c_oflag; /* output mode flags */
42 tcflag_t c_cflag; /* control mode flags */
43 tcflag_t c_lflag; /* local mode flags */
44 cc_t c_line; /* line discipline */
45 cc_t c_cc[NCCS]; /* control characters */
46 speed_t c_ispeed; /* input speed */
47 speed_t c_ospeed; /* output speed */
48} termios;
49
50/* from bits/utsname.h and sys/utsname.h */
51#define _UTSNAME_LENGTH 65
52#define _UTSNAME_DOMAIN_LENGTH _UTSNAME_LENGTH
53#define _UTSNAME_NODENAME_LENGTH _UTSNAME_LENGTH
54
55struct utsname {
56 char sysname[_UTSNAME_LENGTH];
57 char nodename[_UTSNAME_NODENAME_LENGTH];
58 char release[_UTSNAME_LENGTH];
59 char version[_UTSNAME_LENGTH];
60 char machine[_UTSNAME_LENGTH];
61 char domainname[_UTSNAME_DOMAIN_LENGTH];
62};
63
64
65/* from bits/mman.h */
66#define PROT_READ 0x1
67#define PROT_WRITE 0x2
68#define PROT_EXEC 0x4
69#define PROT_NONE 0x0
70#define MAP_SHARED 0x01
71#define MAP_PRIVATE 0x02
72#define MAP_TYPE 0x0f
73#define MAP_FIXED 0x10
74#define MAP_ANONYMOUS 0x20
75
76/* from unistd.h */
77#define SEEK_SET 0
78#define SEEK_CUR 1
79#define SEEK_END 2
80
81extern int errno;
82
83#if 0
84/* XXX: one would have to make a wrap-around cpp script to avoid defining
85 * the functions in their code as it happens now :/ that is the reason
86 * why we include every function un-macro'd
87 */
88_syscall3(int,lseek,int,fd,long,offset,int,whence);
89#endif
90
91static int mmap (void *start, long length, int prot, int flags,
92 int fd, long offset)
93{
94 long ret;
95
96 __asm__ __volatile__ ( "int $0x80"
97 : "=a" (ret)
98 : "a" (__NR_mmap), "b" (&start));
99
100 return (ret);
101}
102
103
104static inline int munmap (char *start, int length)
105{
106 long ret;
107
108 __asm__ __volatile__ ("pushl %%ebx\n\t"
109 "movl %%esi, %%ebx\n\t"
110 "int $0x80"
111 :"=a" (ret)
112 :"0" (__NR_munmap), "S" ((long)start),
113 "c" ((int)length): "bx");
114 return ret;
115}
116
117static inline int ioctl (int d, int request, int argp)
118{
119 long ret;
120
121 __asm__ __volatile__ ("pushl %%ebx\n\t"
122 "movl %%esi, %%ebx\n\t"
123 "int $0x80"
124 :"=a" (ret)
125 :"0" (__NR_ioctl), "S" ((long)d),
126 "c" ((long)request), "d" ((long)argp): "bx");
127 return ret;
128}
129
130static inline int fcntl (int fd, int cmd, long arg)
131{
132 long ret;
133
134 __asm__ __volatile__ ("pushl %%ebx\n\t"
135 "movl %%esi, %%ebx\n\t"
136 "int $0x80"
137 :"=a" (ret)
138 :"0" (__NR_fcntl), "S" ((long)fd),
139 "c" ((long)cmd), "d" ((long)arg): "bx");
140 return ret;
141}
142
143static inline int lseek (int fd, unsigned long int offset, int whence)
144{
145 long ret;
146
147 __asm__ __volatile__ ("pushl %%ebx\n\t"
148 "movl %%esi, %%ebx\n\t"
149 "int $0x80"
150 :"=a" (ret)
151 :"0" (__NR_lseek), "S" ((long)fd),
152 "c" ((long)offset), "d" ((long)whence): "bx");
153 return ret;
154}
155
156static inline int mprotect(void *addr, long len, int prot)
157{
158 long ret;
159
160 __asm__ __volatile__ ("pushl %%ebx\n\t"
161 "movl %%esi, %%ebx\n\t"
162 "int $0x80"
163 :"=a" (ret)
164 :"0" (__NR_mprotect), "S" ((long)addr),
165 "c" ((long)len), "d" ((long)prot): "bx");
166 return ret;
167}
168
169
170static inline int read(int fd, void *buf, long count)
171{
172 long ret;
173
174 __asm__ __volatile__ ("pushl %%ebx\n\t"
175 "movl %%esi, %%ebx\n\t"
176 "int $0x80"
177 :"=a" (ret)
178 :"0" (__NR_read), "S" ((long)fd),
179 "c" ((long)buf), "d" ((long)count): "bx");
180 return ret;
181}
182
183
184static inline int write(int fd, void *buf, long count)
185{
186 long ret;
187
188 __asm__ __volatile__ ("pushl %%ebx\n\t"
189 "movl %%esi, %%ebx\n\t"
190 "int $0x80"
191 :"=a" (ret)
192 :"0" (__NR_write), "S" ((int)fd),
193 "c" ((long)buf), "d" ((long)count): "bx");
194 return ret;
195}
196
197
198static inline int execve(char *s, char **argv, char **envp)
199{
200 long ret;
201
202 __asm__ __volatile__ ("pushl %%ebx\n\t"
203 "movl %%esi, %%ebx\n\t"
204 "int $0x80"
205 :"=a" (ret)
206 :"0" (__NR_execve), "S" ((long)s),
207 "c" ((long)argv), "d" ((long)envp): "bx");
208 return ret;
209}
210
211
212static inline int setreuid(int reuid, int euid)
213{
214 long ret;
215
216 __asm__ __volatile__ ("pushl %%ebx\n\t"
217 "movl %%esi, %%ebx\n\t"
218 "int $0x80"
219 :"=a" (ret)
220 :"0" (__NR_setreuid), "S" ((long)reuid),
221 "c" ((long)euid): "bx");
222 return ret;
223}
224
225static inline int uname(struct utsname *un)
226{
227 long ret;
228
229 __asm__ __volatile__ ("pushl %%ebx\n\t"
230 "movl %%esi, %%ebx\n\t"
231 "int $0x80"
232 :"=a" (ret)
233 :"0" (__NR_uname), "S" ((long)un): "bx");
234 return ret;
235}
236
237static inline int unlink(char *pathname)
238{
239 long ret;
240
241 __asm__ __volatile__ ("pushl %%ebx\n\t"
242 "movl %%esi, %%ebx\n\t"
243 "int $0x80"
244 :"=a" (ret)
245 :"0" (__NR_unlink), "S" ((long)pathname): "bx");
246 return ret;
247}
248
249static inline int chroot(char *path)
250{
251 long ret;
252
253 __asm__ __volatile__ ("pushl %%ebx\n\t"
254 "movl %%esi, %%ebx\n\t"
255 "int $0x80"
256 :"=a" (ret)
257 :"0" (__NR_chroot), "S" ((long)path): "bx");
258 return ret;
259}
260
261static inline int brk(void *addr)
262{
263 long ret;
264
265 __asm__ __volatile__ ("pushl %%ebx\n\t"
266 "movl %%esi, %%ebx\n\t"
267 "int $0x80"
268 :"=a" (ret)
269 :"0" (__NR_brk), "S" (addr): "bx");
270 return (ret);
271}
272
273static inline int _exit(int level)
274{
275 long ret;
276
277 __asm__ __volatile__ ("pushl %%ebx\n\t"
278 "movl %%esi, %%ebx\n\t"
279 "int $0x80"
280 :"=a" (ret)
281 :"0" (__NR_exit), "S" (level): "bx");
282 return (ret);
283}
284
285static inline int dup(int fd)
286{
287 long ret;
288
289 __asm__ __volatile__ ("pushl %%ebx\n\t"
290 "movl %%esi, %%ebx\n\t"
291 "int $0x80"
292 :"=a" (ret)
293 :"0" (__NR_dup), "S" (fd): "bx");
294 return ret;
295}
296
297
298static inline int dup2(int ofd, int nfd)
299{
300 long ret;
301
302 __asm__ __volatile__ ("pushl %%ebx\n\t"
303 "movl %%esi, %%ebx\n\t"
304 "int $0x80"
305 :"=a" (ret)
306 :"0" (__NR_dup2), "S" (ofd), "c" (nfd): "bx");
307 return ret;
308}
309
310
311static inline int open(char *path, int mode, int flags)
312{
313 long ret;
314
315 __asm__ __volatile__ ("pushl %%ebx\n\t"
316 "movl %%esi, %%ebx\n\t"
317 "int $0x80"
318 :"=a" (ret)
319 :"0" (__NR_open), "S" ((long)path),
320 "c" ((int)mode), "d" ((int)flags): "bx");
321 return ret;
322}
323
324
325
326static inline int chdir(char *path)
327{
328 long ret;
329
330 __asm__ __volatile__ ("pushl %%ebx\n\t"
331 "movl %%esi, %%ebx\n\t"
332 "int $0x80"
333 :"=a" (ret)
334 :"0" (__NR_chdir), "S" ((long)path): "bx");
335 return ret;
336}
337
338static inline int close(int fd)
339{
340 long ret;
341
342 __asm__ __volatile__ ("pushl %%ebx\n\t"
343 "movl %%esi, %%ebx\n\t"
344 "int $0x80"
345 :"=a" (ret)
346 :"0" (__NR_close), "S" ((int)fd): "bx");
347 return ret;
348}
349
350
351static inline int chown(char *path, int uid, int gid)
352{
353 long ret;
354
355 __asm__ __volatile__ ("pushl %%ebx\n\t"
356 "movl %%esi, %%ebx\n\t"
357 "int $0x80"
358 :"=a" (ret)
359 :"0" (__NR_chown), "S" ((long)path),
360 "c" ((int)uid), "d" ((int)gid): "bx");
361 return ret;
362}
363
364static inline int rename(char *oldpath, char *newpath)
365{
366 long ret;
367
368 __asm__ __volatile__ ("pushl %%ebx\n\t"
369 "movl %%esi, %%ebx\n\t"
370 "int $0x80"
371 :"=a" (ret)
372 :"0" (__NR_rename), "S" ((long)oldpath),
373 "c" ((int)newpath): "bx");
374 return ret;
375}
376
377static inline int chmod(char *path, int mode)
378{
379 long ret;
380
381 __asm__ __volatile__ ("pushl %%ebx\n\t"
382 "movl %%esi, %%ebx\n\t"
383 "int $0x80"
384 :"=a" (ret)
385 :"0" (__NR_chmod), "S" ((long)path),
386 "c" ((int)mode): "bx");
387 return ret;
388}
389
390static inline int sync(void)
391{
392 long ret;
393
394 __asm__ __volatile__ ("int $0x80"
395 :"=a" (ret)
396 :"0" (__NR_sync));
397
398 return (ret);
399}
400
401static inline int fork(void)
402{
403 long ret;
404
405 __asm__ __volatile__ ("int $0x80"
406 :"=a" (ret)
407 :"0" (__NR_fork));
408
409 return (ret);
410}
411
412static inline int antistrace(void)
413{
414 long ret;
415
416 __asm__ __volatile__ ("int $0x03\n\t"
417 :"=a" (ret)
418 : );
419 return (ret);
420}
421
422#define SIGTRAP 5
423
424static inline int signal(int signum, void *handler)
425{
426 long ret;
427
428 __asm__ __volatile__ ("int $0x80"
429 :"=a" (ret)
430 :"0" (__NR_signal), "b" ((long)signum),
431 "c" ((int)handler));
432 return ret;
433}
434
435
436#endif
437
diff --git a/other/burneye/src/stub/include/unistd.h b/other/burneye/src/stub/include/unistd.h
new file mode 100644
index 0000000..cc8537b
--- /dev/null
+++ b/other/burneye/src/stub/include/unistd.h
@@ -0,0 +1,280 @@
1#ifndef ASM_I386_UNISTD_H
2#define ASM_I386_UNISTD_H
3
4#ifndef NULL
5#define NULL ((void *) 0x0)
6#endif
7/*
8 * This file contains the system call numbers.
9 */
10
11#define __NR_exit 1
12#define __NR_fork 2
13#define __NR_read 3
14#define __NR_write 4
15#define __NR_open 5
16#define __NR_close 6
17#define __NR_waitpid 7
18#define __NR_creat 8
19#define __NR_link 9
20#define __NR_unlink 10
21#define __NR_execve 11
22#define __NR_chdir 12
23#define __NR_time 13
24#define __NR_mknod 14
25#define __NR_chmod 15
26#define __NR_lchown 16
27#define __NR_break 17
28#define __NR_oldstat 18
29#define __NR_lseek 19
30#define __NR_getpid 20
31#define __NR_mount 21
32#define __NR_umount 22
33#define __NR_setuid 23
34#define __NR_getuid 24
35#define __NR_stime 25
36#define __NR_ptrace 26
37#define __NR_alarm 27
38#define __NR_oldfstat 28
39#define __NR_pause 29
40#define __NR_utime 30
41#define __NR_stty 31
42#define __NR_gtty 32
43#define __NR_access 33
44#define __NR_nice 34
45#define __NR_ftime 35
46#define __NR_sync 36
47#define __NR_kill 37
48#define __NR_rename 38
49#define __NR_mkdir 39
50#define __NR_rmdir 40
51#define __NR_dup 41
52#define __NR_pipe 42
53#define __NR_times 43
54#define __NR_prof 44
55#define __NR_brk 45
56#define __NR_setgid 46
57#define __NR_getgid 47
58#define __NR_signal 48
59#define __NR_geteuid 49
60#define __NR_getegid 50
61#define __NR_acct 51
62#define __NR_umount2 52
63#define __NR_lock 53
64#define __NR_ioctl 54
65#define __NR_fcntl 55
66#define __NR_mpx 56
67#define __NR_setpgid 57
68#define __NR_ulimit 58
69#define __NR_oldolduname 59
70#define __NR_umask 60
71#define __NR_chroot 61
72#define __NR_ustat 62
73#define __NR_dup2 63
74#define __NR_getppid 64
75#define __NR_getpgrp 65
76#define __NR_setsid 66
77#define __NR_sigaction 67
78#define __NR_sgetmask 68
79#define __NR_ssetmask 69
80#define __NR_setreuid 70
81#define __NR_setregid 71
82#define __NR_sigsuspend 72
83#define __NR_sigpending 73
84#define __NR_sethostname 74
85#define __NR_setrlimit 75
86#define __NR_getrlimit 76
87#define __NR_getrusage 77
88#define __NR_gettimeofday 78
89#define __NR_settimeofday 79
90#define __NR_getgroups 80
91#define __NR_setgroups 81
92#define __NR_select 82
93#define __NR_symlink 83
94#define __NR_oldlstat 84
95#define __NR_readlink 85
96#define __NR_uselib 86
97#define __NR_swapon 87
98#define __NR_reboot 88
99#define __NR_readdir 89
100#define __NR_mmap 90
101#define __NR_munmap 91
102#define __NR_truncate 92
103#define __NR_ftruncate 93
104#define __NR_fchmod 94
105#define __NR_fchown 95
106#define __NR_getpriority 96
107#define __NR_setpriority 97
108#define __NR_profil 98
109#define __NR_statfs 99
110#define __NR_fstatfs 100
111#define __NR_ioperm 101
112#define __NR_socketcall 102
113#define __NR_syslog 103
114#define __NR_setitimer 104
115#define __NR_getitimer 105
116#define __NR_stat 106
117#define __NR_lstat 107
118#define __NR_fstat 108
119#define __NR_olduname 109
120#define __NR_iopl 110
121#define __NR_vhangup 111
122#define __NR_idle 112
123#define __NR_vm86old 113
124#define __NR_wait4 114
125#define __NR_swapoff 115
126#define __NR_sysinfo 116
127#define __NR_ipc 117
128#define __NR_fsync 118
129#define __NR_sigreturn 119
130#define __NR_clone 120
131#define __NR_setdomainname 121
132#define __NR_uname 122
133#define __NR_modify_ldt 123
134#define __NR_adjtimex 124
135#define __NR_mprotect 125
136#define __NR_sigprocmask 126
137#define __NR_create_module 127
138#define __NR_init_module 128
139#define __NR_delete_module 129
140#define __NR_get_kernel_syms 130
141#define __NR_quotactl 131
142#define __NR_getpgid 132
143#define __NR_fchdir 133
144#define __NR_bdflush 134
145#define __NR_sysfs 135
146#define __NR_personality 136
147#define __NR_afs_syscall 137 /* Syscall for Andrew File System */
148#define __NR_setfsuid 138
149#define __NR_setfsgid 139
150#define __NR__llseek 140
151#define __NR_getdents 141
152#define __NR__newselect 142
153#define __NR_flock 143
154#define __NR_msync 144
155#define __NR_readv 145
156#define __NR_writev 146
157#define __NR_getsid 147
158#define __NR_fdatasync 148
159#define __NR__sysctl 149
160#define __NR_mlock 150
161#define __NR_munlock 151
162#define __NR_mlockall 152
163#define __NR_munlockall 153
164#define __NR_sched_setparam 154
165#define __NR_sched_getparam 155
166#define __NR_sched_setscheduler 156
167#define __NR_sched_getscheduler 157
168#define __NR_sched_yield 158
169#define __NR_sched_get_priority_max 159
170#define __NR_sched_get_priority_min 160
171#define __NR_sched_rr_get_interval 161
172#define __NR_nanosleep 162
173#define __NR_mremap 163
174#define __NR_setresuid 164
175#define __NR_getresuid 165
176#define __NR_vm86 166
177#define __NR_query_module 167
178#define __NR_poll 168
179#define __NR_nfsservctl 169
180#define __NR_setresgid 170
181#define __NR_getresgid 171
182#define __NR_prctl 172
183#define __NR_rt_sigreturn 173
184#define __NR_rt_sigaction 174
185#define __NR_rt_sigprocmask 175
186#define __NR_rt_sigpending 176
187#define __NR_rt_sigtimedwait 177
188#define __NR_rt_sigqueueinfo 178
189#define __NR_rt_sigsuspend 179
190#define __NR_pread 180
191#define __NR_pwrite 181
192#define __NR_chown 182
193#define __NR_getcwd 183
194#define __NR_capget 184
195#define __NR_capset 185
196#define __NR_sigaltstack 186
197#define __NR_sendfile 187
198#define __NR_getpmsg 188 /* some people actually want streams */
199#define __NR_putpmsg 189 /* some people actually want streams */
200#define __NR_vfork 190
201
202/* user-visible error numbers are in the range -1 - -122: see <asm-i386/errno.h> */
203
204#define __syscall_return(type, res) \
205do { \
206 if ((unsigned long)(res) >= (unsigned long)(-125)) { \
207 errno = -(res); \
208 res = -1; \
209 } \
210 return (type) (res); \
211} while (0)
212
213/* XXX - _foo needs to be __foo, while __NR_bar could be _NR_bar. */
214#define _syscall0(type,name) \
215type name(void) \
216{ \
217long __res; \
218__asm__ volatile ("int $0x80" \
219 : "=a" (__res) \
220 : "0" (__NR_##name)); \
221__syscall_return(type,__res); \
222}
223
224#define _syscall1(type,name,type1,arg1) \
225type name(type1 arg1) \
226{ \
227long __res; \
228__asm__ volatile ("int $0x80" \
229 : "=a" (__res) \
230 : "0" (__NR_##name),"b" ((long)(arg1))); \
231__syscall_return(type,__res); \
232}
233
234#define _syscall2(type,name,type1,arg1,type2,arg2) \
235type name(type1 arg1,type2 arg2) \
236{ \
237long __res; \
238__asm__ volatile ("int $0x80" \
239 : "=a" (__res) \
240 : "0" (__NR_##name),"b" ((long)(arg1)),"c" ((long)(arg2))); \
241__syscall_return(type,__res); \
242}
243
244#define _syscall3(type,name,type1,arg1,type2,arg2,type3,arg3) \
245type name(type1 arg1,type2 arg2,type3 arg3) \
246{ \
247long __res; \
248__asm__ volatile ("int $0x80" \
249 : "=a" (__res) \
250 : "0" (__NR_##name),"b" ((long)(arg1)),"c" ((long)(arg2)), \
251 "d" ((long)(arg3))); \
252__syscall_return(type,__res); \
253}
254
255#define _syscall4(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4) \
256type name (type1 arg1, type2 arg2, type3 arg3, type4 arg4) \
257{ \
258long __res; \
259__asm__ volatile ("int $0x80" \
260 : "=a" (__res) \
261 : "0" (__NR_##name),"b" ((long)(arg1)),"c" ((long)(arg2)), \
262 "d" ((long)(arg3)),"S" ((long)(arg4))); \
263__syscall_return(type,__res); \
264}
265
266#define _syscall5(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4, \
267 type5,arg5) \
268type name (type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5) \
269{ \
270long __res; \
271__asm__ volatile ("int $0x80" \
272 : "=a" (__res) \
273 : "0" (__NR_##name),"b" ((long)(arg1)),"c" ((long)(arg2)), \
274 "d" ((long)(arg3)),"S" ((long)(arg4)),"D" ((long)(arg5))); \
275__syscall_return(type,__res); \
276}
277
278
279#endif /* _ASM_I386_UNISTD_H_ */
280
diff --git a/other/burneye/src/stub/init.asm b/other/burneye/src/stub/init.asm
new file mode 100644
index 0000000..3633dab
--- /dev/null
+++ b/other/burneye/src/stub/init.asm
@@ -0,0 +1,158 @@
1; burneye initialization function
2
3 GLOBAL be_entry
4
5 EXTERN burneye
6
7; this is the central entry point of the program
8; we have to take care about not destorying the kernel supplied auxv's
9;
10
11; WARNING: this code is quite unclean, you do not want to mess with it, really
12
13be_entry:
14 pushf
15
16 ; ebx = addr, ecx = len, edx = prot
17; mov ebx, 0x05370000 ; addr
18; mov edx, 0x0007 ; PROT_READ | PROT_WRITE | PROT_EXEC
19; mov ecx, be_payload
20; mov ecx, 0x0000b000
21; sub ecx, 0x05371000
22
23; mov eax, 0x7d ; __NR_mprotect
24; int 0x80
25
26 pop ebx
27
28 mov esi, esp
29 call be_auxv ; ecx = number of vectors, edx = base
30 mov ebp, edx ; base of auxv
31
32 cmp ecx, 32 ; more than 32 vectors
33 jl rel_auxv ; not enough -> relocate
34
35 xor eax, eax
36 jmp do_auxv
37
38 ; we need eax more vectors
39rel_auxv:
40 mov eax, 32
41 sub eax, ecx
42 shl eax, 3 ; * 8
43
44do_auxv:
45 mov esi, esp
46 sub esp, eax
47 mov edi, esp
48 sub ebp, eax
49
50 ; relocate auxiliary vectors
51 call be_auxvreloc ; in: esi = &argc ; out: edx = env[0]
52
53 pop eax ; eax = argc
54 push eax
55 push ebx ; SAVE flag register
56
57 push eax ; argc
58 mov eax, esp
59 add eax, 12 ; &argv[0]
60 push eax
61
62 push edx ; env
63 push ebp ; lowest vector
64 push ecx ; number of real vectors, space is for 32
65 call burneye ; returns: eax = entry point of rtld/exe
66 add esp, (5 * 4)
67
68 pop ebx ; RESTORE flag register
69 push eax ; save entry point on stack, to 'ret' to
70
71 ; make an 'oops... i did it again' virgin stack space
72%define BRITNEY 1024
73 lea edi, [esp - 4 * BRITNEY]
74 pusha
75 sub esp, (BRITNEY * 4)
76 mov ecx, BRITNEY
77 xor eax, eax
78 rep stosd ; zap array
79 add esp, (BRITNEY * 4)
80
81 ; thanks to john reiser <jreister@bitwagon.com> for fixing this nasty
82 ; bug :-)
83 push ebx ; i hate x86 register poorness
84 popf ; restore original flags
85 push dword 0 ; clear stack element
86 pop ebx
87
88
89%ifdef VDEBUG
90 int3 ; FINAL BREAKPOINT
91%endif
92
93 popa ; all regs except eip/esp are zero'ed now
94 ret ; return to entry point of ld-linux.so.*
95
96
97; be_auxvreloc, insert
98;
99; in: esi = source &argc, edi = dest
100; out: edi = &old_auxv[AT_NULL]
101;
102
103be_auxvreloc:
104rarg: lodsd
105 stosd
106 or eax, eax
107 jnz be_auxvreloc
108
109 mov edx, edi ; new &env[0]
110renv: lodsd
111 stosd
112 or eax, eax
113 jnz renv
114
115raux: lodsd
116 stosd
117 or eax, eax
118 lodsd
119 stosd
120 jnz raux
121
122 sub edi, 8
123 ret
124
125; be_auxv, find and count aux vectors
126;
127; stack looks like (at esi);
128; <argc> <argc pointers> <NULL> <env[0], env[1], ...> <NULL> <aux> <env>
129be_auxv:
130 ; skip arguments
131 lodsd
132 shl eax, 2
133 add eax, 4
134 add esi, eax
135
136 ; skip environment
137skenv: lodsd
138 or eax, eax
139 jnz skenv
140
141 xor ecx, ecx ; counter = 0
142 mov edx, esi ; &auxv[0]
143skaux: lodsd
144 inc ecx
145 or eax, eax
146 lodsd
147 jnz skaux
148
149 ; we have ecx vectors now, INCLUDING the AT_NULL vector
150 ret
151
152; be_findenv, find environment pointer array
153;
154; esi = pointer to lowest vector
155;
156; return: esi = env[0]
157;
158
diff --git a/other/burneye/src/stub/lde-test b/other/burneye/src/stub/lde-test
new file mode 100644
index 0000000..fce700b
--- /dev/null
+++ b/other/burneye/src/stub/lde-test
Binary files differ
diff --git a/other/burneye/src/stub/lde-test.c b/other/burneye/src/stub/lde-test.c
new file mode 100644
index 0000000..b43e9f9
--- /dev/null
+++ b/other/burneye/src/stub/lde-test.c
@@ -0,0 +1,62 @@
1/* lde testing
2 */
3
4#include <stdio.h>
5#include <stdlib.h>
6#include "lde32.h"
7
8
9int disasm_me (int a, int b);
10
11
12int
13main (int argc, char *argv[])
14{
15 int n,
16 len;
17 unsigned char * d;
18 unsigned char lde_data[2048];
19
20
21 memset (lde_data, '\0', sizeof (lde_data));
22 lde_init ((lde_table *) lde_data);
23
24 for (d = (unsigned char *) disasm_me ; *d != 0xcc ; d += len) {
25
26 len = lde_dis (d, (lde_table *) lde_data);
27
28 if (len <= 0) {
29 fprintf (stderr, "len = %d\n", len);
30
31 exit (EXIT_FAILURE);
32 }
33
34 printf ("0x%08lx [%2d]: ", (unsigned long int) d, len);
35 for (n = 0 ; n < len ; ++n)
36 printf ("%02x ", d[n]);
37
38 printf ("\n");
39 }
40
41 exit (EXIT_SUCCESS);
42}
43
44
45int
46disasm_me (int a, int b)
47{
48 a *= b;
49 a >>= (b & 0x04);
50 a += b & ~0x04;
51 a ^= b;
52 b ^= a;
53 a ^= b;
54 a ^= ~b;
55 b *= a | b;
56
57 return (a + b);
58
59 asm ("int3");
60}
61
62
diff --git a/other/burneye/src/stub/lde32.asm b/other/burneye/src/stub/lde32.asm
new file mode 100644
index 0000000..4eacf3a
--- /dev/null
+++ b/other/burneye/src/stub/lde32.asm
@@ -0,0 +1,345 @@
1
2; LDE32 -- Length-Disassembler Engine
3; FREEWARE
4;
5; programmed by Z0MBiE, http://z0mbie.cjb.net
6;
7; release 1.00 8-12-99
8; release 1.01 9-12-99
9; release 1.02 17-03-00 0xF6/0xF7 'test' opcode bugfixed
10; release 1.03 21-04-00 bugfix: some prefixes before 0F were cleared
11; bugfix: error in MODRM analysis
12; CD 20 now is 6 bytes length
13; release 1.04 1-05-00 AAM & AAD bugfixed (was 1-byte len)
14; release 1.05 xx-xx-xx special edition, flags changed
15; release 1.06 3-01-01 partially rewritten, __cdecl
16
17; some very small mods/changes by scut to compile under nasm
18
19
20C_ERROR equ -1 ; never change it
21
22C_MEM1 equ 0x0001 ; |
23C_MEM2 equ 0x0002 ; |may be used simultaneously
24C_MEM4 equ 0x0004 ; |
25C_DATA1 equ 0x0100 ; |
26C_DATA2 equ 0x0200 ; |may be used simultaneously
27C_DATA4 equ 0x0400 ; |
28C_67 equ 0x0010 ; used with C_PREFIX
29C_MEM67 equ 0x0020 ; C_67 ? C_MEM2 : C_MEM4
30C_66 equ 0x1000 ; used with C_PREFIX
31C_DATA66 equ 0x2000 ; C_66 ? C_DATA2 : C_DATA4
32C_PREFIX equ 0x0008 ; prefix. take opcode again
33C_MODRM equ 0x4000 ; MODxxxR/M
34C_DATAW0 equ 0x8000 ; opc&1 ? C_DATA66 : C_DATA1
35
36
37; void __cdecl lde_init(void* tableptr);
38
39 BITS 32
40
41 GLOBAL lde_init
42
43lde_init:
44 pusha
45 mov edi, [esp+32+4]
46 cld
47
48 ; Huffman-compressed 2048-byte table
49 xor eax, eax
50 push eax
51 push eax
52 push eax
53 push dword 0x002AAA800
54 push dword 0x03FFF687F
55 push dword 0x0FFE6DEA0
56 push dword 0x0DBD5FFFF
57 push dword 0x0FFFEAAAA
58 push dword 0x0AAAAAAAA
59 push dword 0x0AAAA0000
60 push eax
61 push eax
62 push eax
63 push eax
64 push eax
65 push eax
66 push dword 0x000000154
67 push dword 0x041FFF555
68 push dword 0x055DEDDAA
69 push dword 0x019955111
70 push dword 0x011111FFF
71 push dword 0x0FA11FFAA
72 push dword 0x08E60CF96
73 push dword 0x0FC72D6AA
74 push dword 0x0AAAAAA88
75 push dword 0x0888888D5
76 push dword 0x0528D559B
77 push dword 0x0366CD553
78 push dword 0x0355555FF
79 push dword 0x0FFFED6F9
80 push dword 0x068888888
81 push dword 0x088888888
82 push dword 0x08D5347CA
83 push dword 0x0DCC67BDF
84 push dword 0x0AAAAAAAA
85 push dword 0x0AAAAAAAA
86 push dword 0x0ABA94FFD
87 push dword 0x0D4A7FEEA
88 push dword 0x053FF7529
89 push dword 0x0FFA4A7FE
90 push dword 0x0929FFA4A
91 push dword 0x07FE929FF
92
93 mov ecx, 512
94 xor ebx, ebx
95cycle: xor eax, eax
96 call tree
97 stosd
98 loop cycle
99
100 popa
101 retn
102
103getbit: or ebx, ebx
104 jnz skip
105 pop ebp
106 pop esi
107 pop edx
108 push esi
109 push ebp
110 mov bl, 32
111skip: dec ebx
112 shr edx, 1
113 retn
114
115 ; Huffman-tree, compiled into decompressor code
116tree: call getbit
117 jnc tree0
118tree1: call getbit
119 jnc tree10
120tree11: mov ah, (C_MODRM >> 8)
121 retn
122tree10: call getbit
123 jc tree101
124tree100:
125 call getbit
126 jnc tree1000
127tree1001:
128 call getbit
129 jnc tree10010
130tree10011:
131 call getbit
132 jc tree100111
133tree100110:
134 call getbit
135 jnc tree1001100
136tree1001101:
137 mov al, C_MEM67
138 retn
139tree1001100:
140 call getbit
141 jnc tree10011000
142tree10011001:
143 mov ax, C_DATA66+C_MEM2
144 retn
145tree10011000:
146 call getbit
147 jnc tree100110000
148tree100110001:
149 mov ax, C_PREFIX+C_66
150 retn
151tree100110000:
152 mov ah, ((C_DATA2+C_DATA1) >> 8)
153 retn
154tree100111:
155 call getbit
156 jnc tree1001110
157tree1001111:
158 mov ah, ((C_MODRM+C_DATA66) >> 8)
159 retn
160tree1001110:
161 call getbit
162 jnc tree10011100
163tree10011101:
164 mov al, C_PREFIX+C_67
165 retn
166tree10011100:
167 mov ah, (C_DATA2 >> 8)
168 retn
169tree10010:
170 mov ah, (C_DATAW0 >> 8)
171 retn
172tree1000:
173 mov ah, (C_DATA1 >> 8)
174 retn
175tree101:
176 call getbit
177 jnc tree1010
178tree1011:
179 call getbit
180 jnc tree10110
181tree10111:
182 mov al, C_PREFIX
183 retn
184tree10110:
185 mov ah, ((C_MODRM+C_DATA1) >> 8)
186 retn
187tree1010:
188 mov ah, (C_DATA66 >> 8)
189 retn
190tree0: call getbit
191; jc tree01
192 adc al, 0
193tree00: dec eax
194tree01: retn
195
196
197; int __cdecl lde_dis(void* opcodeptr, void* tableptr)
198; {
199
200; returns opcode length in EAX or -1 if error
201
202 GLOBAL lde_dis
203
204lde_dis:
205 pusha
206
207 mov esi, [esp+32+4] ; tableptr
208 mov ecx, [esp+32+8] ; param = opcode ptr
209
210 xor edx, edx ; flags
211 xor eax, eax
212
213prefix: and dl, ~C_PREFIX
214
215 mov al, [ecx]
216 inc ecx
217
218 or edx, [esi+eax*4]
219
220 test dl, C_PREFIX
221 jnz prefix
222
223 cmp al, 0xf6
224 je btest
225 cmp al, 0xf7
226 je btest
227
228 cmp al, 0xcd
229 je bint
230
231 cmp al, 0x0f
232 je b0F
233
234cont: test dh, (C_DATAW0 >> 8)
235 jnz dataw0
236
237dataw0done:
238 test dh, (C_MODRM >> 8)
239 jnz near modrm
240
241exitmodrm:
242 test dl, C_MEM67
243 jnz mem67
244
245mem67done:
246 test dh, (C_DATA66 >> 8)
247 jnz data66
248
249data66done:
250 mov eax, ecx
251 sub eax, [esp+32+8]
252
253 and edx, C_MEM1+C_MEM2+C_MEM4 + C_DATA1+C_DATA2+C_DATA4
254 add al, dl
255 add al, dh
256
257exit: mov [esp+7*4], eax
258 popa
259 retn
260
261btest: or dh, (C_MODRM >> 8)
262 test byte [ecx], 00111000b ; F6/F7 -- test
263 jnz cont
264 or dh, (C_DATAW0 >> 8)
265 jmp cont
266
267bint: or dh, (C_DATA1 >> 8)
268 cmp byte [ecx], 0x20
269 jne cont
270 or dh, (C_DATA4 >> 8)
271 jmp cont
272
273b0F: mov al, [ecx]
274 inc ecx
275 or edx, [esi+eax*4+1024] ; 2nd half
276 cmp edx, -1
277 jne cont
278
279error: mov eax, edx
280 jmp exit
281
282dataw0: xor dh, (C_DATA66 >> 8)
283 test al, 00000001b
284 jnz dataw0done
285 xor dh, ((C_DATA66+C_DATA1) >> 8)
286 jmp dataw0done
287
288mem67: xor dl, C_MEM2
289 test dl, C_67
290 jnz mem67done
291 xor dl, C_MEM4+C_MEM2
292 jmp mem67done
293
294data66: xor dh, (C_DATA2 >> 8)
295 test dh, (C_66 >> 8)
296 jnz data66done
297 xor dh, ((C_DATA4+C_DATA2) >> 8)
298 jmp data66done
299
300modrm: mov al, [ecx]
301 inc ecx
302
303 mov ah, al ; ah=mod, al=rm
304
305 and ax, 0xc007
306 cmp ah, 0xc0
307 je near exitmodrm
308
309 test dl, C_67
310 jnz modrm16
311
312modrm32:
313 cmp al, 0x04
314 jne a
315
316 mov al, [ecx] ; sib
317 inc ecx
318 and al, 0x07
319
320a: cmp ah, 0x40
321 je mem1
322 cmp ah, 0x80
323 je mem4
324
325 cmp ax, 0x0005
326 jne near exitmodrm
327
328mem4: or dl, C_MEM4
329 jmp exitmodrm
330
331mem1: or dl, C_MEM1
332 jmp exitmodrm
333
334modrm16:
335 cmp ax, 0x0006
336 je mem2
337 cmp ah, 0x40
338 je mem1
339 cmp ah, 0x80
340 jne near exitmodrm
341
342mem2: or dl, C_MEM2
343 jmp exitmodrm
344
345
diff --git a/other/burneye/src/stub/lde32.h b/other/burneye/src/stub/lde32.h
new file mode 100644
index 0000000..71f030b
--- /dev/null
+++ b/other/burneye/src/stub/lde32.h
@@ -0,0 +1,31 @@
1/* length disassembling engine - C interface header file
2 */
3
4#ifndef LDE32_H
5#define LDE32_H
6
7typedef void lde_table;
8
9/* lde_init
10 *
11 * initialize 2048 byte table for use with LDE at `tableptr'. `tableptr' has
12 * to point to at least 2048 reserved bytes.
13 *
14 * return in any case
15 */
16
17void
18lde_init (lde_table *tableptr);
19
20
21/* lde_dis
22 *
23 * return opcode length in bytes on success
24 * return -1 on failure
25 */
26
27int
28lde_dis (unsigned char *instr, lde_table *tableptr);
29
30#endif
31
diff --git a/other/burneye/src/stub/rs.c b/other/burneye/src/stub/rs.c
new file mode 100644
index 0000000..3cecc39
--- /dev/null
+++ b/other/burneye/src/stub/rs.c
@@ -0,0 +1,573 @@
1
2/*
3 * Reed-Solomon coding and decoding
4 * Phil Karn (karn at ka9q.ampr.org) September 1996
5 * small mods by scut
6 *
7 * This file is derived from the program "new_rs_erasures.c" by Robert
8 * Morelos-Zaragoza (robert at spectra.eng.hawaii.edu) and Hari Thirumoorthy
9 * (harit at spectra.eng.hawaii.edu), Aug 1995
10 *
11 * I've made changes to improve performance, clean up the code and make it
12 * easier to follow. Data is now passed to the encoding and decoding functions
13 * through arguments rather than in global arrays. The decode function returns
14 * the number of corrected symbols, or -1 if the word is uncorrectable.
15 *
16 * This code supports a symbol size from 2 bits up to 16 bits,
17 * implying a block size of 3 2-bit symbols (6 bits) up to 65535
18 * 16-bit symbols (1,048,560 bits). The code parameters are set in rs.h.
19 *
20 * Note that if symbols larger than 8 bits are used, the type of each
21 * data array element switches from unsigned char to unsigned int. The
22 * caller must ensure that elements larger than the symbol range are
23 * not passed to the encoder or decoder.
24 *
25 */
26#include "rs.h"
27
28#ifdef IN_STUB
29#include "helper.h"
30#include "include/int80.h"
31#include "include/unistd.h"
32#else
33#include <stdio.h>
34#endif
35
36
37/* Initialization function */
38static void rs_init (void);
39
40/* These two functions *must* be called in this order (e.g.,
41 * by init_rs()) before any encoding/decoding
42 */
43
44static void generate_gf (void); /* Generate Galois Field */
45static void gen_poly (void); /* Generate generator polynomial */
46
47
48
49/* global variables
50 */
51
52unsigned int KK = 4015;
53
54/* This defines the type used to store an element of the Galois Field
55 * used by the code. Make sure this is something larger than a char if
56 * if anything larger than GF(256) is used.
57 *
58 * Note: unsigned char will work up to GF(256) but int seems to run
59 * faster on the Pentium.
60 */
61typedef int gf;
62
63/* 1+x+x^4+x^6+x^12 */
64int Pp[MM+1] = { 1, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1 };
65
66/* Alpha exponent for the first root of the generator polynomial */
67#define B0 1
68
69/* index->polynomial form conversion table */
70gf * Alpha_to = NULL;
71
72/* Polynomial->index form conversion table */
73gf * Index_of = NULL;
74
75/* No legal value in index form represents zero, so
76 * we need a special value for this purpose
77 */
78#define A0 (NN)
79
80/* Generator polynomial g(x)
81 * Degree of g(x) = 2*TT
82 * has roots @**B0, @**(B0+1), ... ,@^(B0+2*TT-1)
83 */
84gf * Gg = NULL;
85
86
87/* Compute x % NN, where NN is 2**MM - 1,
88 * without a slow divide
89 */
90static inline gf
91modnn(int x)
92{
93 while (x >= NN) {
94 x -= NN;
95 x = (x >> MM) + (x & NN);
96 }
97 return x;
98}
99
100#define min(a,b) ((a) < (b) ? (a) : (b))
101
102#define CLEAR(a,n) {\
103 int ci;\
104 for(ci=(n)-1;ci >=0;ci--)\
105 (a)[ci] = 0;\
106 }
107
108#define COPY(a,b,n) {\
109 int ci;\
110 for(ci=(n)-1;ci >=0;ci--)\
111 (a)[ci] = (b)[ci];\
112 }
113#define COPYDOWN(a,b,n) {\
114 int ci;\
115 for(ci=(n)-1;ci >=0;ci--)\
116 (a)[ci] = (b)[ci];\
117 }
118
119static void
120rs_init (void)
121{
122 generate_gf();
123 gen_poly();
124}
125
126/* generate GF(2**m) from the irreducible polynomial p(X) in p[0]..p[m]
127 lookup tables: index->polynomial form alpha_to[] contains j=alpha**i;
128 polynomial form -> index form index_of[j=alpha**i] = i
129 alpha=2 is the primitive element of GF(2**m)
130 HARI's COMMENT: (4/13/94) alpha_to[] can be used as follows:
131 Let @ represent the primitive element commonly called "alpha" that
132 is the root of the primitive polynomial p(x). Then in GF(2^m), for any
133 0 <= i <= 2^m-2,
134 @^i = a(0) + a(1) @ + a(2) @^2 + ... + a(m-1) @^(m-1)
135 where the binary vector (a(0),a(1),a(2),...,a(m-1)) is the representation
136 of the integer "alpha_to[i]" with a(0) being the LSB and a(m-1) the MSB. Thu
137s for
138 example the polynomial representation of @^5 would be given by the binary
139 representation of the integer "alpha_to[5]".
140 Similarily, index_of[] can be used as follows:
141 As above, let @ represent the primitive element of GF(2^m) that is
142 the root of the primitive polynomial p(x). In order to find the power
143 of @ (alpha) that has the polynomial representation
144 a(0) + a(1) @ + a(2) @^2 + ... + a(m-1) @^(m-1)
145 we consider the integer "i" whose binary representation with a(0) being LSB
146 and a(m-1) MSB is (a(0),a(1),...,a(m-1)) and locate the entry
147 "index_of[i]". Now, @^index_of[i] is that element whose polynomial
148 representation is (a(0),a(1),a(2),...,a(m-1)).
149 NOTE:
150 The element alpha_to[2^m-1] = 0 always signifying that the
151 representation of "@^infinity" = 0 is (0,0,0,...,0).
152 Similarily, the element index_of[0] = A0 always signifying
153 that the power of alpha which has the polynomial representation
154 (0,0,...,0) is "infinity".
155
156*/
157
158static void
159generate_gf (void)
160{
161 register int i, mask;
162
163 mask = 1;
164 Alpha_to[MM] = 0;
165 for (i = 0; i < MM; i++) {
166 Alpha_to[i] = mask;
167 Index_of[Alpha_to[i]] = i;
168 /* If Pp[i] == 1 then, term @^i occurs in poly-repr of @^MM */
169 if (Pp[i] != 0)
170 Alpha_to[MM] ^= mask; /* Bit-wise EXOR operation */
171 mask <<= 1; /* single left-shift */
172 }
173 Index_of[Alpha_to[MM]] = MM;
174 /*
175 * Have obtained poly-repr of @^MM. Poly-repr of @^(i+1) is given by
176 * poly-repr of @^i shifted left one-bit and accounting for any @^MM
177 * term that may occur when poly-repr of @^i is shifted.
178 */
179 mask >>= 1;
180 for (i = MM + 1; i < NN; i++) {
181 if (Alpha_to[i - 1] >= mask)
182 Alpha_to[i] = Alpha_to[MM] ^ ((Alpha_to[i - 1] ^ mask) << 1);
183 else
184 Alpha_to[i] = Alpha_to[i - 1] << 1;
185 Index_of[Alpha_to[i]] = i;
186 }
187 Index_of[0] = A0;
188 Alpha_to[NN] = 0;
189}
190
191
192/*
193 * Obtain the generator polynomial of the TT-error correcting, length
194 * NN=(2**MM -1) Reed Solomon code from the product of (X+@**(B0+i)), i = 0,
195 * ... ,(2*TT-1)
196 *
197 * Examples:
198 *
199 * If B0 = 1, TT = 1. deg(g(x)) = 2*TT = 2.
200 * g(x) = (x+@) (x+@**2)
201 *
202 * If B0 = 0, TT = 2. deg(g(x)) = 2*TT = 4.
203 * g(x) = (x+1) (x+@) (x+@**2) (x+@**3)
204 */
205static void
206gen_poly(void)
207{
208 register int i, j;
209
210 Gg[0] = Alpha_to[B0];
211 Gg[1] = 1; /* g(x) = (X+@**B0) initially */
212 for (i = 2; i <= NN - KK; i++) {
213 Gg[i] = 1;
214 /*
215 * Below multiply (Gg[0]+Gg[1]*x + ... +Gg[i]x^i) by
216 * (@**(B0+i-1) + x)
217 */
218 for (j = i - 1; j > 0; j--)
219 if (Gg[j] != 0)
220 Gg[j] = Gg[j - 1] ^ Alpha_to[modnn((Index_of[Gg[j]]) + B0 + i - 1)];
221 else
222 Gg[j] = Gg[j - 1];
223 /* Gg[0] can never be zero */
224 Gg[0] = Alpha_to[modnn((Index_of[Gg[0]]) + B0 + i - 1)];
225 }
226 /* convert Gg[] to index form for quicker encoding */
227 for (i = 0; i <= NN - KK; i++)
228 Gg[i] = Index_of[Gg[i]];
229}
230
231
232/*
233 * take the string of symbols in data[i], i=0..(k-1) and encode
234 * systematically to produce NN-KK parity symbols in bb[0]..bb[NN-KK-1] data[]
235 * is input and bb[] is output in polynomial form. Encoding is done by using
236 * a feedback shift register with appropriate connections specified by the
237 * elements of Gg[], which was generated above. Codeword is c(X) =
238 * data(X)*X**(NN-KK)+ b(X)
239 */
240int
241rs_encode (dtype data[KK], dtype bb[NN-KK])
242{
243 int i,
244 j;
245 gf feedback;
246 gf Alpha_to_s[NN + 1];
247 gf Index_of_s[NN + 1];
248 gf Gg_s[NN - KK + 1];
249
250
251 /* tradeoff: gain .bss space, lose time */
252 Alpha_to = Alpha_to_s;
253 Index_of = Index_of_s;
254 Gg = Gg_s;
255 rs_init ();
256
257 CLEAR(bb,NN-KK);
258 for (i = KK - 1; i >= 0; i--) {
259 if(data[i] > NN)
260 return -1; /* Illegal symbol */
261
262 feedback = Index_of[data[i] ^ bb[NN - KK - 1]];
263 if (feedback != A0) { /* feedback term is non-zero */
264 for (j = NN - KK - 1; j > 0; j--)
265 if (Gg[j] != A0)
266 bb[j] = bb[j - 1] ^ Alpha_to[modnn(Gg[j] + feedback)];
267 else
268 bb[j] = bb[j - 1];
269 bb[0] = Alpha_to[modnn(Gg[0] + feedback)];
270 } else { /* feedback term is zero. encoder becomes a
271 * single-byte shifter */
272 for (j = NN - KK - 1; j > 0; j--)
273 bb[j] = bb[j - 1];
274 bb[0] = 0;
275 }
276 }
277 return 0;
278}
279
280/*
281 * Performs ERRORS+ERASURES decoding of RS codes. If decoding is successful,
282 * writes the codeword into data[] itself. Otherwise data[] is unaltered.
283 *
284 * Return number of symbols corrected, or -1 if codeword is illegal
285 * or uncorrectable.
286 *
287 * First "no_eras" erasures are declared by the calling program. Then, the
288 * maximum # of errors correctable is t_after_eras = floor((NN-KK-no_eras)/2).
289 * If the number of channel errors is not greater than "t_after_eras" the
290 * transmitted codeword will be recovered. Details of algorithm can be found
291 * in R. Blahut's "Theory ... of Error-Correcting Codes".
292 */
293int
294rs_eras_dec (dtype data[NN], int eras_pos[NN-KK], int no_eras)
295{
296 int deg_lambda,
297 deg_omega,
298 el;
299 int i,
300 j,
301 r;
302 gf u,
303 q,
304 tmp,
305 num1,
306 num2,
307 den,
308 discr_r;
309 gf recd[NN];
310 gf lambda[NN-KK + 1],
311 s[NN-KK + 1]; /* Err+Eras Locator poly and syndrome poly */
312 gf b[NN-KK + 1],
313 t[NN-KK + 1],
314 omega[NN-KK + 1];
315 gf root[NN-KK],
316 reg[NN-KK + 1],
317 loc[NN-KK];
318 int syn_error,
319 count;
320
321 gf Alpha_to_s[NN + 1];
322 gf Index_of_s[NN + 1];
323 gf Gg_s[NN - KK + 1];
324
325
326 /* tradeoff: gain .bss space, lose time */
327 Alpha_to = Alpha_to_s;
328 Index_of = Index_of_s;
329 Gg = Gg_s;
330 rs_init ();
331
332 /* data[] is in polynomial form, copy and convert to index form */
333 for (i = NN-1; i >= 0; i--){
334 if(data[i] > NN)
335 return -1; /* Illegal symbol */
336
337 recd[i] = Index_of[data[i]];
338 }
339 /* first form the syndromes; i.e., evaluate recd(x) at roots of g(x)
340 * namely @**(B0+i), i = 0, ... ,(NN-KK-1)
341 */
342 syn_error = 0;
343 for (i = 1; i <= NN-KK; i++) {
344 tmp = 0;
345 for (j = 0; j < NN; j++)
346 if (recd[j] != A0) /* recd[j] in index form */
347 tmp ^= Alpha_to[modnn(recd[j] + (B0+i-1)*j)];
348 syn_error |= tmp; /* set flag if non-zero syndrome =>
349 * error */
350 /* store syndrome in index form */
351 s[i] = Index_of[tmp];
352 }
353 if (!syn_error) {
354 /*
355 * if syndrome is zero, data[] is a codeword and there are no
356 * errors to correct. So return data[] unmodified
357 */
358 return 0;
359 }
360 CLEAR(&lambda[1],NN-KK);
361 lambda[0] = 1;
362 if (no_eras > 0) {
363 /* Init lambda to be the erasure locator polynomial */
364 lambda[1] = Alpha_to[eras_pos[0]];
365 for (i = 1; i < no_eras; i++) {
366 u = eras_pos[i];
367 for (j = i+1; j > 0; j--) {
368 tmp = Index_of[lambda[j - 1]];
369 if(tmp != A0)
370 lambda[j] ^= Alpha_to[modnn(u + tmp)];
371 }
372 }
373 }
374 for(i=0;i<NN-KK+1;i++)
375 b[i] = Index_of[lambda[i]];
376
377 /*
378 * Begin Berlekamp-Massey algorithm to determine error+erasure
379 * locator polynomial
380 */
381 r = no_eras;
382 el = no_eras;
383 while (++r <= NN-KK) { /* r is the step number */
384 /* Compute discrepancy at the r-th step in poly-form */
385 discr_r = 0;
386 for (i = 0; i < r; i++){
387 if ((lambda[i] != 0) && (s[r - i] != A0)) {
388 discr_r ^= Alpha_to[modnn(Index_of[lambda[i]] + s[r - i])];
389 }
390 }
391 discr_r = Index_of[discr_r]; /* Index form */
392 if (discr_r == A0) {
393 /* 2 lines below: B(x) <-- x*B(x) */
394 COPYDOWN(&b[1],b,NN-KK);
395 b[0] = A0;
396 } else {
397 /* 7 lines below: T(x) <-- lambda(x) - discr_r*x*b(x) */
398 t[0] = lambda[0];
399 for (i = 0 ; i < NN-KK; i++) {
400 if(b[i] != A0)
401 t[i+1] = lambda[i+1] ^ Alpha_to[modnn(discr_r + b[i])];
402 else
403 t[i+1] = lambda[i+1];
404 }
405 if (2 * el <= r + no_eras - 1) {
406 el = r + no_eras - el;
407 /*
408 * 2 lines below: B(x) <-- inv(discr_r) *
409 * lambda(x)
410 */
411 for (i = 0; i <= NN-KK; i++)
412 b[i] = (lambda[i] == 0) ? A0 : modnn(Index_of[lambda[i]] - discr_r + NN);
413 } else {
414 /* 2 lines below: B(x) <-- x*B(x) */
415 COPYDOWN(&b[1],b,NN-KK);
416 b[0] = A0;
417 }
418 COPY(lambda,t,NN-KK+1);
419 }
420 }
421
422 /* Convert lambda to index form and compute deg(lambda(x)) */
423 deg_lambda = 0;
424 for(i=0;i<NN-KK+1;i++){
425 lambda[i] = Index_of[lambda[i]];
426 if(lambda[i] != A0)
427 deg_lambda = i;
428 }
429 /*
430 * Find roots of the error+erasure locator polynomial. By Chien
431 * Search
432 */
433 COPY(&reg[1],&lambda[1],NN-KK);
434 count = 0; /* Number of roots of lambda(x) */
435 for (i = 1; i <= NN; i++) {
436 q = 1;
437 for (j = deg_lambda; j > 0; j--)
438 if (reg[j] != A0) {
439 reg[j] = modnn(reg[j] + j);
440 q ^= Alpha_to[reg[j]];
441 }
442 if (!q) {
443 /* store root (index-form) and error location number */
444 root[count] = i;
445 loc[count] = NN - i;
446 count++;
447 }
448 }
449
450 if (deg_lambda != count) {
451 /*
452 * deg(lambda) unequal to number of roots => uncorrectable
453 * error detected
454 */
455 return -1;
456 }
457 /*
458 * Compute err+eras evaluator poly omega(x) = s(x)*lambda(x) (modulo
459 * x**(NN-KK)). in index form. Also find deg(omega).
460 */
461 deg_omega = 0;
462 for (i = 0; i < NN-KK;i++){
463 tmp = 0;
464 j = (deg_lambda < i) ? deg_lambda : i;
465 for(;j >= 0; j--){
466 if ((s[i + 1 - j] != A0) && (lambda[j] != A0))
467 tmp ^= Alpha_to[modnn(s[i + 1 - j] + lambda[j])];
468 }
469 if(tmp != 0)
470 deg_omega = i;
471 omega[i] = Index_of[tmp];
472 }
473 omega[NN-KK] = A0;
474
475 /*
476 * Compute error values in poly-form. num1 = omega(inv(X(l))), num2 =
477 * inv(X(l))**(B0-1) and den = lambda_pr(inv(X(l))) all in poly-form
478 */
479 for (j = count-1; j >=0; j--) {
480 num1 = 0;
481 for (i = deg_omega; i >= 0; i--) {
482 if (omega[i] != A0)
483 num1 ^= Alpha_to[modnn(omega[i] + i * root[j])];
484 }
485 num2 = Alpha_to[modnn(root[j] * (B0 - 1) + NN)];
486 den = 0;
487
488 /* lambda[i+1] for i even is the formal derivative lambda_pr of
489 lambda[i] */
490 for (i = min(deg_lambda,NN-KK-1) & ~1; i >= 0; i -=2) {
491 if(lambda[i+1] != A0)
492 den ^= Alpha_to[modnn(lambda[i+1] + i * root[j])];
493 }
494 if (den == 0) {
495 return -1;
496 }
497 /* Apply error to data */
498 if (num1 != 0) {
499 data[loc[j]] ^= Alpha_to[modnn(Index_of[num1] + Index_of[num2] + NN - Index_of[den])];
500 }
501 }
502 return count;
503}
504
505
506void
507rs_trans (unsigned char *buffer, unsigned long int buf_len,
508 unsigned int *trans, unsigned long int trans_len)
509{
510 unsigned int n,
511 t;
512
513
514 memset (trans, '\0', sizeof (trans[0]) * trans_len);
515 if ((((buf_len * 8) / 12)) > trans_len)
516 _exit (73);
517
518 /* 8 to 12 bit expander to use 2^12 galois field */
519 for (n = 0, t = 0 ; n < buf_len ; ++n) {
520 switch (n % 3) {
521 case (0):
522 trans[t] = buffer[n];
523 break;
524 case (1):
525 trans[t] |= (buffer[n] & 0x0f) << 8;
526 trans[t + 1] = buffer[n] >> 4;
527 t += 1;
528 break;
529 case (2):
530 trans[t] |= buffer[n] << 4;
531 t += 1;
532 break;
533 }
534 }
535
536 return;
537}
538
539
540/* and the reverse (12 to 8 bit)
541 */
542void
543rs_detrans (unsigned char *buffer, unsigned long int buf_len,
544 unsigned int *trans, unsigned long int trans_len)
545{
546 unsigned int n,
547 t;
548
549
550 memset (buffer, '\0', buf_len);
551
552 if (((trans_len * 12) / 8) > buf_len)
553 _exit (73);
554
555 for (n = 0, t = 0 ; t < trans_len ; ++t) {
556 switch (t % 2) {
557 case (0):
558 buffer[n] = trans[t] & 0xff;
559 buffer[n + 1] = trans[t] >> 8;
560 n += 1;
561 break;
562 case (1):
563 buffer[n] |= (trans[t] & 0x0f) << 4;
564 buffer[n + 1] = trans[t] >> 4;
565 n += 2;
566 break;
567 }
568 }
569
570 return;
571}
572
573
diff --git a/other/burneye/src/stub/rs.h b/other/burneye/src/stub/rs.h
new file mode 100644
index 0000000..70ce7d0
--- /dev/null
+++ b/other/burneye/src/stub/rs.h
@@ -0,0 +1,62 @@
1
2/* Global definitions for Reed-Solomon encoder/decoder
3 * Phil Karn KA9Q, September 1996
4 *
5 * The parameters MM and KK specify the Reed-Solomon code parameters.
6 *
7 * Set MM to be the size of each code symbol in bits. The Reed-Solomon
8 * block size will then be NN = 2**M - 1 symbols. Supported values are
9 * defined in rs.c.
10 *
11 * Set KK to be the number of data symbols in each block, which must be
12 * less than the block size. The code will then be able to correct up
13 * to NN-KK erasures or (NN-KK)/2 errors, or combinations thereof with
14 * each error counting as two erasures.
15 */
16
17#ifndef RS_H
18#define RS_H
19
20#define MM 12 /* RS code over GF(2**MM) - change to suit */
21//#define KK 4015 /* 223 */ /* KK = number of information symbols */
22
23#define NN ((1 << MM) - 1)
24
25#if (MM <= 8)
26typedef unsigned char dtype;
27#else
28typedef unsigned int dtype;
29#endif
30
31
32/* Reed-Solomon encoding
33 * data[] is the input block, parity symbols are placed in bb[]
34 * bb[] may lie past the end of the data, e.g., for (255,223):
35 * encode_rs(&data[0],&data[223]);
36 */
37int rs_encode (dtype data[], dtype bb[]);
38
39/* Reed-Solomon erasures-and-errors decoding
40 * The received block goes into data[], and a list of zero-origin
41 * erasure positions, if any, goes in eras_pos[] with a count in no_eras.
42 *
43 * The decoder corrects the symbols in place, if possible and returns
44 * the number of corrected symbols. If the codeword is illegal or
45 * uncorrectible, the data array is unchanged and -1 is returned
46 */
47int rs_eras_dec (dtype data[], int eras_pos[], int no_eras);
48
49
50/* buf_len is the constraining factor here */
51void
52rs_trans (unsigned char *buffer, unsigned long int buf_len,
53 unsigned int *trans, unsigned long int trans_len);
54
55/* here it is trans_len ! */
56void
57rs_detrans (unsigned char *buffer, unsigned long int buf_len,
58 unsigned int *trans, unsigned long int trans_len);
59
60
61#endif
62
diff --git a/other/burneye/src/stub/snprintf.c b/other/burneye/src/stub/snprintf.c
new file mode 100644
index 0000000..1ee1e83
--- /dev/null
+++ b/other/burneye/src/stub/snprintf.c
@@ -0,0 +1,367 @@
1/****************************************************************************
2
3 Copyright (c) 1999,2000 WU-FTPD Development Group.
4 All rights reserved.
5
6 Portions Copyright (c) 1980, 1985, 1988, 1989, 1990, 1991, 1993, 1994
7 The Regents of the University of California.
8 Portions Copyright (c) 1993, 1994 Washington University in Saint Louis.
9 Portions Copyright (c) 1996, 1998 Berkeley Software Design, Inc.
10 Portions Copyright (c) 1989 Massachusetts Institute of Technology.
11 Portions Copyright (c) 1998 Sendmail, Inc.
12 Portions Copyright (c) 1983, 1995, 1996, 1997 Eric P. Allman.
13 Portions Copyright (c) 1997 by Stan Barber.
14 Portions Copyright (c) 1997 by Kent Landfield.
15 Portions Copyright (c) 1991, 1992, 1993, 1994, 1995, 1996, 1997
16 Free Software Foundation, Inc.
17
18 Use and distribution of this software and its source code are governed
19 by the terms and conditions of the WU-FTPD Software License ("LICENSE").
20
21 If you did not receive a copy of the license, it may be obtained online
22 at http://www.wu-ftpd.org/license.html.
23
24 $Id: snprintf.c,v 1.1 2001/07/06 19:23:39 scut Exp $
25
26****************************************************************************/
27
28#ifdef VDEBUG
29
30
31#ifndef __P
32#define __P(p) p
33#endif
34
35#include <stdarg.h>
36#define VA_LOCAL_DECL va_list ap;
37#define VA_START(f) va_start(ap, f)
38#define VA_END va_end(ap)
39
40#ifdef SOLARIS2
41#ifdef _FILE_OFFSET_BITS
42#define SOLARIS26
43#endif
44#endif
45
46#ifdef SOLARIS26
47#define HAS_SNPRINTF
48#define HAS_VSNPRINTF
49#endif
50#ifdef _SCO_DS_
51#define HAS_SNPRINTF
52#endif
53#ifdef luna2
54#define HAS_VSNPRINTF
55#endif
56/*
57 ** SNPRINTF, VSNPRINT -- counted versions of printf
58 **
59 ** These versions have been grabbed off the net. They have been
60 ** cleaned up to compile properly and support for .precision and
61 ** %lx has been added.
62 */
63
64/**************************************************************
65 * Original:
66 * Patrick Powell Tue Apr 11 09:48:21 PDT 1995
67 * A bombproof version of doprnt (dopr) included.
68 * Sigh. This sort of thing is always nasty do deal with. Note that
69 * the version here does not include floating point...
70 *
71 * snprintf() is used instead of sprintf() as it does limit checks
72 * for string length. This covers a nasty loophole.
73 *
74 * The other functions are there to prevent NULL pointers from
75 * causing nast effects.
76 **************************************************************/
77
78/*static char _id[] = "$Id: snprintf.c,v 1.1 2001/07/06 19:23:39 scut Exp $"; */
79static void dopr(char *, const char *, va_list);
80static char *end;
81
82#ifndef HAS_VSNPRINTF
83int vsnprintf(char *str, int count, const char *fmt, va_list args)
84{
85 int n = 0;
86 str[0] = 0;
87 end = str + count - 1;
88 dopr(str, fmt, args);
89 if (count > 0)
90 end[0] = 0;
91 while (*str++)
92 n++;
93 return n;
94}
95
96#ifndef HAS_SNPRINTF
97/* VARARGS3 */
98int snprintf(char *str, int count, const char *fmt,...)
99{
100 int len;
101 VA_LOCAL_DECL
102
103 VA_START(fmt);
104 len = vsnprintf(str, count, fmt, ap);
105 VA_END;
106 return len;
107}
108#endif
109
110/*
111 * dopr(): poor man's version of doprintf
112 */
113
114static void fmtstr __P((char *value, int ljust, int len, int zpad, int maxwidth));
115static void fmtnum __P((long value, int base, int dosign, int ljust, int len, int zpad));
116static void dostr __P((char *, int));
117static char *output;
118static void dopr_outch __P((int c));
119
120static void dopr(char *buffer, const char *format, va_list args)
121{
122 int ch;
123 long value;
124 int longflag = 0;
125 int pointflag = 0;
126 int maxwidth = 0;
127 char *strvalue;
128 int ljust;
129 int len;
130 int zpad;
131
132 output = buffer;
133 while ((ch = *format++)) {
134 switch (ch) {
135 case '%':
136 ljust = len = zpad = maxwidth = 0;
137 longflag = pointflag = 0;
138 nextch:
139 ch = *format++;
140 switch (ch) {
141 case 0:
142 dostr("**end of format**", 0);
143 return;
144 case '-':
145 ljust = 1;
146 goto nextch;
147 case '0': /* set zero padding if len not set */
148 if (len == 0 && !pointflag)
149 zpad = '0';
150 case '1':
151 case '2':
152 case '3':
153 case '4':
154 case '5':
155 case '6':
156 case '7':
157 case '8':
158 case '9':
159 if (pointflag)
160 maxwidth = maxwidth * 10 + ch - '0';
161 else
162 len = len * 10 + ch - '0';
163 goto nextch;
164 case '*':
165 if (pointflag)
166 maxwidth = va_arg(args, int);
167 else
168 len = va_arg(args, int);
169 goto nextch;
170 case '.':
171 pointflag = 1;
172 goto nextch;
173 case 'l':
174 longflag = 1;
175 goto nextch;
176 case 'u':
177 case 'U':
178 /*fmtnum(value,base,dosign,ljust,len,zpad) */
179 if (longflag) {
180 value = va_arg(args, long);
181 }
182 else {
183 value = va_arg(args, int);
184 }
185 fmtnum(value, 10, 0, ljust, len, zpad);
186 break;
187 case 'o':
188 case 'O':
189 /*fmtnum(value,base,dosign,ljust,len,zpad) */
190 if (longflag) {
191 value = va_arg(args, long);
192 }
193 else {
194 value = va_arg(args, int);
195 }
196 fmtnum(value, 8, 0, ljust, len, zpad);
197 break;
198 case 'd':
199 case 'D':
200 if (longflag) {
201 value = va_arg(args, long);
202 }
203 else {
204 value = va_arg(args, int);
205 }
206 fmtnum(value, 10, 1, ljust, len, zpad);
207 break;
208 case 'x':
209 if (longflag) {
210 value = va_arg(args, long);
211 }
212 else {
213 value = va_arg(args, int);
214 }
215 fmtnum(value, 16, 0, ljust, len, zpad);
216 break;
217 case 'X':
218 if (longflag) {
219 value = va_arg(args, long);
220 }
221 else {
222 value = va_arg(args, int);
223 }
224 fmtnum(value, -16, 0, ljust, len, zpad);
225 break;
226 case 's':
227 strvalue = va_arg(args, char *);
228 if (maxwidth > 0 || !pointflag) {
229 if (pointflag && len > maxwidth)
230 len = maxwidth; /* Adjust padding */
231 fmtstr(strvalue, ljust, len, zpad, maxwidth);
232 }
233 break;
234 case 'c':
235 ch = va_arg(args, int);
236 dopr_outch(ch);
237 break;
238 case '%':
239 dopr_outch(ch);
240 continue;
241 default:
242 dostr("???????", 0);
243 }
244 break;
245 default:
246 dopr_outch(ch);
247 break;
248 }
249 }
250 *output = 0;
251}
252
253static void fmtstr(char *value, int ljust, int len, int zpad, int maxwidth)
254{
255 int padlen, strlen; /* amount to pad */
256
257 if (value == 0) {
258 value = "<NULL>";
259 }
260 for (strlen = 0; value[strlen]; ++strlen); /* strlen */
261 if (strlen > maxwidth && maxwidth)
262 strlen = maxwidth;
263 padlen = len - strlen;
264 if (padlen < 0)
265 padlen = 0;
266 if (ljust)
267 padlen = -padlen;
268 while (padlen > 0) {
269 dopr_outch(' ');
270 --padlen;
271 }
272 dostr(value, maxwidth);
273 while (padlen < 0) {
274 dopr_outch(' ');
275 ++padlen;
276 }
277}
278
279static void fmtnum(long value, int base, int dosign, int ljust, int len, int zpad)
280{
281 int signvalue = 0;
282 unsigned long uvalue;
283 char convert[20];
284 int place = 0;
285 int padlen = 0; /* amount to pad */
286 int caps = 0;
287
288 /* DEBUGP(("value 0x%x, base %d, dosign %d, ljust %d, len %d, zpad %d\n",
289 value, base, dosign, ljust, len, zpad )); */
290 uvalue = value;
291 if (dosign) {
292 if (value < 0) {
293 signvalue = '-';
294 uvalue = -value;
295 }
296 }
297 if (base < 0) {
298 caps = 1;
299 base = -base;
300 }
301 do {
302 convert[place++] =
303 (caps ? "0123456789ABCDEF" : "0123456789abcdef")
304 [uvalue % (unsigned) base];
305 uvalue = (uvalue / (unsigned) base);
306 } while (uvalue);
307 convert[place] = 0;
308 padlen = len - place;
309 if (padlen < 0)
310 padlen = 0;
311 if (ljust)
312 padlen = -padlen;
313 /* DEBUGP(( "str '%s', place %d, sign %c, padlen %d\n",
314 convert,place,signvalue,padlen)); */
315 if (zpad && padlen > 0) {
316 if (signvalue) {
317 dopr_outch(signvalue);
318 --padlen;
319 signvalue = 0;
320 }
321 while (padlen > 0) {
322 dopr_outch(zpad);
323 --padlen;
324 }
325 }
326 while (padlen > 0) {
327 dopr_outch(' ');
328 --padlen;
329 }
330 if (signvalue)
331 dopr_outch(signvalue);
332 while (place > 0)
333 dopr_outch(convert[--place]);
334 while (padlen < 0) {
335 dopr_outch(' ');
336 ++padlen;
337 }
338}
339
340static void dostr(char *str, int cut)
341{
342 if (cut) {
343 while (*str && cut-- > 0)
344 dopr_outch(*str++);
345 }
346 else {
347 while (*str)
348 dopr_outch(*str++);
349 }
350}
351
352static void dopr_outch(int c)
353{
354#if 0
355 if (iscntrl(c) && c != '\n' && c != '\t') {
356 c = '@' + (c & 0x1F);
357 if (end == 0 || output < end)
358 *output++ = '^';
359 }
360#endif
361 if (end == 0 || output < end)
362 *output++ = c;
363}
364
365#endif
366
367#endif
diff --git a/other/burneye/src/stub/stub.c b/other/burneye/src/stub/stub.c
new file mode 100644
index 0000000..cdfe8b6
--- /dev/null
+++ b/other/burneye/src/stub/stub.c
@@ -0,0 +1,1254 @@
1/* burneye - main stub loader
2 */
3
4#include <elf.h>
5#include "include/int80.h"
6#include "include/unistd.h"
7#include "cipher-rc4.h"
8#include "cipher-sha1.h"
9#include "cipher-glfsr.h"
10#include "fingerprint.h"
11#include "helper.h"
12#include "stubhdr.h"
13
14
15/* from asm/page.h */
16#define PAGE_SHIFT 12
17#define PAGE_SIZE (1UL << PAGE_SHIFT)
18#define PAGE_MASK (~0u << 12)
19
20#define OVERHEAD 2048
21#define MAX_PHDR 32
22
23
24typedef struct {
25 int file_fd; /* fd or -1 if none */
26 unsigned long int file_size; /* filesize or 0 if unknown */
27 unsigned char * file_mem; /* entire file or NULL */
28} elf_file;
29
30
31extern unsigned long int be_stubhdr_u;
32
33
34/* prototypes */
35char * getenv (char *varname);
36
37int burneye (unsigned long int auxc, Elf32_auxv_t *auxv, char *envp[],
38 char *argv[], int argc);
39void be_seal (unsigned char *shdr_p);
40void be_sigtrap (int signum);
41
42void be_auxv_reloc (unsigned long int auxc, Elf32_auxv_t *auxv);
43void be_auxv_set (Elf32_auxv_t *auxv, unsigned int auxc,
44 unsigned int a_type, long int a_val);
45
46static Elf32_Addr be_remap (elf_file *elf);
47static Elf32_Addr be_findphdrs (elf_file *elf);
48static Elf32_Addr be_mapinterpreter (elf_file *pretee, Elf32_Ehdr *pehdr);
49int be_loadmap (elf_file *elf, Elf32_Ehdr *ehdr, unsigned long int base);
50void be_loadehdr (elf_file *elf, Elf32_Ehdr *ehdr);
51int be_loadphdr (elf_file *elf, Elf32_Ehdr *ehdr, Elf32_Phdr *phdr,
52 int phnum);
53int be_loadseg (elf_file *elf, Elf32_Ehdr *ehdr, Elf32_Phdr *phdr,
54 unsigned long int base);
55static void * be_brk (unsigned char *end);
56void be_unlink (unsigned char *pathname, unsigned char *replacement);
57
58
59/* globals, all initialized (to avoid .bss)
60 */
61char ** env = NULL; /* environ */
62char * progfile = NULL; /* this executeable as pathname */
63int nottraced = 0; /* will be > 0 if traced */
64
65/* unlink stub encoded in a .h
66 */
67#include "unlinkstub-bin.h"
68
69
70static inline int killme()
71{
72 long ret;
73
74 __asm__ __volatile__ ("xorl %%eax, %%eax\t\n"
75 "xorl %%ebx, %%ebx\t\n"
76 "xorl %%ecx, %%ecx\t\n"
77 "xorl %%edx, %%edx\t\n"
78 "xorl %%esi, %%esi\t\n"
79 "xorl %%edi, %%edi\t\n"
80 "xorl %%ebp, %%ebp\t\n"
81 "xorl %%esp, %%esp\t\n"
82 "jmp %%esi"
83 :"=a" (ret)
84 : );
85 return ret;
86}
87
88
89char *
90getenv (char *varname)
91{
92 int walker;
93
94
95 if (env == NULL)
96 return (NULL);
97
98 for (walker = 0 ; env[walker] != NULL ; ++walker) {
99 char * a;
100 char * b;
101
102 /* what a kludge, uhhohh ! */
103 for (a = env[walker], b = varname ;
104 *a && *b && *a != '=' && *a == *b ;
105 ++a, ++b)
106 ;
107 if (*a == '=' && *b == '\0')
108 return (a + 1);
109 }
110
111 /* not found */
112 return (NULL);
113}
114
115
116/* burneye
117 *
118 * 'auxc' is the number of direct Elf32_auxv_t structures that are located
119 * at 'auxv'. at 'auxv' there is space for exactly 32 of such structures, so
120 * the first thing we do is to resort them in a proper array for easy
121 * convenient access. there are quite remarkable differences between the entry
122 * stack layout between different kernel versions, so we stick to some generic
123 * approach here. john reiser <jreiser@bitwagon.com> noted that the major
124 * differences appeared after kernel 2.4.2. this code should cope with any
125 * possible valid layout
126 *
127 * return nothing meaningful yet
128 */
129
130int
131burneye (unsigned long int auxc, Elf32_auxv_t *auxv, char *envp[],
132 char *argv[], int argc)
133{
134 Elf32_Ehdr ehdr; /* elf header, wrapped executeable */
135 Elf32_Addr this_entry, /* entry point, wrapped executeable */
136 this_phdrs; /* vaddr of program header table */
137 elf_file this_exe; /* elf_file struct for the exe file */
138
139 Elf32_Addr inter_entry; /* entry point, ld-linux interpreter */
140
141 stubhdr * be_stubhdr; /* = &be_stubhdr_u */
142 unsigned char * be_payload; /* the real payload starts here */
143 unsigned char * shdr_p;
144
145
146 /* first generate a sane 32 entry Elf32_auxv_t array
147 */
148 be_auxv_reloc (auxc, auxv);
149 auxc = 32;
150
151 /* initialize environment, just as usual. getenv needs it.
152 */
153 env = envp;
154
155 /* supposed program file (could be forged, but we do not care)
156 */
157 progfile = argv[0];
158
159
160 /* if the payload length has this magic number, there is no payload
161 * at all
162 */
163 if (be_stubhdr_u == 0x41012345) {
164 be_printf ("WARNING: stub is running on its own, without"
165 "payload, is this what you want?\n");
166 }
167
168#ifndef DEBUG
169 /* setup signal handler
170 */
171 signal (SIGTRAP, be_sigtrap);
172#endif
173
174 be_stubhdr = (stubhdr *) &be_stubhdr_u;
175 be_printf ("be_stubhdr = 0x%08lx\n", (unsigned long int) be_stubhdr);
176
177 /* since the stub header is dynamically sized, we have to pull the
178 * length of it from itself
179 */
180 be_printf ("be_stubhdr->stubhdr_size = %lu\n",
181 be_stubhdr->stubhdr_size);
182 be_payload = ((unsigned char *) be_stubhdr) +
183 be_stubhdr->stubhdr_size;
184
185 be_printf ("payload @ 0x%08lx, 0x%08lx bytes\n",
186 (unsigned long int) be_payload,
187 be_stubhdr->payload_len);
188 be_printf ("%lu auxiliary vectors @ 0x%08lx\n", auxc,
189 (unsigned long int) auxv);
190 be_printf ("brk @ 0x%08lx\n", brk(0));
191
192#ifndef DEBUG
193 /* detect l/strace and other crappy stuff
194 */
195 antistrace ();
196
197 if (nottraced == 0)
198 killme ();
199#endif
200
201 /* points always to the actual element */
202 shdr_p = ((unsigned char *) be_stubhdr) + sizeof (stubhdr);
203
204 /* check on unlink */
205 if (be_stubhdr->flags & BE_FLAG_UNLINK) {
206 stubhdr_unlink * su;
207
208 su = (stubhdr_unlink *) shdr_p;
209 shdr_p += sizeof (stubhdr_unlink);
210
211 if (getenv (su->ul_env) != NULL) {
212 be_unlink (progfile, NULL);
213 _exit (73);
214 }
215 }
216
217 /* tagged binary ?
218 */
219 if (be_stubhdr->flags & BE_FLAG_TAGGED) {
220 int tw;
221 stubhdr_tag * st;
222
223 st = (stubhdr_tag *) shdr_p;
224 shdr_p += sizeof (stubhdr_tag);
225
226 /* deobfuscate
227 */
228 for (tw = 0 ; tw < sizeof (st->tag_env) ; ++tw) {
229 st->tag_env[tw] = (0xaa + (~tw << (tw % 4))) ^
230 st->tag_env[tw];
231 }
232
233 if (getenv (st->tag_env) != NULL) {
234 unsigned char tag_key[16];
235 unsigned char tag_hash[20];
236 rc4_key key_t;
237
238
239 if (strlen (getenv (st->tag_env)) >= sizeof (tag_key))
240 _exit (73);
241 memcpy (tag_key, getenv (st->tag_env),
242 strlen (getenv (st->tag_env)));
243
244 SHA1HashLen (tag_key, strlen (tag_key), tag_hash);
245 rc4_prepare_key (tag_hash, sizeof (tag_hash), &key_t);
246 rc4_cipher (st->tag_value,
247 sizeof (st->tag_value), &key_t);
248
249 st->tag_value[sizeof (st->tag_value) - 1] = '\0';
250 write (2, st->tag_value, strlen (st->tag_value));
251 write (2, "\n", 1);
252
253 _exit (0);
254 }
255 }
256
257 /* show banner ? */
258 if (be_stubhdr->flags & BE_FLAG_BANNER) {
259 stubhdr_banner * sb;
260 unsigned char * banner;
261
262 sb = (stubhdr_banner *) shdr_p;
263 shdr_p += sizeof (stubhdr_banner) + sb->banner_len;
264 banner = ((unsigned char *) sb) + sizeof (sb->banner_len);
265
266 if (be_stubhdr->flags & BE_FLAG_BANNER_TTY)
267 write_tty (banner, sb->banner_len);
268 else
269 write (2, banner, sb->banner_len);
270 }
271
272 /* do we have to seal this binary ?
273 * be_seal will never return
274 */
275 if (be_stubhdr->flags & BE_FLAG_SEALNOW)
276 be_seal (shdr_p);
277
278 /* fingerprinted ? */
279 if (be_stubhdr->flags & BE_FLAG_FINGERPRINT) {
280 fp_fin * fpf;
281
282 int mkey_n;
283 unsigned char mkey[20];
284 rc4_key mkey_r;
285
286
287 fpf = (fp_fin *) shdr_p;
288 shdr_p += sizeof (fp_fin) + fpf->par_len;
289#ifdef DEBUG
290 be_printf ("about to FINGERPRINT (par_len = 0x%08lx\n",
291 fpf->par_len);
292#endif
293
294 fp_process (fpf, mkey);
295
296#ifdef DEBUG
297 be_printf (" fp: %02x %02x %02x %02x\n", mkey[0], mkey[1],
298 mkey[2], mkey[3]);
299#endif
300 for (mkey_n = 0 ; mkey_n < sizeof (mkey) ; ++mkey_n)
301 mkey[mkey_n] ^= fpf->fp_xor[mkey_n];
302 SHA1HashLen (mkey, sizeof (mkey), mkey);
303#ifdef DEBUG
304 be_printf ("real: %02x %02x %02x %02x\n", mkey[0], mkey[1],
305 mkey[2], mkey[3]);
306
307 be_printf ("encrypted: %02x %02x %02x %02x %02x\n",
308 be_payload[0],
309 be_payload[1],
310 be_payload[2],
311 be_payload[3],
312 be_payload[4]);
313#endif
314
315 rc4_prepare_key (mkey, sizeof (mkey), &mkey_r);
316 rc4_cipher (be_payload, be_stubhdr->payload_len, &mkey_r);
317#ifdef DEBUG
318 be_printf ("decrypted: %02x %02x %02x %02x %02x\n",
319 be_payload[0],
320 be_payload[1],
321 be_payload[2],
322 be_payload[3],
323 be_payload[4]);
324#endif
325
326 if (be_stubhdr->flags & BE_FLAG_FINGERPRINT_CHK) {
327 unsigned char hash[20];
328
329 SHA1HashLen (be_payload, be_stubhdr->payload_len,
330 hash);
331
332 if (memcmp (hash, fpf->fp_check, 4) != 0) {
333 write (2, "invalid fingerprint\n", 20);
334 _exit (73);
335 }
336 }
337 }
338
339 /* password encrypted binary ? */
340 if (be_stubhdr->flags & BE_FLAG_PASSWORD) {
341 unsigned char * pw;
342 unsigned char pass[64];
343 unsigned char pw_hash[20];
344 int key_n;
345 rc4_key key_r;
346 stubhdr_pass * sp;
347
348
349 sp = (stubhdr_pass *) shdr_p;
350 shdr_p += sizeof (stubhdr_pass);
351
352 /* check whether we are allowed to pull the password from some
353 * environment variable, and if its possible, do it. else just
354 * fall back to pulling it from the tty
355 */
356 if (sp->pw_env[0] != '\0' && getenv (sp->pw_env) != NULL) {
357 int e_len;
358
359 e_len = strlen (getenv (sp->pw_env));
360 if (e_len > sizeof (pass))
361 e_len = sizeof (pass);
362
363 memcpy (pass, getenv (sp->pw_env), e_len);
364 } else {
365 getpass (pass, sizeof (pass));
366 }
367 pass[sizeof (pass) - 1] = '\0';
368
369 /* proper chop, looks ugly, right?
370 */
371 for (pw = pass ; *pw != '\0'; ++pw)
372 ;
373 if (pw > pass)
374 pw -= 1;
375 while (pw >= pass && (*pw == '\r' || *pw == '\n'))
376 *pw-- = '\0';
377
378 /* combine hash's and decrypt
379 */
380 SHA1HashLen (pass, strlen (pass), pw_hash);
381 for (key_n = 0 ; key_n < sizeof (pw_hash) ; ++key_n)
382 pw_hash[key_n] ^= sp->pw_xor[key_n];
383
384 SHA1HashLen (pw_hash, sizeof (pw_hash), pw_hash);
385
386 /* use the combined hashes as key for the payload decryption
387 */
388 rc4_prepare_key (pw_hash, sizeof (pw_hash), &key_r);
389 rc4_cipher (be_payload, be_stubhdr->payload_len, &key_r);
390
391 if (be_stubhdr->flags & BE_FLAG_PASSWORD_CHECK) {
392 unsigned char hash[20];
393
394 SHA1HashLen (be_payload, be_stubhdr->payload_len,
395 hash);
396
397 if (memcmp (hash, sp->pw_check, 4) != 0) {
398 write (2, "invalid key\n", 12);
399 _exit (73);
400 }
401 }
402 }
403
404 /* load this executeable file into memory
405 */
406 this_exe.file_fd = -1;
407 this_exe.file_size = be_stubhdr->payload_len;
408 this_exe.file_mem = be_payload;
409
410#ifdef DEBUG
411 be_printf ("payload = 0x%08lx (%d)\n",
412 (unsigned long int) be_payload, be_stubhdr->payload_len);
413
414 be_printf ("executeable: %02x %02x %02x %02x\n",
415 this_exe.file_mem[0],
416 this_exe.file_mem[1],
417 this_exe.file_mem[2],
418 this_exe.file_mem[3]);
419#endif
420
421 this_entry = be_remap (&this_exe);
422 this_phdrs = be_findphdrs (&this_exe);
423 be_printf ("found program headers @ 0x%08lx\n",
424 this_phdrs);
425 be_loadehdr (&this_exe, &ehdr);
426
427 be_auxv_set (auxv, auxc, AT_PHDR, this_phdrs);
428 be_auxv_set (auxv, auxc, AT_PHENT, ehdr.e_phentsize);
429 be_auxv_set (auxv, auxc, AT_PHNUM, ehdr.e_phnum);
430 be_auxv_set (auxv, auxc, AT_PAGESZ, PAGE_SIZE);
431 be_auxv_set (auxv, auxc, AT_ENTRY, this_entry);
432
433
434 /* find and load possible program interpreter
435 */
436 inter_entry = be_mapinterpreter (&this_exe, &ehdr);
437 be_printf ("PT_INTERP program interpreter mapped, entry @ 0x%08lx\n",
438 (unsigned long int) inter_entry);
439
440 /* unload old executeable */
441#ifdef WHEN_I_WILL_HAVE_THE_TIME_AND_MOTIVATION_TO_FIX_THIS
442#define BE_UNMAP_EXTRA 0x2000
443 be_printf ("munmap (0x%08lx, 0x%lx)\n",
444 be_payload, be_stubhdr->payload_len + BE_UNMAP_EXTRA);
445 n = munmap ((void *) be_payload,
446 be_stubhdr->payload_len + BE_UNMAP_EXTRA);
447 be_printf ("UNMAP = %d\n", n);
448#endif
449
450 /* usually shared linked binaries */
451 if (inter_entry != (Elf32_Addr) NULL)
452 return (inter_entry);
453
454 /* static binaries go here */
455 return (this_entry);
456}
457
458void
459be_sigtrap (int signum)
460{
461 nottraced++;
462}
463
464void
465be_seal (unsigned char *shdr_p)
466{
467 fp_fin * seal;
468 int n;
469 int fd_i, /* burneye input binary */
470 fd_o; /* burneye output binary */
471 char fd_o_name[256];
472 unsigned char fd_copybuf[1024];
473 unsigned long int m_flags;
474
475 unsigned char key[20]; /* fingerprint key */
476
477 unsigned long int m_len,
478 be_layer0_filestart,
479 be_layer0_size,
480 be_layer0_cont;
481
482#ifdef DEBUG
483 be_printf ("about to SEAL\n");
484#endif
485 /* prepare to copy the current executeable
486 */
487 if (strlen (progfile) >= (sizeof (fd_o_name) - 4))
488 _exit (73);
489
490 memset (fd_o_name, '\0', sizeof (fd_o_name));
491 memcpy (fd_o_name, progfile, strlen (progfile));
492 memcpy (fd_o_name + strlen (fd_o_name), ".sl", 3);
493
494 fd_i = open (progfile, O_RDONLY, 0);
495 fd_o = open (fd_o_name, O_RDWR | O_CREAT, 0);
496 if (fd_i < 0 || fd_o < 0)
497 _exit (73);
498
499 /* what a mess for a simple copy, isn't it?
500 * TODO: maybe put this into helper.c
501 */
502 do {
503 int m;
504 unsigned char * fdc;
505
506 n = read (fd_i, fd_copybuf, sizeof (fd_copybuf));
507 if (n < 0)
508 _exit (73);
509
510 if (n == 0)
511 break;
512
513 for (fdc = fd_copybuf ; n > 0 ; n -= m, fdc += m) {
514 m = write (fd_o, fdc, n);
515 if (m <= 0)
516 _exit (73);
517 }
518 } while (1);
519
520 close (fd_i);
521
522
523 /* now seal the new binary
524 * TODO: should errorcheck here (lseek/read/write calls)
525 */
526 seal = (fp_fin *) shdr_p;
527
528 /* adjust stubheader flags */
529 lseek (fd_o, seal->stubhdr_flags_ofs, SEEK_SET);
530 read (fd_o, (unsigned char *) &m_flags, sizeof (m_flags));
531 m_flags &= ~BE_FLAG_SEALNOW; /* remove sealnow flag */
532 m_flags |= BE_FLAG_SEALED;
533 m_flags |= BE_FLAG_FINGERPRINT | BE_FLAG_FINGERPRINT_CHK;
534 lseek (fd_o, seal->stubhdr_flags_ofs, SEEK_SET);
535 write (fd_o, (unsigned char *) &m_flags, sizeof (m_flags));
536
537 /* generate fingerprint, hah i like gcc auto stacks
538 */
539 {
540 unsigned int fp_len;
541 unsigned char hash_arr[N_TEST * N_SUBHASH];
542
543 seal->fp.hash_arr = hash_arr;
544 fp_len = fp_get (&seal->fp);
545
546 SHA1HashLen (seal->fp.hash_arr, fp_len, key);
547 seal->fp.hash_arr = NULL;
548#ifdef DEBUG
549 be_printf (" fp: %02x %02x %02x %02x\n", key[0],
550 key[1], key[2], key[3]);
551#endif
552 }
553
554
555 /* combine and hash the key using the dynamic xor pad
556 */
557 fd_i = open ("/dev/urandom", O_RDONLY, 0);
558 read (fd_i, seal->fp_xor, sizeof (seal->fp_xor));
559 close (fd_i);
560
561 for (n = 0 ; n < sizeof (key) ; ++n)
562 key[n] ^= seal->fp_xor[n];
563 SHA1HashLen (key, sizeof (key), key);
564
565#ifdef DEBUG
566 be_printf ("real: %02x %02x %02x %02x\n", key[0],
567 key[1], key[2], key[3]);
568#endif
569
570 /* hash and encrypt fingerprint-protected data
571 */
572 {
573 rc4_key key_r;
574// unsigned char payload_data[seal->payload_len];
575 unsigned char * payload_data;
576 unsigned char payload_check[20];
577
578
579 payload_data = (void *) mmap ((void *) 0x04000000,
580 seal->payload_len,
581 PROT_READ | PROT_WRITE, /* | PROT_EXEC, */
582 MAP_FIXED | MAP_PRIVATE | MAP_ANONYMOUS, 0, 0);
583#ifdef DEBUG
584 be_printf ("seal->payload_ofs = 0x%08lx\n", seal->payload_ofs);
585#endif
586 lseek (fd_o, seal->payload_ofs, SEEK_SET);
587 if (read (fd_o, payload_data, seal->payload_len) !=
588 seal->payload_len)
589 {
590 _exit (73);
591 }
592#ifdef DEBUG
593 be_printf ("SEALING exe_data: %02x %02x %02x %02x %02x\n",
594 payload_data[0], payload_data[1], payload_data[2],
595 payload_data[3], payload_data[4]);
596#endif
597
598 /* generate 4 byte pad array of decryted data
599 */
600 SHA1HashLen (payload_data, seal->payload_len, payload_check);
601 memcpy (seal->fp_check, payload_check,
602 sizeof (seal->fp_check));
603
604 rc4_prepare_key (key, sizeof (key), &key_r);
605 rc4_cipher (payload_data, seal->payload_len, &key_r);
606#ifdef DEBUG
607 be_printf ("encrypted: %02x %02x %02x %02x %02x\n",
608 payload_data[0], payload_data[1], payload_data[2],
609 payload_data[3], payload_data[4]);
610#endif
611
612 lseek (fd_o, seal->payload_ofs, SEEK_SET);
613 if (write (fd_o, payload_data, seal->payload_len) !=
614 seal->payload_len)
615 {
616 _exit (73);
617 }
618
619 munmap (payload_data, seal->payload_len);
620 }
621
622 /* now cleanup the seal structure to a real fingerprint one
623 * and dump it to the new executeable
624 */
625 lseek (fd_o, seal->sealhdr_ofs, SEEK_SET);
626 seal->stubhdr_flags_ofs = 0;
627 seal->sealhdr_ofs = seal->payload_ofs = seal->payload_len = 0;
628
629 /* sealmode allows no tolerance (yet) */
630 seal->par_len = 0;
631 seal->par_data = NULL;
632
633 be_layer0_filestart = seal->be_layer0_filestart;
634 be_layer0_size = seal->be_layer0_size;
635 be_layer0_cont = seal->be_layer0_cont;
636
637 seal->be_layer0_filestart = seal->be_layer0_size =
638 seal->be_layer0_cont = 0;
639 write (fd_o, seal, sizeof (*seal));
640
641#ifndef DEBUG
642 /* now the only thing is to add the obfuscation layer
643 */
644 m_len = lseek (fd_o, 0, SEEK_END);
645 m_len -= be_layer0_filestart;
646 {
647 unsigned long int * lp;
648 unsigned long int crypt_len,
649 crypt_key;
650 unsigned char * l0_data;
651
652
653 l0_data = (void *) mmap ((void *) 0x04000000,
654 m_len,
655 PROT_READ | PROT_WRITE, /* | PROT_EXEC, */
656 MAP_FIXED | MAP_PRIVATE | MAP_ANONYMOUS, 0, 0);
657
658 fd_i = open ("/dev/urandom", O_RDONLY, 0);
659 read (fd_i, &crypt_key, sizeof (crypt_key));
660 close (fd_i);
661
662 /* read all data following the crypt stub
663 */
664 lseek (fd_o, be_layer0_filestart, SEEK_SET);
665 read (fd_o, l0_data, m_len);
666
667 /* encrypt the data using the random key
668 */
669 crypt_len = m_len - be_layer0_size;
670 glfsr_crypt (l0_data + be_layer0_size,
671 l0_data + be_layer0_size,
672 crypt_len, crypt_key);
673
674 lp = (unsigned long int *) l0_data;
675 *lp++ = crypt_len;
676 *lp++ = crypt_key;
677 *lp++ = be_layer0_cont;
678
679 lseek (fd_o, be_layer0_filestart, SEEK_SET);
680 write (fd_o, l0_data, m_len);
681
682 munmap (l0_data, m_len);
683 }
684#endif
685
686 close (fd_o);
687
688 write (2, "sealed.\n", 8);
689
690 /* delete the old binary
691 * TODO: replace the chmod with a real stat/mode copy thing
692 */
693 chmod (fd_o_name, 0700);
694
695 be_unlink (progfile, fd_o_name);
696
697 _exit (73); /* will never happen */
698}
699
700
701void
702be_auxv_reloc (unsigned long int auxc, Elf32_auxv_t *auxv)
703{
704 int n;
705 Elf32_auxv_t a_copy[32];
706
707
708 /* initialize all structures */
709 for (n = 0 ; n < 32 ; ++n) {
710 a_copy[n].a_type = AT_IGNORE;
711 a_copy[n].a_un.a_val = 0x00000000;
712 }
713 a_copy[0].a_type = AT_IGNORE;
714 a_copy[31].a_type = AT_NULL;
715
716 /* now insertion-sort the given array */
717 for (n = 0 ; n < auxc ; ++n) {
718 if (auxv[n].a_type >= 32) {
719 be_printf ("FATAL: invalid AT_* entry detected\n");
720 _exit (73);
721 }
722
723 if (auxv[n].a_type != AT_NULL) {
724 a_copy[auxv[n].a_type].a_type = auxv[n].a_type;
725 a_copy[auxv[n].a_type].a_un.a_val = auxv[n].a_un.a_val;
726 be_printf ("AUXV: 0x%08lx : 0x%08lx\n", auxv[n].a_type,
727 auxv[n].a_un.a_val);
728 }
729 }
730 memcpy (auxv, a_copy, sizeof (Elf32_auxv_t) * 32);
731
732 return;
733}
734
735
736void
737be_auxv_set (Elf32_auxv_t *auxv, unsigned int auxc,
738 unsigned int a_type, long int a_val)
739{
740 if (a_type >= auxc) {
741 be_printf ("FATAL: tried to set invalid AT_* type\n");
742 _exit (73);
743 }
744
745 auxv[a_type].a_type = a_type;
746 auxv[a_type].a_un.a_val = a_val;
747
748 return;
749}
750
751
752/* return interpreter entry point
753 */
754static Elf32_Addr
755be_mapinterpreter (elf_file *pretee, Elf32_Ehdr *pehdr)
756{
757 int n,
758 fd;
759 Elf32_Addr entry;
760 Elf32_Phdr pphdr[MAX_PHDR];
761 elf_file inter_file;
762
763
764 be_loadphdr (pretee, pehdr, pphdr, MAX_PHDR);
765 for (n = 0 ; n < pehdr->e_phnum ; ++n) {
766 if (pphdr[n].p_type != PT_INTERP)
767 continue;
768
769 /* XXX: assume the name is mapped, better check, doh!
770 */
771 fd = open ((char *) pphdr[n].p_vaddr, O_RDONLY, 0);
772 if (fd < 0) {
773 be_printf ("failed to open program interpreter\n");
774
775 _exit (73);
776 }
777
778 inter_file.file_fd = fd;
779 inter_file.file_size = 0;
780 inter_file.file_mem = NULL;
781
782 entry = be_remap (&inter_file);
783 close (fd);
784
785 return (entry);
786 }
787
788 /* either statically linked or broken
789 */
790 return ((Elf32_Addr) NULL);
791}
792
793
794/* assume file is mapped already at its virtual address
795 */
796static Elf32_Addr
797be_findphdrs (elf_file *elf)
798{
799 int n;
800 Elf32_Ehdr ehdr;
801 Elf32_Phdr phdr[MAX_PHDR];
802
803
804 be_loadehdr (elf, &ehdr);
805 be_loadphdr (elf, &ehdr, phdr, MAX_PHDR);
806
807 /* cycle all program headers, and if they are mapped into memory and
808 * cover the program header table from the file, we found it
809 */
810 for (n = 0 ; n < ehdr.e_phnum ; ++n) {
811 if (phdr[n].p_type == PT_LOAD &&
812 (phdr[n].p_offset <= ehdr.e_phoff) &&
813 (phdr[n].p_offset + phdr[n].p_filesz) >
814 (ehdr.e_phoff +
815 ehdr.e_phentsize * ehdr.e_phnum))
816 {
817 /* found, so relocate and return
818 */
819 return (phdr[n].p_vaddr +
820 (ehdr.e_phoff - phdr[n].p_offset));
821 }
822 }
823
824 return ((Elf32_Addr) NULL);
825}
826
827
828/* inspired by svr4 i386 abi, linux fs/binfmt_elf.c and UPX sources
829 * `elf' is one entire loadable elf object
830 *
831 * return entry point of mapped object
832 */
833static Elf32_Addr
834be_remap (elf_file *elf)
835{
836 unsigned long int base;
837 Elf32_Ehdr ehdr;
838
839
840 be_loadehdr (elf, &ehdr);
841 base = (ehdr.e_type == ET_DYN) ? 0x40000000 : 0;
842 be_loadmap (elf, &ehdr, base);
843
844 return (ehdr.e_entry + base);
845}
846
847
848int
849be_loadmap (elf_file *elf, Elf32_Ehdr *ehdr, unsigned long int base)
850{
851 int n;
852 Elf32_Phdr phdr[MAX_PHDR];
853 Elf32_Phdr * p;
854
855
856 /* first, load in program headers of the object
857 */
858 be_loadphdr (elf, ehdr, phdr, MAX_PHDR);
859 p = phdr;
860
861 for (n = 0 ; n < ehdr->e_phnum ; ++p, ++n) {
862 be_printf ("obj (entry 0x%08lx): parsing %d/%d, type 0x%04x [",
863 ehdr->e_entry, n, ehdr->e_phnum - 1, p->p_type);
864
865 if (p->p_type == PT_LOAD) {
866 be_printf ("PT_LOAD (@ 0x%08lx)]\n", p->p_vaddr);
867 be_loadseg (elf, ehdr, p, base);
868 } else
869 be_printf ("?]\n");
870 }
871
872 return (0);
873}
874
875
876int
877be_loadseg (elf_file *elf, Elf32_Ehdr *ehdr, Elf32_Phdr *phdr,
878 unsigned long int base)
879{
880 int memprot = 0;
881 unsigned long int overhead;
882 unsigned char * addr_start;
883 unsigned char * addr_end;
884 unsigned char * addr_dest;
885 unsigned long int end_frag;
886
887
888 addr_start = (unsigned char *) phdr->p_vaddr;
889 if (ehdr->e_type == ET_DYN)
890 addr_start += base;
891
892 addr_end = addr_start + phdr->p_memsz;
893 overhead = (unsigned long int) addr_start & (PAGE_SIZE - 1);
894
895 /* XXX: check if necessary */
896 if (ehdr->e_type != ET_DYN) {
897 be_brk (addr_end + OVERHEAD);
898 }
899
900// be_brk (addr_end + OVERHEAD);
901
902 /* XXX/TODO: optimize shared libraries using non-private/non-anonmyous
903 * pages
904 */
905 if (ehdr->e_type == ET_DYN) {
906 be_printf ("ET_DYN mmap: phdr->p_memsz = %d (phdr->p_filesz = %d)\noverhead = %d\n",
907 phdr->p_memsz, phdr->p_filesz, overhead);
908
909 addr_dest = (void *) mmap (addr_start - overhead,
910 phdr->p_filesz + overhead,
911 PROT_READ | PROT_WRITE, /* XXX: | PROT_EXEC, */
912 MAP_FIXED | MAP_PRIVATE, elf->file_fd, phdr->p_offset - overhead);
913
914 /* XXX: assume that (p_offset - overhead) is positive */
915
916 } else {
917 addr_dest = (void *) mmap (addr_start - overhead,
918 phdr->p_filesz + overhead,
919 PROT_READ | PROT_WRITE, /* | PROT_EXEC, */
920 MAP_FIXED | MAP_PRIVATE | MAP_ANONYMOUS, 0, 0);
921 }
922
923 if (addr_dest == (unsigned char *) (-1)) {
924 be_printf ("failed to mmap necessary segment\n");
925
926 _exit (73);
927 }
928
929 /* zero out lower and upper fragmented page space
930 */
931 if (overhead > 0)
932 memset (addr_dest, '\0', overhead);
933
934 end_frag = (-(overhead + phdr->p_filesz)) & ~PAGE_MASK;
935 be_printf ("end_frag = 0x%lx, clear 0x%08lx to 0x%08lx\n",
936 end_frag, addr_start + phdr->p_filesz,
937 addr_start + phdr->p_filesz + end_frag);
938 if (end_frag > 0)
939 memset (addr_start + phdr->p_filesz, '\0', end_frag);
940
941 be_printf ("0x%08lx = mmap (0x%08lx - 0x%08lx, 0x%08lx, ..)\n",
942 (unsigned long int) addr_dest,
943 (unsigned long int) addr_start, overhead,
944 phdr->p_filesz + overhead);
945
946#if 0
947 /* if it is a segment containing .bss pages, then round back with
948 * memsz and re-mmap the entire pages. hope this works -sc.
949 */
950 if (ehdr->e_type == ET_DYN && phdr->p_memsz > phdr->p_filesz) {
951 unsigned long int addr_bsspages;
952 unsigned long int remlen;
953
954#ifdef DEBUG
955 be_printf (" BSS mmap: memsz = 0x%08lx (from filesz 0x%08lx)\n",
956 phdr->p_memsz, phdr->p_filesz);
957#endif
958
959#if 0
960 addr_dest += phdr->p_memsz + overhead; /* next rounded page */
961 remlen = phdr->p_memsz + overhead;
962#endif
963 remlen = phdr->p_memsz + overhead;
964
965#ifdef DEBUG
966 be_printf (" BSS mmap: mmap (0x%08lx, 0x%08lx, ...)\n",
967 addr_dest, remlen);
968#endif
969 addr_bsspages = mmap (addr_dest, remlen,
970 PROT_READ | PROT_WRITE,
971 MAP_FIXED | MAP_PRIVATE,
972 elf->file_fd, phdr->p_offset - overhead);
973
974 if (addr_bsspages != (unsigned long int) addr_dest) {
975 be_printf (" BSS mmap: dyn bss mmap failed"
976 "(addr_bsspages = 0x%08lx)\n", addr_bsspages);
977 _exit (73);
978 }
979
980 memset (addr_dest + phdr->p_filesz, '\0',
981 phdr->p_memsz - phdr->p_filesz);
982
983 return (0);
984 }
985#endif
986
987 if (ehdr->e_type != ET_DYN) {
988 be_printf ("TRANSFER %d bytes @ 0x%08lx (lowfrag: 0x%04lx)\n",
989 phdr->p_filesz, addr_dest + overhead, overhead);
990
991 if (elf->file_mem != NULL &&
992 (phdr->p_offset + phdr->p_filesz) <= elf->file_size)
993 {
994 memcpy (addr_dest + overhead,
995 elf->file_mem + phdr->p_offset,
996 phdr->p_filesz);
997
998 } else if (elf->file_fd != -1) {
999
1000 lseek (elf->file_fd, phdr->p_offset, SEEK_SET);
1001 if (read (elf->file_fd, addr_dest + overhead,
1002 phdr->p_filesz) != phdr->p_filesz)
1003 {
1004 be_printf ("failed to load segment from file\n");
1005
1006 _exit (73);
1007 }
1008 } else {
1009 be_printf ("failed to load segment into memory\n");
1010
1011 _exit (73);
1012 }
1013 }
1014
1015 if (phdr->p_memsz > phdr->p_filesz && ehdr->e_type == ET_DYN) {
1016 unsigned long int addr_pageb,
1017 len;
1018
1019 be_printf ("XXX: ET_DYN phdr->p_memsz > phdr->p_filesz\n");
1020
1021#if 0
1022> addr +---optional page boundary(ies)
1023> <- frag-> |
1024> | : : | | : |
1025> | : : |<----... mlen ...|..--->: |
1026> | : : | | : |
1027> haddr
1028
1029where haddr is on the hi side of the first page boundary after (p_filesz +
1030p_vaddr), then we must supply zero-filled memory from addr to haddr.
1031
1032#endif
1033
1034 /* find the first page boundary after (p_vaddr + p_filesz),
1035 * thanks t john f. reiser for explaining this to me :)
1036 */
1037 addr_pageb = (unsigned long int) addr_start + phdr->p_filesz;
1038 addr_pageb += PAGE_SIZE;
1039 addr_pageb &= PAGE_MASK;
1040
1041 /* in case the (p_vaddr + p_memsz) address is below the next
1042 * page boundary we can just skip this
1043 */
1044#if 0
1045 if ((unsigned long int) addr_end <= addr_pageb)
1046 break;
1047#endif
1048
1049 /* mmap space up to the next page boundary and zero it out
1050 */
1051 if ((unsigned long int) addr_end > addr_pageb) {
1052 len = (unsigned long int) addr_end - addr_pageb;
1053 be_printf (" mmap (0x%08lx, %lu, ..)\n", addr_pageb, len);
1054
1055 if (mmap ((void *) addr_pageb, len,
1056 PROT_READ | PROT_WRITE,
1057 MAP_FIXED | MAP_PRIVATE | MAP_ANONYMOUS,
1058 0, 0) != addr_pageb)
1059 {
1060 be_printf ("failed to map further .bss pages\n");
1061 _exit (73);
1062 }
1063 memset ((void *) addr_pageb, '\0', len);
1064 } else {
1065 be_printf ("within page\n");
1066 }
1067
1068 } else if (phdr->p_memsz == phdr->p_filesz) {
1069
1070 if (phdr->p_flags & PF_R)
1071 memprot |= PROT_READ;
1072 if (phdr->p_flags & PF_W)
1073 memprot |= PROT_WRITE;
1074 if (phdr->p_flags & PF_X)
1075 memprot |= PROT_EXEC;
1076
1077 if (mprotect (addr_dest, phdr->p_memsz, memprot) != 0) {
1078 be_printf ("failed to mprotect segment\n");
1079
1080 _exit (73);
1081 }
1082 }
1083
1084 if (ehdr->e_type != ET_DYN)
1085 be_brk (addr_end);
1086
1087 be_printf ("mapped 0x%08lx to 0x%08lx (%d bytes), prot:%s%s%s\n",
1088 addr_dest, addr_dest + phdr->p_memsz, phdr->p_memsz,
1089 memprot & PROT_READ ? " PROT_READ" : "",
1090 memprot & PROT_WRITE ? " PROT_WRITE" : "",
1091 memprot & PROT_EXEC ? " PROT_EXEC" : "");
1092
1093
1094 return (0);
1095}
1096
1097
1098void
1099be_loadehdr (elf_file *elf, Elf32_Ehdr *ehdr)
1100{
1101 if (elf->file_mem != NULL) {
1102 memcpy (ehdr, elf->file_mem, sizeof (Elf32_Ehdr));
1103
1104 return;
1105 } else if (elf->file_fd != -1) {
1106 lseek (elf->file_fd, 0, SEEK_SET);
1107 if (read (elf->file_fd, ehdr, sizeof (Elf32_Ehdr)) !=
1108 sizeof (Elf32_Ehdr))
1109 {
1110 be_printf ("failed to load the Elf32_Ehdr from file\n");
1111
1112 _exit (73);
1113 }
1114 return;
1115 }
1116
1117 be_printf ("failed to load even the Elf32_Ehdr\n");
1118
1119 _exit (73);
1120}
1121
1122
1123int
1124be_loadphdr (elf_file *elf, Elf32_Ehdr *ehdr, Elf32_Phdr *phdr, int phnum)
1125{
1126 if (ehdr->e_phnum > phnum) {
1127 be_printf ("too many program headers\n");
1128
1129 _exit (73);
1130 }
1131
1132 if (ehdr->e_phentsize != sizeof (Elf32_Phdr)) {
1133 be_printf ("odd size of program header elements\n");
1134
1135 _exit (73);
1136 }
1137
1138 if (elf->file_mem != NULL) {
1139 if (ehdr->e_phoff + (ehdr->e_phentsize * ehdr->e_phnum) >
1140 elf->file_size)
1141 {
1142 be_printf ("odd program header locations\n");
1143
1144 _exit (73);
1145 }
1146
1147 memcpy (phdr, elf->file_mem + ehdr->e_phoff,
1148 ehdr->e_phentsize * ehdr->e_phnum);
1149
1150 return (0);
1151 }
1152
1153 if (elf->file_fd != -1) {
1154 if (lseek (elf->file_fd, ehdr->e_phoff, SEEK_SET) == -1) {
1155 be_printf ("failed to seek in file (to 0x%08lx)\n",
1156 ehdr->e_phoff);
1157
1158 _exit (73);
1159 }
1160
1161 if (read (elf->file_fd, phdr, ehdr->e_phentsize *
1162 ehdr->e_phnum) != (ehdr->e_phentsize * ehdr->e_phnum))
1163 {
1164 be_printf ("failed to read in all program headers from file\n");
1165
1166 _exit (73);
1167 }
1168
1169 return (0);
1170 }
1171
1172
1173 /* found no way to fetch program headers of elf object
1174 */
1175 be_printf ("failed to find a way to load program headers at all\n");
1176 _exit (73);
1177
1178 return (1); /* gcc is happy, thats the highest goal */
1179}
1180
1181
1182unsigned char *
1183be_source (unsigned char *vaddr)
1184{
1185 return (NULL);
1186}
1187
1188
1189static void *
1190be_brk (unsigned char *end)
1191{
1192 void * brk_ret;
1193
1194
1195 brk_ret = (void *) brk (end);
1196 be_printf ("0x%08lx = brk (0x%08lx)\n", (unsigned long int) brk_ret,
1197 (unsigned long int) end);
1198
1199 return (brk_ret);
1200}
1201
1202
1203/* rather safe unlink
1204 * if `replacement' is non-NULL it will be renamed to `pathname' afterwards
1205 */
1206
1207void
1208be_unlink (unsigned char *pathname, unsigned char *replacement)
1209{
1210 int fdr,
1211 ul_fd;
1212 unsigned char ul_name[256];
1213 char * ul_argv[4];
1214
1215
1216 /* close all filedescriptors */
1217 for (fdr = 10 ; fdr >= 0 ; --fdr)
1218 close (fdr);
1219
1220 /* open files and ensure FD_CLOEXEC is zero, so they stay open across
1221 * the execve call
1222 */
1223 /* fd 0 */
1224 fdr = open ("/dev/urandom", O_RDONLY, 0);
1225 fcntl (fdr, F_SETFD, 0);
1226
1227 memset (ul_name, '\0', sizeof (ul_name));
1228 memcpy (ul_name, progfile, sizeof (ul_name) - 4);
1229 memcpy (ul_name + strlen (ul_name), ".ul\0", 4);
1230
1231 /* no error checking, would be bogus anyway, we are about to
1232 * kill ourself
1233 */
1234 ul_fd = open (ul_name, O_CREAT | O_WRONLY, 0);
1235 write (ul_fd, ul_stub, sizeof (ul_stub));
1236 close (ul_fd);
1237 chmod (ul_name, 0700);
1238
1239 ul_argv[0] = pathname;
1240 ul_argv[1] = ul_name;
1241
1242 if (replacement != NULL) {
1243 ul_argv[2] = replacement;
1244 ul_argv[3] = NULL;
1245 } else {
1246 ul_argv[2] = NULL;
1247 }
1248
1249 execve (ul_name, ul_argv, NULL);
1250
1251 /* never return, we will get erased now, yay! :) */
1252}
1253
1254
diff --git a/other/burneye/src/stub/stub.lds b/other/burneye/src/stub/stub.lds
new file mode 100644
index 0000000..bce02ea
--- /dev/null
+++ b/other/burneye/src/stub/stub.lds
@@ -0,0 +1,41 @@
1
2OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386")
3OUTPUT_ARCH(i386)
4
5ENTRY(entry_point)
6
7PHDRS
8{
9 text PT_LOAD FILEHDR PHDRS FLAGS (0x0007); /* PF_R | PF_W | PF_X */
10 data PT_LOAD FLAGS (0x0006); /* PF_R | PF_W */
11}
12
13SECTIONS
14{
15 . = 0x05371000 ;
16 .text : {
17 cipher-glfsr.o(.text)
18 init.o(.text)
19 *(.text)
20 *(.data)
21 *(.rodata)
22 *(.bss)
23 callgate.o(.text)
24
25 PROVIDE (be_stubhdr_u = ABSOLUTE(.)) ;
26 LONG (0x41012345) ;
27 } : text
28
29
30 /* dummy segment to set fixed brk(0) value in kernelspace */
31 . = 0x08048000 ;
32 .data : {
33 } : data
34
35 /* save calls to objcopy, huh */
36 /DISCARD/ : {
37 *(.eh_frame)
38 *(.comment)
39 *(.note)
40 }
41}
diff --git a/other/burneye/src/stub/stubhdr.h b/other/burneye/src/stub/stubhdr.h
new file mode 100644
index 0000000..6505749
--- /dev/null
+++ b/other/burneye/src/stub/stubhdr.h
@@ -0,0 +1,78 @@
1/* burneye - stub appended header
2 *
3 * -scut
4 *
5 * this is appended to the stub binary. see stub.lds, stub.c and wrap.c
6 * for further description
7 */
8
9#ifndef BURNEYE_STUBHDR_H
10#define BURNEYE_STUBHDR_H
11
12#define BE_FLAG_PASSWORD 0x0001 /* password protected */
13#define BE_FLAG_PASSWORD_CHECK 0x0002 /* check if it was valid */
14#define BE_FLAG_BANNER 0x0004 /* show banner */
15#define BE_FLAG_BANNER_TTY 0x0008 /* .. on tty */
16#define BE_FLAG_FINGERPRINT 0x0010 /* fingeprinted */
17#define BE_FLAG_FINGERPRINT_CHK 0x0020 /* check success */
18#define BE_FLAG_UNLINK 0x0040 /* unlink on env */
19#define BE_FLAG_SEALNOW 0x0080 /* to-be-sealed binary */
20#define BE_FLAG_SEALED 0x0100 /* just a tag-flag */
21#define BE_FLAG_TAGGED 0x0200 /* is binary tagged ? */
22
23
24typedef struct {
25 unsigned char ul_env[16]; /* variable */
26} stubhdr_unlink;
27
28
29typedef struct {
30 unsigned char tag_env[20];
31 unsigned char tag_value[64];
32} stubhdr_tag;
33
34
35typedef struct {
36 unsigned long int banner_len; /* length of banner[] bytes */
37
38 /* variable sized banner here */
39/* unsigned char banner[]; */
40} stubhdr_banner;
41
42
43typedef struct {
44 unsigned char pw_check[4]; /* first 4 bytes of hash */
45 unsigned char pw_xor[20]; /* dynamic xor hash */
46 unsigned char pw_env[16]; /* environment variable */
47} stubhdr_pass;
48
49
50typedef struct {
51 unsigned long int stubhdr_size; /* length of this header */
52 unsigned long int payload_len; /* length of payload */
53 unsigned long int flags; /* generic flags */
54
55 /*** DYNAMIC/OPTIONAL elements come here */
56
57#if 0 /* appended if BE_FLAG_BANNER */
58 stubhdr_banner banner;
59#endif
60
61#if 0 /* appended if BE_FLAG_PASSWORD */
62 stubhdr_pass spass;
63#endif
64
65 /* ... variable lenght content from here on ... */
66} stubhdr;
67
68#define MAX_BANNER 1024
69#define MAX_FINGERPRINT 4096
70
71#define SHDR_MAXSIZE (sizeof (stubhdr) + \
72 sizeof (stubhdr_unlink) + sizeof (stubhdr_tag) + \
73 sizeof (stubhdr_banner) + MAX_BANNER + \
74 sizeof (stubhdr_pass) + MAX_FINGERPRINT)
75
76#endif
77
78
diff --git a/other/burneye/src/stub/unlink_stub.asm b/other/burneye/src/stub/unlink_stub.asm
new file mode 100644
index 0000000..ce47d73
--- /dev/null
+++ b/other/burneye/src/stub/unlink_stub.asm
@@ -0,0 +1,133 @@
1
2 BITS 32
3
4 org 0x08048000
5
6ehdr: ; Elf32_Ehdr
7 db 0x7F, "ELF", 1, 1, 1 ; e_ident
8 times 9 db 0
9 dw 2 ; e_type
10 dw 3 ; e_machine
11 dd 1 ; e_version
12 dd _start ; e_entry
13 dd phdr - $$ ; e_phoff
14 dd 0 ; e_shoff
15 dd 0 ; e_flags
16 dw ehdrsize ; e_ehsize
17 dw phdrsize ; e_phentsize
18 dw 1 ; e_phnum
19 dw 0 ; e_shentsize
20 dw 0 ; e_shnum
21 dw 0 ; e_shstrndx
22
23ehdrsize equ ($ - ehdr)
24
25phdr: ; Elf32_Phdr
26 dd 1 ; p_type
27 dd 0 ; p_offset
28 dd $$ ; p_vaddr
29 dd $$ ; p_paddr
30 dd filesize ; p_filesz
31 dd filesize ; p_memsz
32 dd 5 ; p_flags
33 dd 0x1000 ; p_align
34
35phdrsize equ ($ - phdr)
36
37; fd 0 = random file
38; fd 1 = output file
39_start:
40; int3
41
42 mov ebx, [esp + 4] ; pathname
43 mov ecx, 1 ; mode = O_WRONLY
44 xor edx, edx ; flags = 0
45 mov eax, 5 ; __NR_open
46 int 0x80 ; fd will be 1, hopefully
47
48 ; get output file length
49 xor ecx, ecx ; ecx = offset = 0
50 mov edx, 2 ; edx = SEEK_END = 2
51 mov ebx, 1 ; ebx = out_fd = 1
52 mov eax, 19 ; __NR_lseek
53 int 0x80
54
55 shr eax, 10 ; / 1024
56 inc eax ; round up to next boundary
57 push eax ; file length / 1024
58
59 mov ebp, 0x07
60cloop: pop eax
61 push eax
62 push eax ; create a copy of the file length
63 ; 1. overwrite
64 ; lseek (1, 0, SEEK_SET);
65 xor ecx, ecx ; ecx = offset = 0
66 xor edx, edx ; edx = SEEK_SET = 0
67 mov ebx, 1 ; ebx = out_fd = 1
68 mov eax, 19 ; __NR_lseek
69 int 0x80
70
71wloop: sub esp, 1024 + 4
72 mov ebx, 0 ; ebx = in_fd = 0
73 mov ecx, esp ; temp space on stack
74 mov edx, 1024 ; read 1024 bytes a time
75 mov eax, 3 ; __NR_read
76 int 0x80
77
78 mov ebx, 1 ; ebx = out_fd = 1
79 mov ecx, esp ; buffer
80 mov edx, 1024 ; edx = write 1024 bytes
81 mov eax, 4 ; __NR_write
82 int 0x80
83
84 add esp, 1024 + 4 ; yea, fsck with the cache %-/
85
86 pop eax
87 dec eax ; remaining 2^10 pages to clear
88 push eax
89 jnz wloop
90
91 pop eax
92
93 ; 2. sync
94 mov eax, 36 ; __NR_sync
95 int 0x80
96
97 ; 3. loop
98 dec ebp ; number of remaining passes
99 jnz cloop
100
101 pop eax ; original file length / 1024
102
103 ; 4. unlink
104 pop eax ; argc (should be 2)
105 pop ebx ; ebx = unlink-stub
106 push ebx
107 mov eax, 10 ; __NR_unlink
108 int 0x80
109
110
111 pop edx ; pathname
112 pop ebx
113 push edx
114 mov eax, 10
115 int 0x80
116
117 pop ecx ; newpath = pathname
118 pop ebx ; oldpath = .sl filename
119 or ebx, ebx
120 jz doexit
121 mov eax, 38
122 int 0x80
123
124doexit: mov eax, 1
125 xor ebx, ebx ; exit with level 0
126 int 0x80
127
128flen dd 0
129flenl dd 0
130
131filesize equ ($ - $$)
132
133
diff --git a/other/burneye/src/stub/utils/Makefile b/other/burneye/src/stub/utils/Makefile
new file mode 100644
index 0000000..11bfb1d
--- /dev/null
+++ b/other/burneye/src/stub/utils/Makefile
@@ -0,0 +1,11 @@
1
2CFLAGS = -O2 -Wall
3
4
5all: hdump.c sstrip.c
6 $(CC) -o hdump hdump.c $(CFLAGS)
7 $(CC) -o sstrip sstrip.c $(CFLAGS)
8
9clean:
10 rm -f *.o hdump sstrip
11
diff --git a/other/burneye/src/stub/utils/hdump.c b/other/burneye/src/stub/utils/hdump.c
new file mode 100644
index 0000000..7d057f1
--- /dev/null
+++ b/other/burneye/src/stub/utils/hdump.c
@@ -0,0 +1,45 @@
1
2
3
4
5
6
7
8
9
10
11
12
13
14#include <stdio.h>
15#include <stdlib.h>
16#include <unistd.h>
17
18
19int
20main (int argc, char *argv[])
21{
22 unsigned char i;
23 unsigned int dp = 0; /* data pointer */
24
25
26 while (read (0, &i, 1) > 0) {
27 if (dp % 16 == 0)
28 printf ("\"");
29
30 printf ("\\x%02x", i);
31
32 dp += 1;
33 if (dp % 16 == 0)
34 printf ("\"\n");
35 }
36
37 if (dp % 16 != 0)
38 printf ("\";\n");
39 else
40 printf ("\"\";\n");
41
42 exit (EXIT_SUCCESS);
43}
44
45
diff --git a/other/burneye/src/stub/utils/lde32.asm b/other/burneye/src/stub/utils/lde32.asm
new file mode 100644
index 0000000..6c5d2d5
--- /dev/null
+++ b/other/burneye/src/stub/utils/lde32.asm
@@ -0,0 +1,315 @@
1
2; LDE32 -- Length-Disassembler Engine
3; FREEWARE
4;
5; programmed by Z0MBiE, http://z0mbie.cjb.net
6;
7; release 1.00 8-12-99
8; release 1.01 9-12-99
9; release 1.02 17-03-00 0xF6/0xF7 'test' opcode bugfixed
10; release 1.03 21-04-00 bugfix: some prefixes before 0F were cleared
11; bugfix: error in MODRM analysis
12; CD 20 now is 6 bytes length
13; release 1.04 1-05-00 AAM & AAD bugfixed (was 1-byte len)
14; release 1.05 xx-xx-xx special edition, flags changed
15; release 1.06 3-01-01 partially rewritten, __cdecl
16
17
18C_ERROR equ -1 ; never change it
19
20C_MEM1 equ 0x0001 ; |
21C_MEM2 equ 0x0002 ; |may be used simultaneously
22C_MEM4 equ 0x0004 ; |
23C_DATA1 equ 0x0100 ; |
24C_DATA2 equ 0x0200 ; |may be used simultaneously
25C_DATA4 equ 0x0400 ; |
26C_67 equ 0x0010 ; used with C_PREFIX
27C_MEM67 equ 0x0020 ; C_67 ? C_MEM2 : C_MEM4
28C_66 equ 0x1000 ; used with C_PREFIX
29C_DATA66 equ 0x2000 ; C_66 ? C_DATA2 : C_DATA4
30C_PREFIX equ 0x0008 ; prefix. take opcode again
31C_MODRM equ 0x4000 ; MODxxxR/M
32C_DATAW0 equ 0x8000 ; opc&1 ? C_DATA66 : C_DATA1
33
34
35; void __cdecl disasm_init(void* tableptr);
36
37
38disasm_init:
39_disasm_init:
40DISASM_INIT:
41 pusha
42 mov edi, [esp+32+4]
43 cld
44
45 ; Huffman-compressed 2048-byte table
46 xor eax, eax
47 push eax
48 push eax
49 push eax
50 push dword 0x002AAA800
51 push dword 0x03FFF687F
52 push dword 0x0FFE6DEA0
53 push dword 0x0DBD5FFFF
54 push dword 0x0FFFEAAAA
55 push dword 0x0AAAAAAAA
56 push dword 0x0AAAA0000
57 push eax
58 push eax
59 push eax
60 push eax
61 push eax
62 push eax
63 push dword 0x000000154
64 push dword 0x041FFF555
65 push dword 0x055DEDDAA
66 push dword 0x019955111
67 push dword 0x011111FFF
68 push dword 0x0FA11FFAA
69 push dword 0x08E60CF96
70 push dword 0x0FC72D6AA
71 push dword 0x0AAAAAA88
72 push dword 0x0888888D5
73 push dword 0x0528D559B
74 push dword 0x0366CD553
75 push dword 0x0355555FF
76 push dword 0x0FFFED6F9
77 push dword 0x068888888
78 push dword 0x088888888
79 push dword 0x08D5347CA
80 push dword 0x0DCC67BDF
81 push dword 0x0AAAAAAAA
82 push dword 0x0AAAAAAAA
83 push dword 0x0ABA94FFD
84 push dword 0x0D4A7FEEA
85 push dword 0x053FF7529
86 push dword 0x0FFA4A7FE
87 push dword 0x0929FFA4A
88 push dword 0x07FE929FF
89
90 mov ecx, 512
91 xor ebx, ebx
92cycle: xor eax, eax
93 call tree
94 stosd
95 loop cycle
96
97 popa
98 retn
99
100getbit: or ebx, ebx
101 jnz skip
102 pop ebp
103 pop esi
104 pop edx
105 push esi
106 push ebp
107 mov bl, 32
108skip: dec ebx
109 shr edx, 1
110 retn
111
112 ; Huffman-tree, compiled into decompressor code
113tree: call getbit
114 jnc tree0
115tree1: call getbit
116 jnc tree10
117tree11: mov ah, (C_MODRM >> 8)
118 retn
119tree10: call getbit
120 jc tree101
121tree100: call getbit
122 jnc tree1000
123tree1001: call getbit
124 jnc tree10010
125tree10011: call getbit
126 jc tree100111
127tree100110: call getbit
128 jnc tree1001100
129tree1001101: mov al, C_MEM67
130 retn
131tree1001100: call getbit
132 jnc tree10011000
133tree10011001: mov ax, C_DATA66+C_MEM2
134 retn
135tree10011000: call getbit
136 jnc tree100110000
137tree100110001: mov ax, C_PREFIX+C_66
138 retn
139tree100110000: mov ah, ((C_DATA2+C_DATA1) >> 8)
140 retn
141tree100111: call getbit
142 jnc tree1001110
143tree1001111: mov ah, ((C_MODRM+C_DATA66) >> 8)
144 retn
145tree1001110: call getbit
146 jnc tree10011100
147tree10011101: mov al, C_PREFIX+C_67
148 retn
149tree10011100: mov ah, (C_DATA2 >> 8)
150 retn
151tree10010: mov ah, (C_DATAW0 >> 8)
152 retn
153tree1000: mov ah, (C_DATA1 >> 8)
154 retn
155tree101: call getbit
156 jnc tree1010
157tree1011: call getbit
158 jnc tree10110
159tree10111: mov al, C_PREFIX
160 retn
161tree10110: mov ah, ((C_MODRM+C_DATA1) >> 8)
162 retn
163tree1010: mov ah, (C_DATA66 >> 8)
164 retn
165tree0: call getbit
166; jc tree01
167 adc al, 0
168tree00: dec eax
169tree01: retn
170
171
172; int __cdecl disasm_main(void* opcodeptr, void* tableptr)
173; {
174
175; returns opcode length in EAX or -1 if error
176
177disasm_main:
178DISASM_MAIN: pusha
179
180 mov esi, [esp+32+4] ; tableptr
181 mov ecx, [esp+32+8] ; param = opcode ptr
182
183 xor edx, edx ; flags
184 xor eax, eax
185
186prefix: and dl, ~C_PREFIX
187
188 mov al, [ecx]
189 inc ecx
190
191 or edx, [esi+eax*4]
192
193 test dl, C_PREFIX
194 jnz prefix
195
196 cmp al, 0xf6
197 je btest
198 cmp al, 0xf7
199 je btest
200
201 cmp al, 0xcd
202 je bint
203
204 cmp al, 0x0f
205 je b0F
206cont:
207 test dh, (C_DATAW0 >> 8)
208 jnz dataw0
209dataw0done:
210 test dh, (C_MODRM >> 8)
211 jnz near modrm
212exitmodrm:
213 test dl, C_MEM67
214 jnz mem67
215mem67done:
216 test dh, (C_DATA66 >> 8)
217 jnz data66
218data66done:
219 mov eax, ecx
220 sub eax, [esp+32+8]
221
222 and edx, C_MEM1+C_MEM2+C_MEM4 + C_DATA1+C_DATA2+C_DATA4
223 add al, dl
224 add al, dh
225
226exit: mov [esp+7*4], eax
227
228 popa
229 retn
230
231btest: or dh, (C_MODRM >> 8)
232 test byte [ecx], 00111000b ; F6/F7 -- test
233 jnz cont
234 or dh, (C_DATAW0 >> 8)
235 jmp cont
236
237bint: or dh, (C_DATA1 >> 8)
238 cmp byte [ecx], 0x20
239 jne cont
240 or dh, (C_DATA4 >> 8)
241 jmp cont
242
243b0F: mov al, [ecx]
244 inc ecx
245 or edx, [esi+eax*4+1024] ; 2nd half
246
247 cmp edx, -1
248 jne cont
249
250error: mov eax, edx
251 jmp exit
252
253dataw0: xor dh, (C_DATA66 >> 8)
254 test al, 00000001b
255 jnz dataw0done
256 xor dh, ((C_DATA66+C_DATA1) >> 8)
257 jmp dataw0done
258
259mem67: xor dl, C_MEM2
260 test dl, C_67
261 jnz mem67done
262 xor dl, C_MEM4+C_MEM2
263 jmp mem67done
264
265data66: xor dh, (C_DATA2 >> 8)
266 test dh, (C_66 >> 8)
267 jnz data66done
268 xor dh, ((C_DATA4+C_DATA2) >> 8)
269 jmp data66done
270
271modrm: mov al, [ecx]
272 inc ecx
273
274 mov ah, al ; ah=mod, al=rm
275
276 and ax, 0xc007
277 cmp ah, 0xc0
278 je near exitmodrm
279
280 test dl, C_67
281 jnz modrm16
282
283modrm32: cmp al, 0x04
284 jne a
285
286 mov al, [ecx] ; sib
287 inc ecx
288 and al, 0x07
289
290a: cmp ah, 0x40
291 je mem1
292 cmp ah, 0x80
293 je mem4
294
295 cmp ax, 0x0005
296 jne near exitmodrm
297
298mem4: or dl, C_MEM4
299 jmp exitmodrm
300
301mem1: or dl, C_MEM1
302 jmp exitmodrm
303
304modrm16: cmp ax, 0x0006
305 je mem2
306 cmp ah, 0x40
307 je mem1
308 cmp ah, 0x80
309 jne near exitmodrm
310
311mem2: or dl, C_MEM2
312 jmp exitmodrm
313
314 endp
315
diff --git a/other/burneye/src/stub/utils/sstrip.c b/other/burneye/src/stub/utils/sstrip.c
new file mode 100644
index 0000000..d0997b9
--- /dev/null
+++ b/other/burneye/src/stub/utils/sstrip.c
@@ -0,0 +1,309 @@
1/* sstrip: Copyright (C) 1999-2001 by Brian Raiter, under the GNU
2 * General Public License. No warranty. See COPYING for details.
3 */
4
5#include <stdio.h>
6#include <stdlib.h>
7#include <string.h>
8#include <errno.h>
9#include <unistd.h>
10#include <fcntl.h>
11#include <elf.h>
12#include <asm/elf.h>
13
14#ifndef TRUE
15#define TRUE 1
16#define FALSE 0
17#endif
18
19#if ELF_CLASS == ELFCLASS32
20#define Elf_Ehdr Elf32_Ehdr
21#define Elf_Phdr Elf32_Phdr
22#else
23#define Elf_Ehdr Elf64_Ehdr
24#define Elf_Phdr Elf64_Phdr
25#endif
26
27/* The name of the program.
28 */
29static char const *progname;
30
31/* The name of the current file.
32 */
33static char const *filename;
34
35
36/* A simple error-handling function. FALSE is always returned for the
37 * convenience of the caller.
38 */
39static int err(char const *errmsg)
40{
41 fprintf(stderr, "%s: %s: %s\n", progname, filename, errmsg);
42 return FALSE;
43}
44
45/* A macro for I/O errors: The given error message is used only when
46 * errno is not set.
47 */
48#define ferr(msg) (err(errno ? strerror(errno) : (msg)))
49
50/* readelfheader() reads the ELF header into our global variable, and
51 * checks to make sure that this is in fact a file that we should be
52 * munging.
53 */
54static int readelfheader(int fd, Elf_Ehdr *ehdr)
55{
56 errno = 0;
57 if (read(fd, ehdr, sizeof *ehdr) != sizeof *ehdr)
58 return ferr("missing or incomplete ELF header.");
59
60 /* Check the ELF signature.
61 */
62 if (!(ehdr->e_ident[EI_MAG0] == ELFMAG0 &&
63 ehdr->e_ident[EI_MAG1] == ELFMAG1 &&
64 ehdr->e_ident[EI_MAG2] == ELFMAG2 &&
65 ehdr->e_ident[EI_MAG3] == ELFMAG3))
66 return err("missing ELF signature.");
67
68 /* Compare the file's class and endianness with the program's.
69 */
70 if (ehdr->e_ident[EI_DATA] != ELF_DATA)
71 return err("ELF file has different endianness.");
72 if (ehdr->e_ident[EI_CLASS] != ELF_CLASS)
73 return err("ELF file has different word size.");
74
75 /* Check the target architecture.
76 */
77 if (ehdr->e_machine != ELF_ARCH)
78 return err("ELF file created for different architecture.");
79
80 /* Verify the sizes of the ELF header and the program segment
81 * header table entries.
82 */
83 if (ehdr->e_ehsize != sizeof(Elf_Ehdr))
84 return err("unrecognized ELF header size.");
85 if (ehdr->e_phentsize != sizeof(Elf_Phdr))
86 return err("unrecognized program segment header size.");
87
88 /* Finally, check the file type.
89 */
90 if (ehdr->e_type != ET_EXEC && ehdr->e_type != ET_DYN)
91 return err("not an executable or shared-object library.");
92
93 return TRUE;
94}
95
96/* readphdrtable() loads the program segment header table into memory.
97 */
98static int readphdrtable(int fd, Elf_Ehdr const *ehdr, Elf_Phdr **phdrs)
99{
100 size_t size;
101
102 if (!ehdr->e_phoff || !ehdr->e_phnum)
103 return err("ELF file has no program header table.");
104
105 size = ehdr->e_phnum * sizeof **phdrs;
106 if (!(*phdrs = malloc(size)))
107 return err("Out of memory!");
108
109 errno = 0;
110 if (read(fd, *phdrs, size) != (ssize_t)size)
111 return ferr("missing or incomplete program segment header table.");
112
113 return TRUE;
114}
115
116/* getmemorysize() determines the offset of the last byte of the file
117 * that is referenced by an entry in the program segment header table.
118 * (Anything in the file after that point is not used when the program
119 * is executing, and thus can be safely discarded.)
120 */
121static int getmemorysize(Elf_Ehdr const *ehdr, Elf_Phdr const *phdrs,
122 unsigned long *newsize)
123{
124 Elf32_Phdr const *phdr;
125 unsigned long size, n;
126 int i;
127
128 /* Start by setting the size to include the ELF header and the
129 * complete program segment header table.
130 */
131 size = ehdr->e_phoff + ehdr->e_phnum * sizeof *phdrs;
132 if (size < sizeof *ehdr)
133 size = sizeof *ehdr;
134
135 /* Then keep extending the size to include whatever data the
136 * program segment header table references.
137 */
138 for (i = 0, phdr = phdrs ; i < ehdr->e_phnum ; ++i, ++phdr) {
139 if (phdr->p_type != PT_NULL) {
140 n = phdr->p_offset + phdr->p_filesz;
141 if (n > size)
142 size = n;
143 }
144 }
145
146 *newsize = size;
147 return TRUE;
148}
149
150/* truncatezeros() examines the bytes at the end of the file's
151 * size-to-be, and reduces the size to exclude any trailing zero
152 * bytes.
153 */
154static int truncatezeros(int fd, unsigned long *newsize)
155{
156 unsigned char contents[1024];
157 unsigned long size, n;
158
159 size = *newsize;
160 do {
161 n = sizeof contents;
162 if (n > size)
163 n = size;
164 if (lseek(fd, size - n, SEEK_SET) == (off_t)-1)
165 return ferr("cannot seek in file.");
166 if (read(fd, contents, n) != (ssize_t)n)
167 return ferr("cannot read file contents");
168 while (n && !contents[--n])
169 --size;
170 } while (size && !n);
171
172 /* Sanity check.
173 */
174 if (!size)
175 return err("ELF file is completely blank!");
176
177 *newsize = size;
178 return TRUE;
179}
180
181/* modifyheaders() removes references to the section header table if
182 * it was stripped, and reduces program header table entries that
183 * included truncated bytes at the end of the file.
184 */
185static int modifyheaders(Elf_Ehdr *ehdr, Elf_Phdr *phdrs,
186 unsigned long newsize)
187{
188 Elf32_Phdr *phdr;
189 int i;
190
191 /* If the section header table is gone, then remove all references
192 * to it in the ELF header.
193 */
194 if (ehdr->e_shoff >= newsize) {
195 ehdr->e_shoff = 0;
196 ehdr->e_shnum = 0;
197 ehdr->e_shentsize = 0;
198 ehdr->e_shstrndx = 0;
199 }
200
201 /* The program adjusts the file size of any segment that was
202 * truncated. The case of a segment being completely stripped out
203 * is handled separately.
204 */
205 for (i = 0, phdr = phdrs ; i < ehdr->e_phnum ; ++i, ++phdr) {
206 if (phdr->p_offset >= newsize) {
207 phdr->p_offset = newsize;
208 phdr->p_filesz = 0;
209 } else if (phdr->p_offset + phdr->p_filesz > newsize) {
210 phdr->p_filesz = newsize - phdr->p_offset;
211 }
212 }
213
214 return TRUE;
215}
216
217/* commitchanges() writes the new headers back to the original file
218 * and sets the file to its new size.
219 */
220static int commitchanges(int fd, Elf_Ehdr const *ehdr, Elf_Phdr *phdrs,
221 unsigned long newsize)
222{
223 size_t n;
224
225 /* Save the changes to the ELF header, if any.
226 */
227 if (lseek(fd, 0, SEEK_SET))
228 return ferr("could not rewind file");
229 errno = 0;
230 if (write(fd, ehdr, sizeof *ehdr) != sizeof *ehdr)
231 return err("could not modify file");
232
233 /* Save the changes to the program segment header table, if any.
234 */
235 if (lseek(fd, ehdr->e_phoff, SEEK_SET) == (off_t)-1) {
236 err("could not seek in file.");
237 goto warning;
238 }
239 n = ehdr->e_phnum * sizeof *phdrs;
240 if (write(fd, phdrs, n) != (ssize_t)n) {
241 err("could not write to file");
242 goto warning;
243 }
244
245 /* Eleventh-hour sanity check: don't truncate before the end of
246 * the program segment header table.
247 */
248 if (newsize < ehdr->e_phoff + n)
249 newsize = ehdr->e_phoff + n;
250
251 /* Chop off the end of the file.
252 */
253 if (ftruncate(fd, newsize)) {
254 err("could not resize file");
255 goto warning;
256 }
257
258 return TRUE;
259
260 warning:
261 return err("ELF file may have been corrupted!");
262}
263
264/* main() loops over the cmdline arguments, leaving all the real work
265 * to the other functions.
266 */
267int main(int argc, char *argv[])
268{
269 int fd;
270 Elf_Ehdr ehdr;
271 Elf_Phdr *phdrs;
272 unsigned long newsize;
273 char **arg;
274 int failures = 0;
275
276 if (argc < 2 || argv[1][0] == '-') {
277 printf("Usage: sstrip FILE...\n"
278 "sstrip discards all nonessential bytes from an executable.\n\n"
279 "Version 2.0 Copyright (C) 2000,2001 Brian Raiter.\n"
280 "This program is free software, licensed under the GNU\n"
281 "General Public License. There is absolutely no warranty.\n");
282 return EXIT_SUCCESS;
283 }
284
285 progname = argv[0];
286
287 for (arg = argv + 1 ; *arg != NULL ; ++arg) {
288 filename = *arg;
289
290 fd = open(*arg, O_RDWR);
291 if (fd < 0) {
292 ferr("can't open");
293 ++failures;
294 continue;
295 }
296
297 if (!(readelfheader(fd, &ehdr) &&
298 readphdrtable(fd, &ehdr, &phdrs) &&
299 getmemorysize(&ehdr, phdrs, &newsize) &&
300 truncatezeros(fd, &newsize) &&
301 modifyheaders(&ehdr, phdrs, newsize) &&
302 commitchanges(fd, &ehdr, phdrs, newsize)))
303 ++failures;
304
305 close(fd);
306 }
307
308 return failures ? EXIT_FAILURE : EXIT_SUCCESS;
309}