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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
|
Global Commands
---------------
BLOCK <name>
Store a block of commands to call it from a CLIENT/SERVER/BLOCK
CLIENT [<number of concurrent clients>]
Client body start, close it with END and a newline
DAEMON
Daemon body start, close it with END and a newline.
A daemon will not join CLIENT/SERVER and could therefore be used
for supervisor jobs
END
Close CLIENT|SERVER body
EXEC <shell command>
Execute a shell command, attention executes will not join CLIENT/SERVER
GO
Starts all client in sync mode
INCLUDE <include file>
Load and execute defined include file,
current path is taken the callers current path
SERVER [<SSL>:]<port> [<number of concurrent servers>]
Server body start, close it with END and a newline,
Do load server.cert.pem and server.key.pem if found in local directory,
number of concurrent servers, -1 for unlimited,
<SSL>: SSL, SSL2, SSL3, TLS
SET <variable>=<value>
Store a value in a global variable
TIMEOUT <timeout in ms>
Defines global socket timeout
Local Commands
-------------
-__ <string>
Send <string> to the socket with a CRLF at the end of line
_- <string>
Same like __ but no CRLF at the end of line
_ADD_HEADER <header> <value>
Add additional header to received headers to force forexample chunked encoding
_BPS <n>
Send not more than defined Bytes per second
close body with _END BPS
_CALL <name of block>
Call a defined block
_CERT <cert-file> <key-file> [<ca-cert-file>]
Sets cert for the current ssl connection, mainly used for server cert
_CHUNK
Mark the end of a chunk block, all data after last _FLUSH are counted,
does automatic add chunk info
_CLOSE
Close the current connection and set the connection state to CLOSED
_DEBUG <string>
Prints to stderr for debugging reasons
_DOWN
Shutdown listener
_EXEC <shell command>
Execute a shell command, _EXEC| will pipe the incoming stream on the
socket in to the called shell command
_EXIT [OK|FAILED]
Exits with OK or FAILED default is FAILED
_EXPECT . "[!]<regex>"
Define what data we do or do not expect on a WAIT command.
Negation with a leading '!' in the <regex>
_FLUSH
Flush the cached lines,
the AUTO Content-Length calculation will take place here
_HEADER ALLOW|FILTER <header name>
Defines allowed headers or headers to filter,
default all headers are allowed and no headers are filtered.
Filter only for receive mechanisme
_IF "<expression>" MATCH "[!]<regex>"
Test if variable do or do not match the regex, close body with _END IF,
negation with a leading '!' in the <regex>,
<expression> must not be empty
_IGNORE_ERR <regex>
This command is Depreciated, do not use it
Ignores errors specified in <regex>,
i.e. ".*" would ignore all errors, only .* is implemented
_LOG_LEVEL <level>
Level is a number 0-4
_LOOP <n>
Do loop the body <n> times,
close body with _END LOOP
_MATCH (headers|body|error) "<regex>" <variable>
Define a regex with a match which should be stored in <variable>
_MATCH EXEC "<regex>" <variable>
_EXEC algun_comando
(No documentado; aparece en los ejemplos de la página web)
Hace lo mismo que _MATCH pero con la salida del comando ejecutado en _EXEC
_ONLY_PRINTABLE on|off
Replace all chars below 32 and above 127 with a space
_OP <left> ADD|SUB|DIV|MUL <right> <variable>
Store evaluated expression
_PIPE [chunked [<chunk_size>]]
Start a pipe for stream the output of EXEC to the socket stream,
wiht optional chunk support
_RAND <start> <end>
Generates a number between <start> and <end>
_RECV <bytes>|POLL
Receive an amount of bytes, either specified by a number
or as much until socket timeout will in POLL mode
_REQ <host> [<SSL>:]<port>[:<tag>] [<cert-file> <key-file> [<ca-cert-file>]]
Start a request to defined host:port, with SSL support.
Does only open a new connection if we are in connection state CLOSED
<SSL>: SSL, SSL2, SSL3, TLS<tag>:Additional tag info do support multiple connection to one target
<cert-file>, <key-file> and <ca-cert-file> are optional for client/server authentication
_RES
Wait for a connection accept
_SENDFILE <file>
Send file over http
_SET <variable>=<value>
Store a value in a local variable
_SH shell script line or END
Embedded shell script within a tmp file, execute if END is found
_SLEEP <milisecond>
Sleep for defined amount of time
_SOCKSTATE <variable>
Stores connection state CLOSED or CONNECTED in the <variable>
_SYNC
Synchronise to the next full second
_TIME <variable>
Store time in variable [ms]
_TIMEOUT <miliseconds>
Set socket timeout of current socket
_UP
Setup listener
_VERIFY_PEER
Gets peer cert and validate it
_WAIT [<amount of bytes>]
Wait for data and receive them.
EXPECT and MATCH definitions will be checked here on the incoming data.
Optional you could receive a specific amount of bytes
_WHICH <variable>
Stores the concurrency number of current thread
|