Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b92fc84

Browse files
committed
Adding pypi script to the repository
1 parent ef79bbf commit b92fc84

3 files changed

Lines changed: 178 additions & 2 deletions

File tree

extra/shutils/pypi.sh

Lines changed: 176 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,176 @@
1+
#!/bin/bash
2+
3+
declare -x SCRIPTPATH="${0}"
4+
SETTINGS="${SCRIPTPATH%/*}/../../lib/core/settings.py"
5+
VERSION=$(cat $SETTINGS | grep -E "^VERSION =" | cut -d '"' -f 2 | cut -d '.' -f 1-3)
6+
TYPE=pip
7+
TMP_DIR=/tmp/pypi
8+
mkdir $TMP_DIR
9+
cd $TMP_DIR
10+
cat > $TMP_DIR/setup.py << EOF
11+
#!/usr/bin/env python
12+
13+
"""
14+
Copyright (c) 2006-2016 sqlmap developers (http://sqlmap.org/)
15+
See the file 'doc/COPYING' for copying permission
16+
"""
17+
18+
from setuptools import setup, find_packages
19+
20+
setup(
21+
name='sqlmap',
22+
version='$VERSION',
23+
description="Automatic SQL injection and database takeover tool",
24+
author='Bernardo Damele Assumpcao Guimaraes, Miroslav Stampar',
25+
26+
url='https://sqlmap.org',
27+
download_url='https://github.com/sqlmapproject/sqlmap/archive/$VERSION.zip',
28+
license='GNU General Public License v2 (GPLv2)',
29+
packages=find_packages(),
30+
include_package_data=True,
31+
zip_safe=False,
32+
# https://pypi.python.org/pypi?%3Aaction=list_classifiers
33+
classifiers=[
34+
'Development Status :: 5 - Production/Stable',
35+
'License :: OSI Approved :: GNU General Public License v2 (GPLv2)',
36+
'Natural Language :: English',
37+
'Operating System :: OS Independent',
38+
'Programming Language :: Python',
39+
'Environment :: Console',
40+
'Topic :: Database',
41+
'Topic :: Security',
42+
],
43+
entry_points={
44+
'console_scripts': [
45+
'sqlmap = sqlmap.sqlmap:main',
46+
],
47+
},
48+
)
49+
EOF
50+
wget "https://github.com/sqlmapproject/sqlmap/archive/$VERSION.zip" -O sqlmap.zip
51+
unzip sqlmap.zip
52+
rm sqlmap.zip
53+
mv "sqlmap-$VERSION" sqlmap
54+
cat > sqlmap/__init__.py << EOF
55+
#!/usr/bin/env python
56+
57+
"""
58+
Copyright (c) 2006-2016 sqlmap developers (http://sqlmap.org/)
59+
See the file 'doc/COPYING' for copying permission
60+
"""
61+
62+
import os
63+
import sys
64+
65+
sys.dont_write_bytecode = True
66+
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
67+
EOF
68+
cat > README.rst << "EOF"
69+
sqlmap
70+
======
71+
72+
|Build Status| |Python 2.6|2.7| |License| |Twitter|
73+
74+
sqlmap is an open source penetration testing tool that automates the
75+
process of detecting and exploiting SQL injection flaws and taking over
76+
of database servers. It comes with a powerful detection engine, many
77+
niche features for the ultimate penetration tester and a broad range of
78+
switches lasting from database fingerprinting, over data fetching from
79+
the database, to accessing the underlying file system and executing
80+
commands on the operating system via out-of-band connections.
81+
82+
Screenshots
83+
-----------
84+
85+
.. figure:: https://raw.github.com/wiki/sqlmapproject/sqlmap/images/sqlmap_screenshot.png
86+
:alt: Screenshot
87+
88+
89+
You can visit the `collection of
90+
screenshots <https://github.com/sqlmapproject/sqlmap/wiki/Screenshots>`__
91+
demonstrating some of features on the wiki.
92+
93+
Installation
94+
------------
95+
96+
You can use pip to install and/or upgrade the sqlmap to latest (monthly) tagged version with: ::
97+
98+
pip install --upgrade sqlmap
99+
100+
Alternatively, you can download the latest tarball by clicking
101+
`here <https://github.com/sqlmapproject/sqlmap/tarball/master>`__ or
102+
latest zipball by clicking
103+
`here <https://github.com/sqlmapproject/sqlmap/zipball/master>`__.
104+
105+
If you prefer fetching daily updates, you can download sqlmap by cloning the
106+
`Git <https://github.com/sqlmapproject/sqlmap>`__ repository:
107+
108+
::
109+
110+
git clone https://github.com/sqlmapproject/sqlmap.git sqlmap-dev
111+
112+
sqlmap works out of the box with
113+
`Python <http://www.python.org/download/>`__ version **2.6.x** and
114+
**2.7.x** on any platform.
115+
116+
Usage
117+
-----
118+
119+
To get a list of basic options and switches use:
120+
121+
::
122+
123+
python sqlmap.py -h
124+
125+
To get a list of all options and switches use:
126+
127+
::
128+
129+
python sqlmap.py -hh
130+
131+
You can find a sample run `here <https://asciinema.org/a/46601>`__. To
132+
get an overview of sqlmap capabilities, list of supported features and
133+
description of all options and switches, along with examples, you are
134+
advised to consult the `user's
135+
manual <https://github.com/sqlmapproject/sqlmap/wiki>`__.
136+
137+
Links
138+
-----
139+
140+
- Homepage: http://sqlmap.org
141+
- Download:
142+
`.tar.gz <https://github.com/sqlmapproject/sqlmap/tarball/master>`__
143+
or `.zip <https://github.com/sqlmapproject/sqlmap/zipball/master>`__
144+
- Commits RSS feed:
145+
https://github.com/sqlmapproject/sqlmap/commits/master.atom
146+
- Issue tracker: https://github.com/sqlmapproject/sqlmap/issues
147+
- User's manual: https://github.com/sqlmapproject/sqlmap/wiki
148+
- Frequently Asked Questions (FAQ):
149+
https://github.com/sqlmapproject/sqlmap/wiki/FAQ
150+
- Mailing list subscription:
151+
https://lists.sourceforge.net/lists/listinfo/sqlmap-users
152+
- Mailing list RSS feed:
153+
http://rss.gmane.org/messages/complete/gmane.comp.security.sqlmap
154+
- Mailing list archive:
155+
http://news.gmane.org/gmane.comp.security.sqlmap
156+
- Twitter: [@sqlmap](https://twitter.com/sqlmap)
157+
- Demos: http://www.youtube.com/user/inquisb/videos
158+
- Screenshots: https://github.com/sqlmapproject/sqlmap/wiki/Screenshots
159+
160+
.. |Build Status| image:: https://api.travis-ci.org/sqlmapproject/sqlmap.svg?branch=master
161+
:target: https://api.travis-ci.org/sqlmapproject/sqlmap
162+
.. |Python 2.6|2.7| image:: https://img.shields.io/badge/python-2.6|2.7-yellow.svg
163+
:target: https://www.python.org/
164+
.. |License| image:: https://img.shields.io/badge/license-GPLv2-red.svg
165+
:target: https://raw.githubusercontent.com/sqlmapproject/sqlmap/master/doc/COPYING
166+
.. |Twitter| image:: https://img.shields.io/badge/[email protected]
167+
:target: https://twitter.com/sqlmap
168+
169+
.. pandoc --from=markdown --to=rst --output=README.rst sqlmap/README.md
170+
.. http://rst.ninjs.org/
171+
EOF
172+
sed -i "s/^VERSION =.*/VERSION = \"$VERSION\"/g" sqlmap/lib/core/settings.py
173+
sed -i "s/^TYPE =.*/TYPE = \"$TYPE\"/g" sqlmap/lib/core/settings.py
174+
for file in $(find sqlmap -type f | grep -v -E "\.(git|yml)"); do echo include $file >> MANIFEST.in; done
175+
python setup.py sdist upload
176+
rm -rf $TMP_DIR

lib/core/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
from lib.core.revision import getRevisionNumber
2020

2121
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
22-
VERSION = "1.0.8.14"
22+
VERSION = "1.0.8.15"
2323
REVISION = getRevisionNumber()
2424
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
2525
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}

txt/checksum.md5

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ e60456db5380840a586654344003d4e6 lib/core/readlineng.py
4545
5ef56abb8671c2ca6ceecb208258e360 lib/core/replication.py
4646
99a2b496b9d5b546b335653ca801153f lib/core/revision.py
4747
7c15dd2777af4dac2c89cab6df17462e lib/core/session.py
48-
5134b2c12742dd3e81969ffac38961d3 lib/core/settings.py
48+
d8f65d22fc82dcb594768a228a53c08a lib/core/settings.py
4949
7af83e4f18cab6dff5e67840eb65be80 lib/core/shell.py
5050
23657cd7d924e3c6d225719865855827 lib/core/subprocessng.py
5151
0bc2fae1dec18cdd11954b22358293f2 lib/core/target.py

0 commit comments

Comments
 (0)