2018-12-04 14:18:50 +00:00
|
|
|
# fraudo
|
|
|
|
|
2018-12-04 15:09:12 +00:00
|
|
|
![alt text](logo.jpg)
|
|
|
|
|
2018-12-04 15:19:55 +00:00
|
|
|
#### Syntax
|
2018-12-04 15:09:12 +00:00
|
|
|
|
|
|
|
![alt text](syntax.png)
|
|
|
|
|
2018-12-04 15:10:35 +00:00
|
|
|
##### OPERATIONS:
|
2018-12-04 15:09:12 +00:00
|
|
|
~~~~
|
2018-12-07 11:29:50 +00:00
|
|
|
* count("group_field", time_in_minutes)
|
|
|
|
* countSuccess("group_field", time_in_minutes)
|
|
|
|
* countError("group_field", time_in_minutes, "error_code")
|
|
|
|
* sum("group_field", time_in_minutes)
|
|
|
|
* sumSuccess("group_field", time_in_minutes)
|
|
|
|
* sumError(("group_field", time_in_minutes, "error_code")
|
2018-12-04 15:09:12 +00:00
|
|
|
* unique(("group_field", "by_field")
|
|
|
|
* in(("field", "first", "second", ...)
|
|
|
|
* inWhiteList("field")
|
|
|
|
* inBlackList("field")
|
2018-12-07 11:29:50 +00:00
|
|
|
* like("field", [regexp_in_java_style](https://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html))
|
2018-12-07 07:53:41 +00:00
|
|
|
* countryBy("field")
|
2018-12-04 15:09:12 +00:00
|
|
|
~~~~
|
2018-12-04 15:10:35 +00:00
|
|
|
##### RESULTS:
|
2018-12-04 15:09:12 +00:00
|
|
|
~~~~
|
|
|
|
* accept
|
|
|
|
* 3ds
|
|
|
|
* decline
|
|
|
|
* notify
|
2018-12-04 15:16:00 +00:00
|
|
|
~~~~
|
|
|
|
##### EXAMPLES:
|
|
|
|
###### Simple:
|
|
|
|
~~~~
|
|
|
|
rule: 3 > 2 AND 1 = 1
|
|
|
|
-> accept;
|
|
|
|
~~~~
|
|
|
|
###### Black list check:
|
|
|
|
~~~~
|
|
|
|
rule: inBlackList("email")
|
|
|
|
-> notify;
|
|
|
|
~~~~
|
|
|
|
###### Counts check:
|
|
|
|
~~~~
|
|
|
|
rule: (count("ip", 1444) >= 10 OR countSuccess("email", 1444) > 5)
|
|
|
|
AND countError("fingerprint", 1444, "error_code") > 5
|
|
|
|
-> notify;
|
|
|
|
~~~~
|
|
|
|
###### Unique count emails for ip:
|
|
|
|
~~~~
|
|
|
|
rule: unique("email", "ip") < 4
|
|
|
|
-> decline;
|
|
|
|
~~~~
|
2018-12-07 07:53:41 +00:00
|
|
|
###### Check country by ip:
|
|
|
|
~~~~
|
|
|
|
rule: countryBy("ip") = "RU"
|
|
|
|
-> notify;
|
|
|
|
~~~~
|
2018-12-04 15:16:00 +00:00
|
|
|
###### Combined check:
|
|
|
|
~~~~
|
|
|
|
rule: 3 > 2 AND 1 > 1
|
|
|
|
-> decline;
|
|
|
|
|
|
|
|
rule: count("email", 10) <= 10 AND count("ip", 1444) = 10
|
|
|
|
-> 3ds;
|
2018-12-04 15:09:12 +00:00
|
|
|
~~~~
|