def sxcheck(request): try: reqids = request.POST['reqid'] reqids = reqids.split(',') for reqid in reqids: sql.delay(reqid) return HttpResponse("Success") except Exception, e: return HttpResponse("Error")
def chromeapi(request): method = request.POST.get('method') url = request.POST.get('url') cookie = request.POST.get('cookie', '') ua = request.POST.get('ua', '') referer = request.POST.get('referer', '') data = request.POST.get('data', '') tmparse = urlparse(url) host = tmparse.netloc uri = tmparse.path white_list = [ '', '.php', 'cgi', '.asp', '.aspx', 'ashx', '.do', '.action', 'jsp', '.html', 'htm', '.shtml', '.stm', '.shtm', 'json', ] try: file_type = os.path.splitext(uri.replace('//', '/'))[1] if file_type in white_list: req = Req_list( method=method, url=url, host=host, uri=uri, data=data, referer=referer, ua=ua, cookie=cookie, ) req.save() sql.delay(req.id) return JsonResponse({"status": req.id}) else: return JsonResponse({"status": "haved in the reqlist"}) except Exception, e: return JsonResponse({"status": "error"})
def chromeapi(request): method = request.POST.get('method') url = request.POST.get('url') cookie = request.POST.get('cookie', '') ua = request.POST.get('ua', '') referer = request.POST.get('referer', '') data = request.POST.get('data', '') tmparse = urlparse(url) host = tmparse.netloc uri = tmparse.path white_list = ['', '.php', 'cgi', '.asp', '.aspx', 'ashx', '.do', '.action', 'jsp', '.html', 'htm', '.shtml', '.stm', '.shtm', 'json', ] try: file_type = os.path.splitext(uri.replace('//', '/'))[1] if file_type in white_list: req = Req_list(method=method, url=url, host=host, uri=uri, data=data, referer=referer, ua=ua, cookie=cookie, ) req.save() sql.delay(req.id) return JsonResponse({"status": req.id}) else: return JsonResponse({"status": "haved in the reqlist"}) except Exception, e: return JsonResponse({"status": "error"})