File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1919from lib .core .enums import OS
2020
2121# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
22- VERSION = "1.1.10.2 "
22+ VERSION = "1.1.10.3 "
2323TYPE = "dev" if VERSION .count ('.' ) > 2 and VERSION .split ('.' )[- 1 ] != '0' else "stable"
2424TYPE_COLORS = {"dev" : 33 , "stable" : 90 , "pip" : 34 }
2525VERSION_STRING = "sqlmap/%s#%s" % ('.' .join (VERSION .split ('.' )[:- 1 ]) if VERSION .count ('.' ) > 2 and VERSION .split ('.' )[- 1 ] == '0' else VERSION , TYPE )
100100# Regular expression used for extracting results from DuckDuckGo search
101101DUCKDUCKGO_REGEX = r'"u":"([^"]+)'
102102
103+ # Regular expression used for extracting results from Bing search
104+ BING_REGEX = r'<h2><a href="([^"]+)" h='
105+
103106# Dummy user agent for search (if default one returns different results)
104107DUMMY_SEARCH_USER_AGENT = "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:49.0) Gecko/20100101 Firefox/49.0"
105108
Original file line number Diff line number Diff line change 2626from lib .core .exception import SqlmapBaseException
2727from lib .core .exception import SqlmapConnectionException
2828from lib .core .exception import SqlmapUserQuitException
29+ from lib .core .settings import BING_REGEX
2930from lib .core .settings import DUMMY_SEARCH_USER_AGENT
3031from lib .core .settings import DUCKDUCKGO_REGEX
3132from lib .core .settings import GOOGLE_REGEX
@@ -108,11 +109,15 @@ def _search(dork):
108109 if not retVal :
109110 message = "no usable links found. What do you want to do?"
110111 message += "\n [1] (re)try with DuckDuckGo (default)"
111- message += "\n [2] quit"
112+ message += "\n [2] (re)try with Bing"
113+ message += "\n [3] quit"
112114 choice = readInput (message , default = '1' )
113115
114- if choice == '2 ' :
116+ if choice == '3 ' :
115117 raise SqlmapUserQuitException
118+ elif choice == '2' :
119+ url = "https://www.bing.com/search?q=%s&first=%d" % (urlencode (dork , convall = True ), (gpage - 1 ) * 10 + 1 )
120+ regex = BING_REGEX
116121 elif choice == '1' :
117122 url = "https://duckduckgo.com/d.js?"
118123 url += "q=%s&p=%d&s=100" % (urlencode (dork , convall = True ), gpage )
Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ e8e9fd4f224ead0caa1569312b5b2582 lib/core/optiondict.py
4646d8e9250f3775119df07e9070eddccd16 lib/core/replication.py
4747785f86e3f963fa3798f84286a4e83ff2 lib/core/revision.py
484840c80b28b3a5819b737a5a17d4565ae9 lib/core/session.py
49- 6161dfdfa4899bc9fe4b0ca10af24382 lib/core/settings.py
49+ a6352bdfb488eb5323ca9debe1dab8c2 lib/core/settings.py
5050d91291997d2bd2f6028aaf371bf1d3b6 lib/core/shell.py
51512ad85c130cc5f2b3701ea85c2f6bbf20 lib/core/subprocessng.py
5252effc153067a00bd43461bfc1cdec1122 lib/core/target.py
@@ -111,7 +111,7 @@ e76a08237ee6a4cd6855af79610ea8a5 lib/utils/htmlentities.py
1111119d8c858417d356e49e1959ba253aede4 lib/utils/pivotdumptable.py
1121128520a745c9b4db3814fe46f4c34c6fbc lib/utils/progress.py
1131132c3638d499f3c01c34187e531f77d004 lib/utils/purge.py
114- 7610a89573b32291a4bea66d4ee10a5c lib/utils/search.py
114+ 3857f14dd3809a5091ea9262135af103 lib/utils/search.py
115115fe2be081f924abf08767ed89ab12b418 lib/utils/sqlalchemy.py
116116caeea96ec9c9d489f615f282259b32ca lib/utils/timeout.py
1171176fa36b9742293756b226cddee11b7d52 lib/utils/versioncheck.py
You can’t perform that action at this time.
0 commit comments