Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
sqlmapproject
GitHub Repository: sqlmapproject/sqlmap
Path: blob/master/tamper/base64encode.py
2983 views
1
#!/usr/bin/env python
2
3
"""
4
Copyright (c) 2006-2025 sqlmap developers (https://sqlmap.org)
5
See the file 'LICENSE' for copying permission
6
"""
7
8
from lib.core.convert import encodeBase64
9
from lib.core.enums import PRIORITY
10
11
__priority__ = PRIORITY.LOW
12
13
def dependencies():
14
pass
15
16
def tamper(payload, **kwargs):
17
"""
18
Encodes the entire payload using Base64
19
20
>>> tamper("1' AND SLEEP(5)#")
21
'MScgQU5EIFNMRUVQKDUpIw=='
22
"""
23
24
return encodeBase64(payload, binary=False) if payload else payload
25
26