zhangxinwu / BurpPy

The new bridge between Burp Suite and Python! No Jython!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

BurpPy

BurpPy forked from federicodotta/Brida.

Feature

Simply call the python script for the BurpSuite Plugin.

sample

import hashlib
import random
import time

RN = '\r\n'

def sign(hp):
    RNRN = RN+RN
    header_str, body = hp.split(RNRN)
    header_list = header_str.split(RN)
    act_method, path, http_version = header_list[0].split()
    header_map = dict(map(lambda s: s.split(": ", 1), header_list[1:]))
    '''=================='''
    header_map['fv'] = ''.join([chr(ord('0')+random.randint(0, 9)) for i in range(16) ])
    print( header_map['fv'])
    header_map['ts'] = str(int(round(time.time()*1000)))
    print( header_map['ts'])
    s = "abcdefghijklmnopqrstuvwxyz"+header_map['fv']+header_map['ts']
    if act_method == "POST":
        s += body.strip() # 可能需要解析json,把value用引号包裹
    s = s.encode()
    hs = hashlib.sha256()
    print(s)
    hs.update(s)
    header_map['sign'] = hs.hexdigest()
    '''================='''
    hp = RN.join([' '.join([act_method, path, http_version])]+[": ".join([k, header_map[k]]) for k in header_map]+["",body])
    return hp

image image

About

The new bridge between Burp Suite and Python! No Jython!

License:MIT License


Languages

Language:Java 99.4%Language:Python 0.6%Language:Shell 0.1%