@@ -336,13 +336,10 @@ def _setCrawler():
336336 if not conf .crawlDepth :
337337 return
338338
339- if not any (( conf .bulkFile , conf . sitemapUrl )) :
339+ if not conf .bulkFile :
340340 crawl (conf .url )
341341 else :
342- if conf .bulkFile :
343- targets = getFileItems (conf .bulkFile )
344- else :
345- targets = list (parseSitemap (conf .sitemapUrl ))
342+ targets = getFileItems (conf .bulkFile )
346343
347344 for i in xrange (len (targets )):
348345 try :
@@ -443,23 +440,6 @@ def _setBulkMultipleTargets():
443440 warnMsg = "no usable links found (with GET parameters)"
444441 logger .warn (warnMsg )
445442
446- def _setSitemapTargets ():
447- if not conf .sitemapUrl :
448- return
449-
450- infoMsg = "parsing sitemap '%s'" % conf .sitemapUrl
451- logger .info (infoMsg )
452-
453- found = False
454- for item in parseSitemap (conf .sitemapUrl ):
455- if re .match (r"[^ ]+\?(.+)" , item , re .I ):
456- found = True
457- kb .targets .add ((item .strip (), None , None , None , None ))
458-
459- if not found and not conf .forms and not conf .crawlDepth :
460- warnMsg = "no usable links found (with GET parameters)"
461- logger .warn (warnMsg )
462-
463443def _findPageForms ():
464444 if not conf .forms or conf .crawlDepth :
465445 return
@@ -471,15 +451,13 @@ def _findPageForms():
471451 infoMsg = "searching for forms"
472452 logger .info (infoMsg )
473453
474- if not any ((conf .bulkFile , conf .googleDork , conf . sitemapUrl )):
454+ if not any ((conf .bulkFile , conf .googleDork )):
475455 page , _ , _ = Request .queryPage (content = True , ignoreSecondOrder = True )
476456 if findPageForms (page , conf .url , True , True ):
477457 found = True
478458 else :
479459 if conf .bulkFile :
480460 targets = getFileItems (conf .bulkFile )
481- elif conf .sitemapUrl :
482- targets = list (parseSitemap (conf .sitemapUrl ))
483461 elif conf .googleDork :
484462 targets = [_ [0 ] for _ in kb .targets ]
485463 kb .targets .clear ()
@@ -1653,16 +1631,13 @@ def _cleanupOptions():
16531631 if conf .fileDest :
16541632 conf .fileDest = ntToPosixSlashes (normalizePath (conf .fileDest ))
16551633
1656- if conf .sitemapUrl and not conf .sitemapUrl .lower ().startswith ("http" ):
1657- conf .sitemapUrl = "http%s://%s" % ('s' if conf .forceSSL else '' , conf .sitemapUrl )
1658-
16591634 if conf .msfPath :
16601635 conf .msfPath = ntToPosixSlashes (normalizePath (conf .msfPath ))
16611636
16621637 if conf .tmpPath :
16631638 conf .tmpPath = ntToPosixSlashes (normalizePath (conf .tmpPath ))
16641639
1665- if any ((conf .googleDork , conf .logFile , conf .bulkFile , conf .sitemapUrl , conf . forms , conf .crawlDepth )):
1640+ if any ((conf .googleDork , conf .logFile , conf .bulkFile , conf .forms , conf .crawlDepth )):
16661641 conf .multipleTargets = True
16671642
16681643 if conf .optimize :
@@ -2508,8 +2483,8 @@ def _basicOptionValidation():
25082483 errMsg = "maximum number of used threads is %d avoiding potential connection issues" % MAX_NUMBER_OF_THREADS
25092484 raise SqlmapSyntaxException (errMsg )
25102485
2511- if conf .forms and not any ((conf .url , conf .googleDork , conf .bulkFile , conf . sitemapUrl )):
2512- errMsg = "switch '--forms' requires usage of option '-u' ('--url'), '-g', '-m' or '-x '"
2486+ if conf .forms and not any ((conf .url , conf .googleDork , conf .bulkFile )):
2487+ errMsg = "switch '--forms' requires usage of option '-u' ('--url'), '-g' or '-m '"
25132488 raise SqlmapSyntaxException (errMsg )
25142489
25152490 if conf .crawlExclude and not conf .crawlDepth :
@@ -2610,7 +2585,7 @@ def _basicOptionValidation():
26102585 errMsg = "value for option '--union-char' must be an alpha-numeric value (e.g. 1)"
26112586 raise SqlmapSyntaxException (errMsg )
26122587
2613- if conf .hashFile and any ((conf .direct , conf .url , conf .logFile , conf .bulkFile , conf .googleDork , conf .configFile , conf .requestFile , conf .updateAll , conf .smokeTest , conf .liveTest , conf .wizard , conf .dependencies , conf .purge , conf .sitemapUrl , conf . listTampers )):
2588+ if conf .hashFile and any ((conf .direct , conf .url , conf .logFile , conf .bulkFile , conf .googleDork , conf .configFile , conf .requestFile , conf .updateAll , conf .smokeTest , conf .liveTest , conf .wizard , conf .dependencies , conf .purge , conf .listTampers )):
26142589 errMsg = "option '--crack' should be used as a standalone"
26152590 raise SqlmapSyntaxException (errMsg )
26162591
@@ -2677,7 +2652,7 @@ def init():
26772652
26782653 parseTargetDirect ()
26792654
2680- if any ((conf .url , conf .logFile , conf .bulkFile , conf .sitemapUrl , conf . requestFile , conf .googleDork , conf .liveTest )):
2655+ if any ((conf .url , conf .logFile , conf .bulkFile , conf .requestFile , conf .googleDork , conf .liveTest )):
26812656 _setHostname ()
26822657 _setHTTPTimeout ()
26832658 _setHTTPExtraHeaders ()
@@ -2692,7 +2667,6 @@ def init():
26922667 _setSafeVisit ()
26932668 _doSearch ()
26942669 _setBulkMultipleTargets ()
2695- _setSitemapTargets ()
26962670 _checkTor ()
26972671 _setCrawler ()
26982672 _findPageForms ()
0 commit comments