FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
sqlmap/tamper/space2plus.py at master · baixiangcpp/sqlmap · GitHub
baixiangcpp
/
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
/
tamper
/
space2plus.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
53 lines (38 loc) · 1.23 KB
Breadcrumbs
sqlmap
/
tamper
/
space2plus.py
Copy path
File metadata and controls
53 lines (38 loc) · 1.23 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
#!/usr/bin/env python
"""
Copyright (c) 2006-2015 sqlmap developers (http://sqlmap.org/)
See the file 'doc/COPYING' for copying permission
"""
from
lib
.
core
.
enums
import
PRIORITY
__priority__
=
PRIORITY
.
LOW
def
dependencies
():
pass
def
tamper
(
payload
,
**
kwargs
):
"""
Replaces space character (' ') with plus ('+')
Notes:
* Is this any useful? The plus get's url-encoded by sqlmap engine
invalidating the query afterwards
* This tamper script works against all databases
>>> tamper('SELECT id FROM users')
'SELECT+id+FROM+users'
"""
retVal
=
payload
if
payload
:
retVal
=
""
quote
,
doublequote
,
firstspace
=
False
,
False
,
False
for
i
in
xrange
(
len
(
payload
)):
if
not
firstspace
:
if
payload
[
i
].
isspace
():
firstspace
=
True
retVal
+=
"+"
continue
elif
payload
[
i
]
==
'
\'
'
:
quote
=
not
quote
elif
payload
[
i
]
==
'"'
:
doublequote
=
not
doublequote
elif
payload
[
i
]
==
" "
and
not
doublequote
and
not
quote
:
retVal
+=
"+"
continue
retVal
+=
payload
[
i
]
return
retVal
Back
|
FazBrowse Home
|
New Git URL