mirror of
				https://github.com/sqlmapproject/sqlmap.git
				synced 2025-11-04 01:47:37 +03:00 
			
		
		
		
	Adding a support for option-less URL arg
This commit is contained in:
		
							parent
							
								
									4833fb3aa6
								
							
						
					
					
						commit
						d72660ef04
					
				| 
						 | 
					@ -18,7 +18,7 @@ from lib.core.enums import OS
 | 
				
			||||||
from thirdparty.six import unichr as _unichr
 | 
					from thirdparty.six import unichr as _unichr
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
 | 
					# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
 | 
				
			||||||
VERSION = "1.3.9.25"
 | 
					VERSION = "1.3.10.0"
 | 
				
			||||||
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
 | 
					TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
 | 
				
			||||||
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
 | 
					TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
 | 
				
			||||||
VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)
 | 
					VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -905,6 +905,8 @@ def cmdLineParser(argv=None):
 | 
				
			||||||
            longOptions = set(re.findall(r"\-\-([^= ]+?)=", parser.format_help()))
 | 
					            longOptions = set(re.findall(r"\-\-([^= ]+?)=", parser.format_help()))
 | 
				
			||||||
            if argv[i] == "-hh":
 | 
					            if argv[i] == "-hh":
 | 
				
			||||||
                argv[i] = "-h"
 | 
					                argv[i] = "-h"
 | 
				
			||||||
 | 
					            elif i == 1 and argv[i].startswith("http"):
 | 
				
			||||||
 | 
					                argv[i] = "--url=%s" % argv[i]
 | 
				
			||||||
            elif len(argv[i]) > 1 and all(ord(_) in xrange(0x2018, 0x2020) for _ in ((argv[i].split('=', 1)[-1].strip() or ' ')[0], argv[i][-1])):
 | 
					            elif len(argv[i]) > 1 and all(ord(_) in xrange(0x2018, 0x2020) for _ in ((argv[i].split('=', 1)[-1].strip() or ' ')[0], argv[i][-1])):
 | 
				
			||||||
                dataToStdout("[!] copy-pasting illegal (non-console) quote characters from Internet is, well, illegal (%s)\n" % argv[i])
 | 
					                dataToStdout("[!] copy-pasting illegal (non-console) quote characters from Internet is, well, illegal (%s)\n" % argv[i])
 | 
				
			||||||
                raise SystemExit
 | 
					                raise SystemExit
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user