error: unpack requires a string argument of length 8
Hello Ziirish,
Hope you are doing well.
I have noticed this strange log in buiagent:
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/burpui/agent.py", line 168, in handle
length, = struct.unpack('!Q', lengthbuf)
error: unpack requires a string argument of length 8
But didn't define if it is a problem or not, it appears each 3 or 4 minutes, but as said I don't know if its a bug or not.
/usr/local/bin/bui-agent -v -c /etc/burp/buiagent.cfg
Seems that it happens only on production servers where I have many clients (around 100) and those servers are working with burpui connected to buimultiagent.
The error seems that doesn't stop buiagent.
bui-agent: v0.4.4
buiagent.cfg:
# Burp-UI configuration file
# @version@ - 0.3.0
# @release@ - stable
[Global]
# On which port is the application listening
port = 6065
# On which address is the application listening
# '::' is the default for all IPv6
# set it to '0.0.0.0' if you want to listen on all IPv4 addresses
bind = 0.0.0.0
# enable SSL
ssl = false
# ssl cert
sslcert = /etc/burp/ssl_cert-server.pem
# ssl key
sslkey = /etc/burp/ssl_cert-server.key
# burp server version 1 or 2
version = 2
# agent password
password = somesecret
[Security]
## This section contains some security options. Make sure you understand the
## security implications before changing these.
# list of 'root' paths allowed when sourcing files in the configuration.
# Set this to 'none' if you don't want any restrictions, keeping in mind this
# can lead to accessing sensible files. Defaults to '/etc/burp'.
# Note: you can have several paths separated by comas.
# Example: /etc/burp,/etc/burp.d
includes = /etc/burp
# if files already included in config do not respect the above restriction, we
# prune them
enforce = false
# enable certificates revocation
revoke = true
[Experimental]
## This section contains some experimental features that have not been deeply
## tested yet
# enable zip64 feature. Python doc says:
# « ZIP64 extensions are disabled by default because the default zip and unzip
# commands on Unix (the InfoZIP utilities) don\u2019t support these extensions. »
zip64 = false
[Burp2]
## burp binary
burpbin = /usr/sbin/burp
## vss_strip binary
stripbin = /usr/bin/vss_strip
## burp client configuration file used for the restoration (Default: None)
bconfcli = /etc/burp/burp.conf
## burp server configuration file used for the setting page
##
## bconfsrv = /etc/burp/burp-restore.conf
##
## I have fixed the client to be on burp-server because the status showns better on burpui
bconfsrv = /etc/burp/burp-server.conf
##
## temporary directory to use for restoration
tmpdir = /storage/tmp
## how many time to wait for the monitor to answer (in seconds)
timeout = 60
Hope this could be useful in some way.
Lines from 167 to 169 in /usr/local/lib/python2.7/dist-packages/burpui/agent.py
lengthbuf = self.request.recv(8)
length, = struct.unpack('!Q', lengthbuf)
data = self.recvall(length)
Kind regards, Pablo.