Re: [Burp-users] Timer conditions not met
Brought to you by:
grke
|
From: Graham K. <gr...@gr...> - 2015-04-15 10:26:33
|
On Wed, Apr 15, 2015 at 02:00:47AM -0500, Nigel Reed wrote: > Just a simple request, I hope. > > 2015-04-15 02:58:02: burp[6917] Timer conditions on the server were not met > > Is it possible to show how much longer until the server is within the time > window? > > 2015-04-15 02:58:02: burp[6917] Timer conditions on the server were not met. > 3:34:59 remaining. Hello, I like the idea. Short answer - to make your request work, these things need to happen: a) The timer script needs to have extra intelligence to figure out what the time remaining is. b) The server needs to capture the stdout/stderr of the timer script, and append it to the string to send to the client when the timer script returns 1. c) The client needs to do a strncmp on the string from the server (instead of a strcmp) and then log the rest of the string if it matched. d) Since the client needs to be updated to understand the new string format, the server also needs to check the client version and send the old format if the client is too old. More detail: On the server side, the following is an example of the details that get logged. The timer script is external to burp, so burp itself just blindly logs the output and acts on the return code: burp[1356]: Running timer script: pi /mnt/crypt1/burp/pi/current /mnt/crypt1/burp/pi reserved1 reserved2 20h Mon,Tue,Wed,Thu,Fri,Sat,Sun,00,01,02,03,04,05,19,20,21,22,23 burp[1356]: Out of timeband: Mon,Tue,Wed,Thu,Fri,Sat,Sun,00,01,02,03,04,05,19,20,21,22,23 burp[1356]: Last backup: 2015-04-14 19:03:03 burp[1356]: Next after : 2015-04-15 15:03:03 (interval 20h) burp[1356]: /etc/burp/timer_script returned: 1 burp[1356]: Not running backup of pi The timer script currently isn't clever enough to know how long is remaining. It knows that it is not in timeband because of pattern matching (it compares the output of 'date +"*%a*%H*"' against the timeband arguments). It knows the minimum interval since the last backup, and so prints the 'Next after : 2015-04-15 15:03:03 (interval 20h)', but note that 15:03:03 is not in timeband. The client checks a string given to it from the server in order to decide what it is doing. For example, the string when the timer conditions were not met is "timer conditions not met", which makes the client log "Timer conditions on the server were not met" and then exit. It would be possible to append the output of the timer script to the "timer conditions not met" string and get the client to log whatever is appended. This would mean that the server also has to check the client version to decide what kind of format string to send to it. |