FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
sqlmap/plugins/generic/enumeration.py at master · feixiang8418/sqlmap · GitHub
feixiang8418
/
sqlmap
Public
forked from
sqlmapproject/sqlmap
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
sqlmap
/
plugins
/
generic
/
enumeration.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
84 lines (66 loc) · 2.59 KB
Breadcrumbs
sqlmap
/
plugins
/
generic
/
enumeration.py
Copy path
File metadata and controls
84 lines (66 loc) · 2.59 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
#!/usr/bin/env python
"""
Copyright (c) 2006-2014 sqlmap developers (http://sqlmap.org/)
See the file 'doc/COPYING' for copying permission
"""
from
lib
.
core
.
common
import
Backend
from
lib
.
core
.
common
import
unArrayizeValue
from
lib
.
core
.
data
import
conf
from
lib
.
core
.
data
import
kb
from
lib
.
core
.
data
import
logger
from
lib
.
core
.
data
import
queries
from
lib
.
core
.
enums
import
DBMS
from
lib
.
core
.
session
import
setOs
from
lib
.
parse
.
banner
import
bannerParser
from
lib
.
request
import
inject
from
plugins
.
generic
.
custom
import
Custom
from
plugins
.
generic
.
databases
import
Databases
from
plugins
.
generic
.
entries
import
Entries
from
plugins
.
generic
.
search
import
Search
from
plugins
.
generic
.
users
import
Users
class
Enumeration
(
Custom
,
Databases
,
Entries
,
Search
,
Users
):
"""
This class defines generic enumeration functionalities for plugins.
"""
def
__init__
(
self
):
kb
.
data
.
has_information_schema
=
False
kb
.
data
.
banner
=
None
kb
.
data
.
hostname
=
""
kb
.
data
.
processChar
=
None
Custom
.
__init__
(
self
)
Databases
.
__init__
(
self
)
Entries
.
__init__
(
self
)
Search
.
__init__
(
self
)
Users
.
__init__
(
self
)
def
getBanner
(
self
):
if
not
conf
.
getBanner
:
return
if
kb
.
data
.
banner
is
None
:
infoMsg
=
"fetching banner"
logger
.
info
(
infoMsg
)
if
Backend
.
isDbms
(
DBMS
.
DB2
):
rootQuery
=
queries
[
DBMS
.
DB2
].
banner
for
query
in
(
rootQuery
.
query
,
rootQuery
.
query2
):
kb
.
data
.
banner
=
unArrayizeValue
(
inject
.
getValue
(
query
,
safeCharEncode
=
False
))
if
kb
.
data
.
banner
:
break
else
:
query
=
queries
[
Backend
.
getIdentifiedDbms
()].
banner
.
query
kb
.
data
.
banner
=
unArrayizeValue
(
inject
.
getValue
(
query
,
safeCharEncode
=
False
))
bannerParser
(
kb
.
data
.
banner
)
if
conf
.
os
and
conf
.
os
==
"windows"
:
kb
.
bannerFp
[
"type"
]
=
set
([
"Windows"
])
elif
conf
.
os
and
conf
.
os
==
"linux"
:
kb
.
bannerFp
[
"type"
]
=
set
([
"Linux"
])
elif
conf
.
os
:
kb
.
bannerFp
[
"type"
]
=
set
([
"%s%s"
%
(
conf
.
os
[
0
].
upper
(),
conf
.
os
[
1
:])])
if
conf
.
os
:
setOs
()
return
kb
.
data
.
banner
def
getHostname
(
self
):
infoMsg
=
"fetching server hostname"
logger
.
info
(
infoMsg
)
query
=
queries
[
Backend
.
getIdentifiedDbms
()].
hostname
.
query
if
not
kb
.
data
.
hostname
:
kb
.
data
.
hostname
=
unArrayizeValue
(
inject
.
getValue
(
query
,
safeCharEncode
=
False
))
return
kb
.
data
.
hostname
Back
|
FazBrowse Home
|
New Git URL