Sqlmap Advanced: Rugged installation of cx_oracle module, direct connection to Oracle to dump

Source: Internet
Author: User
Tags sqlite

After completing the Oracle connection Information (Ip,sid,user,password) in the sqlmap.conf, you want to connect directly to Oracle rather than through the injection point.

Direct Python sqlmap.py-c sqlmap.conf can be, prompt cx_oracle module is not installed, then install it.

As a result of the previous installation in Kali, this time on the Redhat confidence is full,

But things are hard to come by!


Odat on the Cx_oracle module installation process, to use. Installation (optional)
  • Get Instant client Basic, SDK (Devel) and sqlplus from the Oracle Web site:

    • X64:http://www.oracle.com/technetwork/topics/linuxx86-64soft-092277.html
    • X86:http://www.oracle.com/technetwork/topics/linuxsoft-082809.html
  • First, download the three RPM installation packages on the Oracle website (you need to register first), because Redhat can install the RPM directly, not like Kali need to convert to Deb,

  • A lot of convenience, this thought down also bon voyage, alas ...


  • Install the downloaded three packages, I downloaded the version of 11.1.0.1.
oracle-instantclient11.2-basic-??? . X??? . Rpmoracle-instantclient11.2-sqlplus-??? . X??? . Rpmoracle-instantclient11.2-devel-??? . X??? . RPM 
    • Install, start config variable
    • at the end of the/etc/profile add these lines (these are not right, the card almost collapsed here) :
  export  oracle_home=/usr /lib/oracle/11.2/client64/export  ld_library_path= $LD _library_path :  $ORACLE _ HOME /libexport  path=  $ORACLE _home /bin:  $PATH   
The right one should be
Export Oracle_home=/usr/lib/oracle/11.1.0.1/client64

Export ld_library_path=: $ORACLE _home/lib:/usr/local/lib: $LD _library_path:.

Export tns_admin= $ORACLE _home

Export path= $PATH: $ORACLE _home/bin:.

    • Disconnect ssh, or reboot (to make the configuration effective), reconnect redhat, and knock down the command:
Sqlplus

If that's true, that would be great, go ahead, but if the hint sqlplus smacking smacking, it means that the above/etc/profile is wrong.


    • Then create a symlink to your so file.
CD $ORACLE _home/lib/sudo ln-s libclntsh.so.11.1   libclntsh.so
    • Then create the /etc/ld.so.conf.d/oracle.conf file and add the path to Oracle home:
/usr/lib/oracle/11.2/client64/lib/
    • Then update the Ldpath using:
sudo ldconfig
    • Then start installing cx_oracle
Sudo-sSource /etc/profilepip Install Cx_oracle
Installation is python2.6
Pip prompt error, re-download 2.7.8 source code compiled to install Python,
But your own compiled Python will prompt more extensions (' gzip ', ' SSL ', ' Sqlite3 ')
Current Oython have been built without smacking,
Because Redhat is missing xxx, it does not compile the Sqlite3 module
 

You need to download Sqlite3 compile yourself, and then recompile Python

Reference http://www.redicecn.com/html/Python/ 20110419/251.html

  Install SQLite3 First, and then recompile to install Python.

 

1 Install SQLite3.

 

1) wget http://www.sqlite.org/sqlite-3.5.6.tar.gz

2) tar-xzvf sqlite-3.5.6.tar.gz

3) CD sqlite-3.5.6

4)./configure-- DISABLE-TCL

5) make 

6) make install

 

reference http://m.blog.chinaunix.net/uid-26000296-id-4356738.html

First, upgrade to 2.7.8

1. Upgrade Installation

Download the source tar package first

Linux comes with the download tool wget download as follows:

# wget http://www.python.org/ftp/python/2.7.8/Python-2.7.8.tar.gz

Download completed to download directory, unzip

# TAR-ZXVF Python-2.7.3.tar.gz

Go to the Unpacked folder

CD Python-2.7.3

Build a folder in/usr/local before compiling python2.7.3 (as a Python installation path to avoid overwriting the old version)

# mkdir/usr/local/python2.7.3

Compile the installation in the unzipped directory

#./configure--prefix=/usr/local/python2.7.3

# make

# make Install

The old version is not overwritten at this time, then the original/usr/bin/python link is changed to another name

# Mv/usr/bin/python/usr/bin/python_old

Link to build a new version of Python

# ln-s/usr/local/python2.7.3/bin/python2.7/usr/bin/python

This time input

# python

The new version of Python will be displayed.

View Sourceprint?

Python 2.7.3 (default, Sep 29 2013, 11:05:02)

[GCC 4.1.2 20080704 (Red Hat 4.1.2-54)] on linux2

Type "Help", "copyright", "credits" or "license" for more information.

>>>

    • PIP installs the cx_oracle and tests:
' Import cx_oracle '

It worked



Finally, Python sqlmap.py-c sqlmap.conf directly connected to Oracle for dump ...


Speed and leverage.

Sqlmap Advanced: Rugged installation of cx_oracle module, direct connection to Oracle to dump

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.