olle,

On Fri, Mar 27, 2009 at 9:37 AM, olle <o...@nxs.se> wrote:
> On Fri, Mar 27, 2009 at 12:58:17PM +0100, olle wrote:
>> Damn, how the hell do I start diagnosing this crash?
>>
>> Exception in thread Thread-7:
>> Traceback (most recent call last):
>>   File "/usr/lib/python2.5/threading.py", line 486, in __bootstrap_inner
>>     self.run()
>>   File "/usr/lib/python2.5/threading.py", line 446, in run
>>     self.__target(*self.__args, **self.__kwargs)
>>   File "/home/olle/w3af/1.0/core/ui/consoleUi/rootMenu.py", line 98, in 
>> _real_start
>>     raise e
>> TypeError: String or Integer object expected for key, unicode found
>>
>> Isn't there some form of exception stack for "e" that would have been 
>> helpful?
>>
>> ------------------------------------------------------------------------------
>
> Ahh, here we go:
>
> Exception: Traceback (most recent call last):
>  File "/home/olle/w3af/1.0/core/data/url/xUrllib.py", line 697, in _grepWorker
>    grepPlugin.grep_wrapper( request, response)
> TypeError: String or Integer object expected for key, unicode found
>
> Traceback (most recent call last):
>  File "/home/olle/w3af/1.0/core/data/url/xUrllib.py", line 697, in _grepWorker
>    grepPlugin.grep_wrapper( request, response)
>  File "/home/olle/w3af/1.0/core/controllers/basePlugin/baseGrepPlugin.py", 
> line 60, in grep_wrapper
>    self.grep( fuzzableRequest, response )
>  File "/home/olle/w3af/1.0/plugins/grep/codeDisclosure.py", line 94, in grep
>    if response.is_text_or_html() and response.getURL() not in 
> self._already_added:
>  File "/home/olle/w3af/1.0/core/data/db/temp_persist.py", line 125, in 
> __contains__
>    return value in self._temp_shelve
>  File "/home/olle/w3af/1.0/core/data/db/temp_persist.py", line 96, in 
> __contains__
>    return value in self._shelve
>  File "/usr/lib/python2.5/shelve.py", line 101, in __contains__
>    return self.dict.has_key(key)
>  File "/usr/lib/python2.5/bsddb/__init__.py", line 256, in has_key
>    return _DeadlockWrap(self.db.has_key, key)
>  File "/usr/lib/python2.5/bsddb/dbutils.py", line 62, in DeadlockWrap
>    return function(*_args, **_kwargs)
> TypeError: String or Integer object expected for key, unicode found
>
> my guess is response.getURL() is returning some non-ASCII bytes from a URL and
> that gets used as key in a lookup of self._already_added...

Well, it seems that you are right, I added some code to be able to
reproduce it [0].

> Now how the hell did that happen? The URLs in question are straight [a-z/-].

Well... now... thats a good question!

hmmm... I modified the __contains__ of the disk_list method, in order
to automagically cast it to string... but I don't know if this is
going to work... so I'm only commiting this to the trunk, and if it
works I'll commit it to the stable 1.0 branch.

Please let me know if this [1] solves the issue.

[0] 
http://w3af.svn.sourceforge.net/viewvc/w3af/trunk/core/data/db/temp_persist.py?revision=2782&view=markup
[1] 
http://w3af.svn.sourceforge.net/viewvc/w3af/trunk/core/data/db/temp_persist.py?r1=2782&r2=2783

> /olle
>
> ------------------------------------------------------------------------------
> _______________________________________________
> W3af-develop mailing list
> W3af-develop@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/w3af-develop
>



-- 
Andrés Riancho
http://www.bonsai-sec.com/
http://w3af.sourceforge.net/

------------------------------------------------------------------------------
_______________________________________________
W3af-develop mailing list
W3af-develop@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/w3af-develop

Reply via email to