As a follow up to my previous post, I think this should summarize what I was 
attempting to say.  The issue causing the memory error appears to be on line 
210 of lib/core/target.py:



            for line in readSessionFP.readlines(): # xreadlines doesn't return 
unicode strings when codec.open() is used





I can demonstrate the error like this:


$ python
Python 2.7.1+ (r271:86832, Apr 11 2011, 18:13:53) 
[GCC 4.5.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import codecs
>>> f = codecs.open('session', 'r', 'utf8', 'replace')
>>> i = 0
>>> for line in f.readlines():
...   i += 1
... 
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.7/codecs.py", line 679, in readlines
    return self.reader.readlines(sizehint)
  File "/usr/lib/python2.7/codecs.py", line 588, in readlines
    data = self.read()
  File "/usr/lib/python2.7/codecs.py", line 477, in read
    newchars, decodedbytes = self.decode(data, self.errors)
MemoryError
>>> 





However, you can read the file successfully like this:



$ python
Python 2.7.1+ (r271:86832, Apr 11 2011, 18:13:53) 
[GCC 4.5.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import codecs
>>> f = codecs.open('session', 'r', 'utf8', 'replace')
>>> i = 0
>>> for line in f:
...   i += 1
... 
>>> 






I changed line 210 to this and it appeared to work, although I do not know of 
any side-effects (if any).



            for line in readSessionFP: # xreadlines doesn't return unicode 
strings when codec.open() is used







------------------------------------------------------------------------------
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
_______________________________________________
sqlmap-users mailing list
sqlmap-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlmap-users

Reply via email to