Skip to content

Commit 640a9f3

Browse files
committed
Refactor
1 parent d8326bc commit 640a9f3

16 files changed

Lines changed: 621 additions & 346 deletions

.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
######################################################
2+
# Python
3+
######################################################
4+
*.pyc
5+
6+
dist/
7+
build/
8+
sqlmapcli.egg-info/

HISTORY.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
2016-08-18
2+
-----------
3+
Release v0.10.

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2016 jetz
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

MANIFEST.in

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
include LICENSE
2+
include HISTORY.rst

README.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Simplify Your Operations For Sqlmapapi
2+
3+
TODO
4+
-----
5+
- [ ] docs
6+
- [ ] download
7+
- [ ] examples

examples/client.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/usr/bin/env python
2+
# -*- coding: utf-8 -*-
3+
4+
import sys
5+
sys.path.insert(0, '..')
6+
7+
from sqlmapcli import client
8+
9+
if __name__ == "__main__":
10+
admin_id = '10af2eefc9606577bccb75ced1fa74db'
11+
c = client.Client(admin_id)
12+
task = c.create_task({'url': 'http://testphp.vulnweb.com/artists.php?artist=1'}) # noqa
13+
r = c.list_tasks()
14+
print(r)
15+
c.delete_task(task.id)
16+
c.flush_tasks()

examples/task.py

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
#!/usr/bin/env python
2+
# -*- coding: utf-8 -*-
3+
4+
import sys
5+
sys.path.insert(0, '..')
6+
7+
import time
8+
from pprint import pprint
9+
10+
from sqlmapcli import client
11+
12+
if __name__ == "__main__":
13+
admin_id = '10af2eefc9606577bccb75ced1fa74db'
14+
c = client.Client(admin_id)
15+
"""
16+
task = c.create_task()
17+
r = task.run(url='http://testphp.vulnweb.com/artists.php?artist=1')
18+
pprint(r)
19+
r = c.list_tasks()
20+
pprint(r)
21+
c.delete_task(task.id)
22+
c.flush_tasks()
23+
"""
24+
25+
###################################################
26+
27+
task = c.create_task()
28+
task.set_option('url', 'http://testphp.vulnweb.com/artists.php?artist=1')
29+
task.start()
30+
r = task.get_result()
31+
pprint(r)
32+
while task.running:
33+
time.sleep(1)
34+
r = task.get_result()
35+
pprint(r)
36+
r = c.list_tasks()
37+
pprint(r)
38+
c.delete_task(task.id)
39+
c.flush_tasks()

report.py

Lines changed: 0 additions & 62 deletions
This file was deleted.

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
requests == 2.10.0

setup.py

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
#!/usr/bin/env python
2+
# -*- coding: utf-8 -*-
3+
4+
import re
5+
6+
from codecs import open
7+
8+
from setuptools import setup, find_packages
9+
10+
11+
with open('sqlmapcli/__init__.py', 'r') as fd:
12+
version = re.search(r'^__version__\s*=\s*[\'"]([^\'"]*)[\'"]',
13+
fd.read(), re.MULTILINE).group(1)
14+
15+
if not version:
16+
raise RuntimeError('Cannot find version information')
17+
18+
with open('README.rst', 'r', 'utf-8') as f:
19+
readme = f.read()
20+
21+
with open('HISTORY.rst', 'r', 'utf-8') as f:
22+
history = f.read()
23+
24+
25+
setup(
26+
name='sqlmapcli',
27+
version=version,
28+
description='Simplify your operations for sqlmapapi',
29+
long_description=readme + '\n\n' + history,
30+
author='jetz',
31+
author_email='jet.zheung@gmail.com',
32+
url='https://www.github.com/jetz/sqlmapcli',
33+
packages=find_packages(),
34+
install_requires=['requests>=2.10.0'],
35+
license='MIT',
36+
keywords='sqlmap, sqlmapapi, sqlmapcli, sqlmap-proxy, sqlmap-client',
37+
classifiers=(
38+
'Programming Language :: Python',
39+
'Programming Language :: Python :: 2.7',
40+
'Programming Language :: Python :: 3',
41+
'Programming Language :: Python :: 3.3',
42+
'Programming Language :: Python :: 3.4',
43+
'Programming Language :: Python :: 3.5',
44+
'Programming Language :: Python :: Implementation :: CPython',
45+
'Programming Language :: Python :: Implementation :: PyPy'
46+
)
47+
)

0 commit comments

Comments
 (0)