mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2026-08-03 22:31:34 +00:00
Fixes #3550
This commit is contained in:
parent
e64cc86fc4
commit
5037e43c99
2 changed files with 8 additions and 5 deletions
|
|
@ -44,9 +44,12 @@ def getRevisionNumber():
|
|||
break
|
||||
|
||||
if not retVal:
|
||||
process = subprocess.Popen("git rev-parse --verify HEAD", shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||
stdout, _ = process.communicate()
|
||||
match = re.search(r"(?i)[0-9a-f]{32}", stdout or "")
|
||||
retVal = match.group(0) if match else None
|
||||
try:
|
||||
process = subprocess.Popen("git rev-parse --verify HEAD", shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||
stdout, _ = process.communicate()
|
||||
match = re.search(r"(?i)[0-9a-f]{32}", stdout or "")
|
||||
retVal = match.group(0) if match else None
|
||||
except:
|
||||
pass
|
||||
|
||||
return retVal[:7] if retVal else None
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue