def hashfile(request, hashfile_id, error_msg=''):
context = {}
context["Section"] = "Hashfile"
hashfile = get_object_or_404(Hashfile, id=hashfile_id)
context['hashfile'] = hashfile
context['lines'] = humanize.intcomma(hashfile.line_count)
context['recovered'] = "%s (%.2f%%)" % (humanize.intcomma(hashfile.cracked_count), hashfile.cracked_count/hashfile.line_count*100)
context['hash_type'] = Hashcat.get_hash_types()[hashfile.hash_type]["name"]
template = loader.get_template('Hashcat/hashfile.html')
return HttpResponse(template.render(context, request))
评论列表
文章目录