mirror of
				https://github.com/sqlmapproject/sqlmap.git
				synced 2025-10-31 16:07:55 +03:00 
			
		
		
		
	minor refactoring
This commit is contained in:
		
							parent
							
								
									eb9b84d1da
								
							
						
					
					
						commit
						ecbeecdccf
					
				|  | @ -81,25 +81,21 @@ def __findUnionCharCount(comment, place, parameter, value, prefix, suffix, where | |||
|             maxItem = item | ||||
| 
 | ||||
|     if all(map(lambda x: x == min_ and x != max_, ratios)): | ||||
|         return maxItem[0] | ||||
|         retVal = maxItem[0] | ||||
| 
 | ||||
|     elif all(map(lambda x: x != min_ and x == max_, ratios)): | ||||
|         return minItem[0] | ||||
| 
 | ||||
|     deviation = stdev(ratios) | ||||
| 
 | ||||
|     if abs(max_ - min_) < MIN_STATISTICAL_RANGE: | ||||
|         kb.errorIsNone = popValue() | ||||
|         return None | ||||
| 
 | ||||
|     lower, upper = average(ratios) - UNION_STDEV_COEFF * deviation, average(ratios) + UNION_STDEV_COEFF * deviation | ||||
| 
 | ||||
|     if min_ < lower: | ||||
|         retVal = minItem[0] | ||||
| 
 | ||||
|     if max_ > upper: | ||||
|         if retVal is None or abs(max_ - upper) > abs(min_ - lower): | ||||
|             retVal = maxItem[0] | ||||
|     elif abs(max_ - min_) >= MIN_STATISTICAL_RANGE: | ||||
|             deviation = stdev(ratios) | ||||
|             lower, upper = average(ratios) - UNION_STDEV_COEFF * deviation, average(ratios) + UNION_STDEV_COEFF * deviation | ||||
| 
 | ||||
|             if min_ < lower: | ||||
|                 retVal = minItem[0] | ||||
| 
 | ||||
|             if max_ > upper: | ||||
|                 if retVal is None or abs(max_ - upper) > abs(min_ - lower): | ||||
|                     retVal = maxItem[0] | ||||
| 
 | ||||
|     kb.errorIsNone = popValue() | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	Block a user