예제 #1
0
파일: views.py 프로젝트: 601040605/pocscan
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")
예제 #2
0
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")
예제 #3
0
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"})
예제 #4
0
파일: views.py 프로젝트: 601040605/pocscan
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"})