Vitaly Lavrov
65678dbeea
New version of the ahocorasick library ( #1200 )
...
The new version is about 25% faster with -O2 and 45% faster with -O3.
No recursion is used (smaller stack size required).
Uses less memory (by valgrind info)
bigram:
- original 1796 allocs, 247864 bytes allocated
- new 1232 allocs, 158880 bytes allocated
host_match:
- original 18038 allocs, 3004576 bytes allocated
- new 6861 allocs, 396624 bytes allocated
The function ac_automata_search() is thread safe.
Optional case-insensitive comparison.
Matching at the beginning and at the end of the string is supported.
One code file and one header file.
2021-06-07 14:19:40 +02:00
Luca Deri
28879c570e
Reworked ndpi patricia includes to avoid compilation issues on some platforms
2021-03-31 19:43:55 +02:00
Alfredo Cardigliano
f8e83f7e35
Add support for MAC to Patricia tree. Expose full API to applications. Add utility functions.
2021-02-23 10:01:56 +01:00
Luca Deri
d964c3e081
Code cleanup: third party uthash is at the right place
2021-01-20 19:11:36 +01:00
Luca Deri
dc401f8a74
Split ptree user data in 32 and 64 bit entries
2020-12-30 12:12:33 +01:00
Luca Deri
8de62c6d34
Values stored in patricia tree are now 32 bit (they used to be 16 bit) long
2020-06-26 17:49:45 +02:00
Luca Deri
60aaa80570
Added HyperLogLog cardinality estimator API calls
...
/* Memory lifecycle */
int ndpi_hll_init(struct ndpi_hll *hll, u_int8_t bits);
void ndpi_hll_destroy(struct ndpi_hll *hll);
/* Add values */
void ndpi_hll_add(struct ndpi_hll *hll, const char *data, size_t data_len);
void ndpi_hll_add_number(struct ndpi_hll *hll, u_int32_t value) ;
/* Get cardinality estimation */
double ndpi_hll_count(struct ndpi_hll *hll);
2020-06-10 23:43:35 +02:00
Luca Deri
64fab4a478
Win fixes
2020-06-08 23:08:12 +02:00
Luca Deri
2ccd2c204b
API cleanup for indetifying explicitly in automa's what we're searching (protocol or category)
...
Removed hyperscan support that is apperently unused
2020-05-06 23:19:59 +02:00
Luca Deri
263547e77d
Updated automa API to use 32 bit values splits from protocol/categpry
2020-05-06 21:57:32 +02:00
Luca Deri
84f66b4d6b
Introduced custom protocols with IP and (optional) port support
...
Example
- Single IP address
ip:213.75.170.11@CustomProtocol
- IP address with CIDR
ip:213.75.170.11/32@CustomProtocol
- IP address with CIDR and port
ip:213.75.170.11/32:443@CustomProtocol
Please note that there are some restrictions on the port
usage. They have been listed in example/protos.txt
2020-05-06 12:51:44 +02:00
Luca Deri
7855e0318d
Various fixes to patricia tree handling
2020-05-06 11:13:57 +02:00
Luca Deri
48282369e2
False positive fixes
2020-05-06 01:34:55 +02:00
Luca Deri
427002d14f
Reworked protocol handling chnging it is u_int16_t
2020-05-06 00:31:40 +02:00
MrTiz9
3422574c17
FIXED - nDPI now detect RCE injections via PCRE instead Intel Hyperscan
2020-02-01 17:18:35 +01:00
MrTiz9
5c8c2d843a
nDPI now detect RCE injections via PCRE instead Intel Hyperscan - BUGGY, DOES NOT COMPILE
2020-01-30 15:08:26 +01:00
MrTiz9
daa1171593
nDPI now detect RCE in HTTP GET requests
2020-01-24 17:16:18 +01:00
MrTiz9
606ff10ecf
Integration of the libinjection library to detect SQL injections and XSS type attacks in HTTP requests
2019-12-05 18:09:43 +01:00
Luca
0558d641f2
Added ndpi_finalize_initalization() initialization function
2019-11-07 19:28:16 +00:00
emanuele-f
7f510c10fe
Fix double free after b19bfa1e20
2019-10-02 16:26:52 +02:00
emanuele-f
b19bfa1e20
Fixes leaks in ndpi_add_host_url_subprotocol
...
It is now possible to deallocate strings in ac_automata_release via
an additional parameter
2019-10-02 14:02:19 +02:00
Luca Deri
659f75138c
TLS cerficate hash calculation
2019-09-14 12:38:58 +02:00
Luca Deri
e7c0ac37d8
Implemented HASSH ( https://github.com/salesforce/hassh )
2019-08-22 19:25:58 +02:00
Luca Deri
efef99cbad
Removed this party LRU and replaced with home grown
2019-01-17 00:40:28 +01:00
Luca Deri
92ad057332
Added Ookla cache
2018-12-17 22:33:58 +01:00
Luca Deri
90ca91caa8
Renamed files to avoid name clashes during compilation with other libs
2018-09-29 08:38:00 +02:00
Luca Deri
1f24adc9cd
Renamed source files to avoid clashes
2018-09-29 08:28:26 +02:00
Campus
ff83bfbad0
ADD: add prototype of function ht_free in hash.h - DEL: delete include file .c in ndpi_main.c
2018-08-23 11:22:21 +02:00
Luca Deri
1a6a9593fb
Changed type to ease compilation accross platforms
2018-08-20 14:49:59 +02:00
Luca Deri
9847c2ccbb
Generic protocol cleanup (work in progress)
2018-08-16 12:03:09 +02:00
Luca Deri
dc9409ae12
Added missing include
2018-06-05 23:02:24 +02:00
Luca Deri
6b16ad709e
Fix for #560
2018-05-29 22:50:18 +02:00
Luca Deri
dcdd7562f4
Implemented hash-based categories
2018-05-16 00:09:12 +02:00
Vitaly Lavrov
c3f5307a3d
Update libcache
...
Using ndpi_calloc(), ndpi_free() in libcache.
Fixing warnings about mixing declaration and code.
2018-02-06 14:06:38 +03:00
Michele Campus
1b5b38a3ba
Merge pull request #391 from deselmo/dev
...
Updated libcache's license
2017-06-02 12:13:55 +02:00
William Guglielmo
e1b5b54c4c
Update license libcache
2017-06-02 00:29:04 +02:00
cardigliano
22b7b407c3
compilation fix
2017-06-01 18:13:31 +02:00
William Guglielmo
4a751f9d05
Updated libcache
2017-05-30 19:17:41 +02:00
William Guglielmo
694bc039e8
Added tinc protocol detection
2017-05-29 19:09:32 +02:00
Josh Soref
c51f88e62a
spelling: interface
2017-03-12 21:44:26 +00:00
Campus
a4f170604c
removed kernel support and #if 0s
2015-11-12 12:08:41 +01:00
Luca Deri
64121162dd
Win32 fix
2015-05-18 16:17:23 +02:00
Luca Deri
079a42c752
Minor code cleanup
2015-05-18 16:09:57 +02:00
Luca Deri
66394ba05e
File renamed to avoid name clashes
2015-05-18 15:26:16 +02:00
Luca Deri
68ac979dc5
Win32 fixes
2015-05-18 13:00:02 +02:00
Luca Deri
2e5ceac844
Initial import from SVN
2015-04-19 07:25:59 +02:00