mirror of
				https://github.com/sqlmapproject/sqlmap.git
				synced 2025-11-04 01:47:37 +03:00 
			
		
		
		
	Cosmetics
This commit is contained in:
		
							parent
							
								
									6716315a76
								
							
						
					
					
						commit
						4d81da6bc8
					
				| 
						 | 
					@ -308,7 +308,7 @@ def start():
 | 
				
			||||||
                warnMsg = "Ctrl+C detected in multiple target mode"
 | 
					                warnMsg = "Ctrl+C detected in multiple target mode"
 | 
				
			||||||
                logger.warn(warnMsg)
 | 
					                logger.warn(warnMsg)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                message = "do you want to skip to the next target in list [Y/n/q]"
 | 
					                message = "do you want to skip to the next target in list? [Y/n/q]"
 | 
				
			||||||
                test = readInput(message, default="Y")
 | 
					                test = readInput(message, default="Y")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                if not test or test[0] in ("y", "Y"):
 | 
					                if not test or test[0] in ("y", "Y"):
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -78,8 +78,8 @@ def checkCharEncoding(encoding):
 | 
				
			||||||
    else:
 | 
					    else:
 | 
				
			||||||
        return encoding
 | 
					        return encoding
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    #http://www.destructor.de/charsets/index.htm
 | 
					    # http://www.destructor.de/charsets/index.htm
 | 
				
			||||||
    translate = { 'windows-874':'iso-8859-11', 'en_us':'utf8' }
 | 
					    translate = { 'windows-874': 'iso-8859-11', 'en_us': 'utf8' }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    for delimiter in (';', ','):
 | 
					    for delimiter in (';', ','):
 | 
				
			||||||
        if delimiter in encoding:
 | 
					        if delimiter in encoding:
 | 
				
			||||||
| 
						 | 
					@ -117,9 +117,10 @@ def decodePage(page, contentEncoding, contentType):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        page = data.read()
 | 
					        page = data.read()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    #http://stackoverflow.com/questions/1020892/python-urllib2-read-to-unicode
 | 
					    # http://stackoverflow.com/questions/1020892/python-urllib2-read-to-unicode
 | 
				
			||||||
    if contentType and (contentType.find('charset=') != -1):
 | 
					    if contentType and (contentType.find('charset=') != -1):
 | 
				
			||||||
        charset = checkCharEncoding(contentType.split('charset=')[-1])
 | 
					        charset = checkCharEncoding(contentType.split('charset=')[-1])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if charset:
 | 
					        if charset:
 | 
				
			||||||
            page = getUnicode(page, charset)
 | 
					            page = getUnicode(page, charset)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -55,6 +55,7 @@ def comparison(page, headers=None, getSeqMatcher=False, pageLength=None):
 | 
				
			||||||
        if not kb.nullConnection and not conf.longestCommon:
 | 
					        if not kb.nullConnection and not conf.longestCommon:
 | 
				
			||||||
            for item in kb.dynamicMarkings:
 | 
					            for item in kb.dynamicMarkings:
 | 
				
			||||||
                prefix, postfix = item
 | 
					                prefix, postfix = item
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                if prefix is None:
 | 
					                if prefix is None:
 | 
				
			||||||
                    page = re.sub('(?s)^.+%s' % postfix, postfix, page)
 | 
					                    page = re.sub('(?s)^.+%s' % postfix, postfix, page)
 | 
				
			||||||
                elif postfix is None:
 | 
					                elif postfix is None:
 | 
				
			||||||
| 
						 | 
					@ -75,6 +76,7 @@ def comparison(page, headers=None, getSeqMatcher=False, pageLength=None):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    elif not conf.eRegexp and not conf.eString and kb.nullConnection and pageLength:
 | 
					    elif not conf.eRegexp and not conf.eString and kb.nullConnection and pageLength:
 | 
				
			||||||
        ratio = 1. * pageLength / len(conf.seqMatcher.a)
 | 
					        ratio = 1. * pageLength / len(conf.seqMatcher.a)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if ratio > 1.:
 | 
					        if ratio > 1.:
 | 
				
			||||||
            ratio = 1. / ratio
 | 
					            ratio = 1. / ratio
 | 
				
			||||||
    else:
 | 
					    else:
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user