-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathapiify.yaml
70 lines (70 loc) · 3.64 KB
/
apiify.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
#This is the maximum number of items to hold in the memory cache. Least used record is deleted first.
cached_max_items: 2048
#How many hours should an answer for a value be stored in cache and reused
#-1 means they never expire but can be removed when cache_max_items is exceeded based about hit count
#-2 Means they can never be removed from the cache and it can grow to an indefinete size
# 0 means do not cache turning this into a CLI to JSON interface with no caching
# ## Any other positive itenger is the maximum amount of time to remember a response.
item_hours_in_cache: -1
#If output contains this word (case insensitive) then do not cache it. Blank to disable.
no_caching_this_error: error
#Combine stderr and stdout of command. If False only stdout is parsed.
combine_stderr_stdout: True
#Block command injection attacks:
block_command_injection: True
#What IP address do you want domain stats to listen on? 0.0.0.0 means all public and private IP addresses
local_address: 127.0.0.1
#Which TCP port do you want the server to listen on
local_port: 8000
#The file to store memory cache in
cache_file: apiify.cache
#debug_statements are enabled by default but you should disable Debug statements once you see it is working. This significantly impacts performance.
debug_statements: True
#A regular expression of Python Named capture groups that you want to extract from the output. If none the entire command is returned
#
#Here is an example of a ping command
#base_command: ping -c1 *WEBINFO*
#Optionally along with any base command you can enable one of these result_regex to parse the command output
#result_regex: (?P<bytes>\d+) bytes.*?\((?P<hostname>\S+)\):?.*?icmp_seq=(?P<seq>\d+) ttl=(?P<ttl>\d+)
#result_regex: (?P<bytes>\d+) bytes
#
#
#Here is an example of a whois command - Only uncomment base_command for all output or both base_comand and result_regex for structured output
#base_command: whois *WEBINFO*
#result_regex: Creation Date.\s+(?P<creationdate>[\d:T -]+)
#result_regex: (?:Creation Date.|created.)\s+(?P<creationdate>[\d:T -]+)
#
#
#Example for traceroute to get the number of hops (must uncomment all regex modifiers if you use regex)
#base_command: traceroute --tcp -p 80 -n -q1 -f3 *WEBINFO*
#result_regex: (?P<lasthops>\d+)\s+(?P<hop>[\d\.]+).*?$
#regex_multiline: False
#regex_ignorecase: False
#regex_dotall: False
#
#
#Example for traceroute to get all hops
#You have options that modify the behavior of the regex parsing with regex_findall. Findall generates lists of output instead of dictionaries.
#Multiline forces ^ and $ to recognize each individual line delimited by \n as separate matches. Set to True for multi-line matching.
#Ignore case will ignore the case of letters when matching. Set to True to ignore case
#By default the period wildcard does not match newlines. DOTALL changes that behavior. When set to True . matches \n
#To use this you must uncommment all of the next 6 lines
base_command: traceroute --tcp -p 80 -n -q1 -f3 *WEBINFO*
result_regex: (\d+)\s+([\d\.]+).*?$
regex_findall: True
regex_multiline: True
regex_ignorecase: True
regex_dotall: False
#
#
#Example of consuming web geolocation information
#Repeated queries are cached and server is not queried
#For wget we only want stdout (the response). We dont want stderr so you have to turn off "combine_stderr_stdout"
#base_command: wget -O- https://freegeoip.app/json/*WEBINFO* 2>/dev/null
#combine_stderr_stdout: False
#
#
#Example of consuming Internet Storm Center Attack statistics for an IP Address
#This API requires that the data is an IP address not a DNS host name
#base_command: wget -O- https://isc.sans.edu/api/ipdetails/*WEBINFO*?json 2>/dev/null
#combine_stderr_stdout: False