Closed gnusshall closed 10 years ago
Quick fix would be removing the ä
from your custom template I guess :)
I assume hashlib.md5()
wants to decode the page content but doesn't know with which codes and takes ascii. Correct solution would be to read the content, try to decode it properly to unicode and then hand it over to hashlib (I might be wrong...)
that´s what i figured also. i removed all ä etc etc, the server starts now properly, at least without error but when i try to access it i get an "internal server error" in my browser and on the glastopf console is the following happening:
2014-01-15 16:33:00,506 (glastopf.glastopf) Initializing Glastopf 3.0.8 using "/opt/myglas" as work directory.
2014-01-15 16:33:00,507 (glastopf.glastopf) Connecting to main database with: sqlite:///db/glastopf.db
2014-01-15 16:33:00,519 (glastopf.glastopf) Generating initial dork pages - this can take a while.
2014-01-15 16:33:00,775 (pyhpfeeds) connecting to hpfriends.honeycloud.net:20000
2014-01-15 16:33:01,116 (pyhpfeeds) info message name: hpfriends, rand: '_\x9c\xdd\x91'
2014-01-15 16:33:01,130 (glastopf.glastopf) Glastopf started and privileges dropped.
2014-01-15 16:33:38,498 (glastopf.glastopf) 192.168.116.1 requested GET / on 192.168.116.146
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/gevent/pywsgi.py", line 508, in handle_one_response
self.run_application()
File "/usr/local/lib/python2.7/dist-packages/gevent/pywsgi.py", line 494, in run_application
self.result = self.application(self.environ, self.start_response)
File "/usr/local/lib/python2.7/dist-packages/glastopf/wsgi_wrapper.py", line 44, in application
remote_addr, None)
File "/usr/local/lib/python2.7/dist-packages/glastopf/glastopf.py", line 309, in handle_request
emulator.handle(attack_event)
File "/usr/local/lib/python2.7/dist-packages/glastopf/modules/handlers/emulators/unknown.py", line 57, in handle
template, display_comments = self._get_template(attack_event)
File "/usr/local/lib/python2.7/dist-packages/glastopf/modules/handlers/emulators/unknown.py", line 41, in _get_template
self.dork_page = os.path.join(pages_path, choice(dork_page_list))
File "/usr/lib/python2.7/random.py", line 274, in choice
return seq[int(self.random() * len(seq))] # raises IndexError if seq is empty
IndexError: list index out of range
(Duplicate info removed)
This is the same issue as #147 I'll close this one (and open an issue for proper template decoding) and continue on the other.
are you sure that this is the same issue(?), because i am using stable 3.0.8 with those tests....
Yes, same exception.
hi,
i tried to put my own html files in /opt/myglas/data/templates/, respectively to replace the base.html but during the startup i get the following error:
are there any specific rules to follow? currently i am using 3.0.8 (until the 3.0.9-dev is fixed).
thanks!
Gernot