mirror of
				https://github.com/sqlmapproject/sqlmap.git
				synced 2025-11-04 01:47:37 +03:00 
			
		
		
		
	Patch for an Issue #286
This commit is contained in:
		
							parent
							
								
									65273295e3
								
							
						
					
					
						commit
						a38b3e397c
					
				| 
						 | 
					@ -1128,6 +1128,7 @@ def parseTargetUrl():
 | 
				
			||||||
        conf.httpHeaders = filter(lambda (key, value): key != HTTPHEADER.HOST, conf.httpHeaders)
 | 
					        conf.httpHeaders = filter(lambda (key, value): key != HTTPHEADER.HOST, conf.httpHeaders)
 | 
				
			||||||
        conf.httpHeaders.append((HTTPHEADER.HOST, getHostHeader(conf.url)))
 | 
					        conf.httpHeaders.append((HTTPHEADER.HOST, getHostHeader(conf.url)))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    if conf.url != originalUrl:
 | 
				
			||||||
        kb.originalUrls[conf.url] = originalUrl
 | 
					        kb.originalUrls[conf.url] = originalUrl
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def expandAsteriskForColumns(expression):
 | 
					def expandAsteriskForColumns(expression):
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -457,9 +457,11 @@ def _createTargetDirs():
 | 
				
			||||||
            conf.outputPath = tempDir
 | 
					            conf.outputPath = tempDir
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    try:
 | 
					    try:
 | 
				
			||||||
        with open(os.path.join(conf.outputPath, "target.txt"), "w+") as f:
 | 
					        with codecs.open(os.path.join(conf.outputPath, "target.txt"), "w+", UNICODE_ENCODING) as f:
 | 
				
			||||||
            _ = kb.originalUrls.get(conf.url) or conf.url or conf.hostname
 | 
					            f.write(kb.originalUrls.get(conf.url) or conf.url or conf.hostname)
 | 
				
			||||||
            f.write(_.encode(UNICODE_ENCODING))
 | 
					            f.write(" (%s)" % (HTTPMETHOD.POST if conf.data else HTTPMETHOD.GET))
 | 
				
			||||||
 | 
					            if conf.data:
 | 
				
			||||||
 | 
					                f.write("\n\n%s" % conf.data)
 | 
				
			||||||
    except IOError, ex:
 | 
					    except IOError, ex:
 | 
				
			||||||
        if "denied" in str(ex):
 | 
					        if "denied" in str(ex):
 | 
				
			||||||
            errMsg = "you don't have enough permissions "
 | 
					            errMsg = "you don't have enough permissions "
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user