Hi Shane.

Thank you for a suggestion. Find it implemented with the latest commit
(r4625).

Kind regards,
Miroslav Stampar

On Fri, Dec 23, 2011 at 6:58 AM, Shane Sewell <ssew...@gmail.com> wrote:

> I noticed that the most recent version of Tor suggests the use of SOCKS5
> in lieu of an HTTP proxy, and sqlmap is moving to this approach as well.
>  However, sqlmap attempts to use to use the default SOCKS Tor port of 9050.
>
> I have updated my local version to allow users to provide a specific SOCKS
> port for Tor by providing "--tor-port".  Please see the following diffs if
> you're interested in adding this functionality to your version:
>
> Index: lib/core/option.py
> ===================================================================
> --- lib/core/option.py (revision 4624)
> +++ lib/core/option.py (working copy)
> @@ -1732,7 +1732,7 @@
>      logger.info(infoMsg)
>
>      # Has to be SOCKS5 to prevent DNS leaks (
> http://en.wikipedia.org/wiki/Tor_%28anonymity_network%29)
> -    socks.setdefaultproxy(socks.PROXY_TYPE_SOCKS5 if conf.torType ==
> PROXYTYPE.SOCKS5 else socks.PROXY_TYPE_SOCKS4, LOCALHOST,
> DEFAULT_TOR_SOCKS_PORT)
> +    socks.setdefaultproxy(socks.PROXY_TYPE_SOCKS5 if conf.torType ==
> PROXYTYPE.SOCKS5 else socks.PROXY_TYPE_SOCKS4, LOCALHOST,
> int(DEFAULT_TOR_SOCKS_PORT if conf.torPort is None else conf.torPort))
>      socks.wrapmodule(urllib2)
>
>  def __checkTor():
> Index: lib/core/optiondict.py
> ===================================================================
> --- lib/core/optiondict.py (revision 4624)
> +++ lib/core/optiondict.py (working copy)
> @@ -174,6 +174,7 @@
>                                 "updateAll":         "boolean",
>                                 "tor":               "boolean",
>                                 "torType":           "string",
> +                               "torPort":           "integer",
>                               },
>
>              "Miscellaneous": {
> Index: lib/parse/cmdline.py
> ===================================================================
> --- lib/parse/cmdline.py (revision 4624)
> +++ lib/parse/cmdline.py (working copy)
> @@ -536,6 +536,9 @@
>
>          general.add_option("--tor-type", dest="torType",
>                                    help="Set Tor proxy type (HTTP -
> default, SOCKS4 or SOCKS5)")
> +
> +        general.add_option("--tor-port", dest="torPort",
> +                                  help="Set Tor port when using SOCKS4 or
> SOCKS5")
>
>          general.add_option("--update", dest="updateAll",
>                              action="store_true",
>
>
> Cheers,
> -Shane
>
>
> ------------------------------------------------------------------------------
> Write once. Port to many.
> Get the SDK and tools to simplify cross-platform app development. Create
> new or port existing apps to sell to consumers worldwide. Explore the
> Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
> http://p.sf.net/sfu/intel-appdev
> _______________________________________________
> sqlmap-users mailing list
> sqlmap-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/sqlmap-users
>
>


-- 
Miroslav Stampar
http://about.me/stamparm
------------------------------------------------------------------------------
Write once. Port to many.
Get the SDK and tools to simplify cross-platform app development. Create 
new or port existing apps to sell to consumers worldwide. Explore the 
Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
http://p.sf.net/sfu/intel-appdev
_______________________________________________
sqlmap-users mailing list
sqlmap-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlmap-users

Reply via email to