dmiller
40f36a4e3e
Some string optimizations in NSE
...
Changes fall into these categories:
1. Avoid pathological string building. Loops over x = x .. "foo" can
become very slow. Instead, use strbuf.lua, table.concat, or just one
continuous concatenation; a = x .. y .. z is one operation, better than
a = x .. y; a = a .. z
2. Use hex-escaped strings instead of string.char. I find this more
readable in many cases, and it avoids a table lookup and function call.
3. Don't duplicate code. A few libraries and scripts had re-implemented
stdnse.generate_random_string or openssl.rand_bytes.
2014-09-03 04:49:54 +00:00
..
2014-08-25 01:12:59 +00:00
2014-06-19 04:58:46 +00:00
2014-08-03 00:56:45 +00:00
2014-09-03 04:49:54 +00:00
2014-06-18 17:16:24 +00:00
2014-08-03 00:56:45 +00:00
2014-02-19 04:15:46 +00:00
2014-02-19 04:15:46 +00:00
2014-03-10 19:01:14 +00:00
2010-07-12 19:42:43 +00:00
2014-02-10 17:27:09 +00:00
2014-08-03 00:56:45 +00:00
2014-02-19 04:15:46 +00:00
2014-08-03 00:56:45 +00:00
2014-09-03 04:49:54 +00:00
2014-08-09 18:06:14 +00:00
2014-09-02 18:23:09 +00:00
2014-09-02 18:23:06 +00:00
2014-02-03 19:47:34 +00:00
2014-08-03 00:56:45 +00:00
2014-08-03 00:56:45 +00:00
2014-08-03 00:56:45 +00:00
2014-08-03 00:56:45 +00:00
2014-08-03 01:17:09 +00:00
2014-08-03 00:56:45 +00:00
2014-08-03 00:56:45 +00:00
2014-08-03 00:56:45 +00:00
2014-08-03 00:56:45 +00:00
2014-03-10 19:01:19 +00:00
2014-02-03 19:47:34 +00:00
2014-02-19 04:15:46 +00:00
2014-08-03 00:56:45 +00:00
2014-08-29 19:58:15 +00:00
2014-08-23 21:35:32 +00:00
2014-08-03 00:56:45 +00:00
2014-08-03 00:56:45 +00:00
2014-02-19 04:15:46 +00:00
2014-03-10 19:01:19 +00:00
2014-08-03 00:56:45 +00:00
2014-08-03 00:56:45 +00:00
2014-09-02 18:23:06 +00:00
2014-02-19 04:15:46 +00:00
2014-09-02 18:23:06 +00:00
2014-09-02 18:23:06 +00:00
2014-08-03 00:56:45 +00:00
2014-09-02 18:23:06 +00:00
2014-02-03 19:47:34 +00:00
2014-08-26 18:53:52 +00:00
2014-06-26 20:12:54 +00:00
2014-08-03 00:56:45 +00:00
2014-08-23 21:35:32 +00:00
2014-08-03 01:17:09 +00:00
2014-09-03 04:49:54 +00:00
2014-08-03 00:56:45 +00:00
2014-09-02 18:23:06 +00:00
2014-09-03 04:49:54 +00:00
2014-09-03 04:49:54 +00:00
2014-02-03 19:47:34 +00:00
2014-08-03 00:56:45 +00:00
2014-02-19 04:15:46 +00:00
2014-09-03 04:49:54 +00:00
2014-08-09 17:49:11 +00:00
2014-02-19 04:15:46 +00:00
2014-08-03 00:56:45 +00:00
2014-08-03 00:56:45 +00:00
2014-08-03 01:17:09 +00:00
2014-08-03 00:56:45 +00:00
2014-08-03 00:56:45 +00:00
2010-07-12 19:42:43 +00:00
2014-08-03 00:56:45 +00:00
2014-02-03 19:47:34 +00:00
2014-08-03 00:56:45 +00:00
2014-08-03 01:17:09 +00:00
2014-08-03 00:56:45 +00:00
2014-07-31 19:18:04 +00:00
2014-02-03 19:47:34 +00:00
2014-08-03 00:56:45 +00:00
2014-09-02 18:23:09 +00:00
2014-02-19 04:15:46 +00:00
2014-02-19 04:15:46 +00:00
2014-08-03 00:56:45 +00:00
2014-08-03 00:56:45 +00:00
2014-07-30 07:05:58 +00:00
2014-03-04 17:05:00 +00:00
2014-09-03 04:49:54 +00:00
2014-08-03 00:56:45 +00:00
2014-08-03 00:56:45 +00:00
2014-08-03 00:56:45 +00:00
2014-02-19 04:15:46 +00:00
2014-02-19 04:15:46 +00:00
2014-09-02 18:23:06 +00:00
2014-09-02 18:23:06 +00:00
2014-08-03 01:17:09 +00:00
2014-09-03 04:49:49 +00:00
2014-01-23 21:51:58 +00:00
2014-02-12 19:49:43 +00:00
2014-08-23 21:35:32 +00:00
2014-09-02 18:23:06 +00:00
2014-08-03 00:56:45 +00:00
2014-08-03 00:56:45 +00:00
2014-08-03 00:56:45 +00:00
2014-08-03 00:56:45 +00:00
2014-03-13 21:43:09 +00:00
2014-08-03 01:17:09 +00:00
2014-09-02 18:23:06 +00:00
2014-08-03 00:56:45 +00:00
2014-02-19 04:15:46 +00:00
2014-08-23 21:35:32 +00:00
2014-08-03 00:56:45 +00:00
2014-08-03 01:17:09 +00:00
2014-08-03 00:56:45 +00:00
2014-08-03 00:56:45 +00:00
2014-02-19 04:15:46 +00:00
2014-03-04 17:05:04 +00:00