hashview / hashview-old

A web front-end for password cracking and analytics
http://www.hashview.io
GNU General Public License v3.0
619 stars 134 forks source link

Internal Server Error when trying to start job #349

Open GrepItAll opened 6 years ago

GrepItAll commented 6 years ago

I hope this isn't seen as a duplicate of #320

I have created a job containing 6 tasks. Upon trying to start the job, I get 'Internal Server Error', but upon going back to the job queue, I can see that the job says 'queued' (hourglass icon), but nothing is currently running.

This is a few lines of the error chucked into the console:

14:19:00 web.1 | 2017-10-05 14:19:00 - NoMethodError - undefined method `path' for nil:NilClass: 14:19:00 web.1 | /home/user/Desktop/hashview/helpers/build_crack_cmd.rb:70:in `buildCrackCmd' 14:19:00 web.1 | /home/user/Desktop/hashview/routes/jobs.rb:398:in `block (2 levels) in <top (required)>' 14:19:00 web.1 | /home/user/Desktop/hashview/routes/jobs.rb:384:in `each' 14:19:00 web.1 | /home/user/Desktop/hashview/routes/jobs.rb:384:in `block in <top (required)>'

Hope that helps.

GrepItAll commented 6 years ago

I did a bit of testing and the error only appeared to occur when I used a task with a dictionary (english.dic) without any rules in the task. Other wordlists on their own would work. I think the reason that english.dic wasn't working could of been from how I imported it? I dropped it into the folder of Hashview so it automatically imported, whilst all others were uploaded through the web interface. Not sure if this would effect it or not.

i128 commented 6 years ago

I think you're on the right track. could you do a select * from tasks:

and

select * from wordlists;

My guess is that english.dic's path listed under wordlists isn't correct, OR the wl_id listed under tasks is assigned to a non-existant wordlist entry.

If this is this case, the quickest fix would be to delete both task/wordlist and recreate

GrepItAll commented 6 years ago

So it looks like the record in the tasks table had the correct wl_id, but had the wrong hc_rule (there shouldn't have been any rule for it).

I have deleted the rows and reuploaded the dictionary through the web interface and this appears to have resolved the issue.

Might be good if Hashview could either reset or check the validity of the Hashview MySQL table before reinstalling? Or just add a note on the Wiki prompting to reset the DB if Hashview is being reinstalled.

i128 commented 6 years ago

Note to self, this issue can occur when an upgrade occurs and there's pre-existing tasks/jobs