SHA256
1
0
forked from pool/sqlmap

Accepting request 903545 from home:pperego

sqlmap is an open source penetration testing tool that automates the process of detecting and exploiting SQL injection flaws and taking over of database servers.

OBS-URL: https://build.opensuse.org/request/show/903545
OBS-URL: https://build.opensuse.org/package/show/security/sqlmap?expand=0&rev=1
This commit is contained in:
Johannes Segitz 2021-07-02 07:19:47 +00:00 committed by Git OBS Bridge
commit 5b4a228efe
6 changed files with 169 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.osc

55
fix_shebang.patch Normal file
View File

@ -0,0 +1,55 @@
Only in sqlmap-1.5.ori/extra/icmpsh: icmpsh-m.c
Only in sqlmap-1.5/extra/icmpsh: icmpsh-m.c.txt
Only in sqlmap-1.5.ori/extra/icmpsh: icmpsh-s.c
Only in sqlmap-1.5/extra/icmpsh: icmpsh-s.c.txt
Only in sqlmap-1.5.ori/extra/runcmd/src/runcmd: runcmd.cpp
Only in sqlmap-1.5/extra/runcmd/src/runcmd: runcmd.cpp.txt
Only in sqlmap-1.5.ori/extra/runcmd/src/runcmd: stdafx.cpp
Only in sqlmap-1.5/extra/runcmd/src/runcmd: stdafx.cpp.txt
Only in sqlmap-1.5.ori/extra/runcmd/src/runcmd: stdafx.h
Only in sqlmap-1.5/extra/runcmd/src/runcmd: stdafx.h.txt
diff --color -rub sqlmap-1.5.ori/extra/shutils/autocompletion.sh sqlmap-1.5/extra/shutils/autocompletion.sh
--- sqlmap-1.5.ori/extra/shutils/autocompletion.sh 2021-01-03 15:23:40.000000000 +0100
+++ sqlmap-1.5/extra/shutils/autocompletion.sh 2021-07-01 17:19:46.749860716 +0200
@@ -1,4 +1,4 @@
-#/usr/bin/env bash
+#!/usr/bin/bash
# source ./extra/shutils/autocompletion.sh
diff --color -rub sqlmap-1.5.ori/extra/shutils/duplicates.py sqlmap-1.5/extra/shutils/duplicates.py
--- sqlmap-1.5.ori/extra/shutils/duplicates.py 2021-01-03 15:23:40.000000000 +0100
+++ sqlmap-1.5/extra/shutils/duplicates.py 2021-07-01 17:20:26.786475153 +0200
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python
# Copyright (c) 2006-2021 sqlmap developers (http://sqlmap.org/)
# See the file 'LICENSE' for copying permission
diff --color -rub sqlmap-1.5.ori/sqlmapapi.py sqlmap-1.5/sqlmapapi.py
--- sqlmap-1.5.ori/sqlmapapi.py 2021-01-03 15:23:40.000000000 +0100
+++ sqlmap-1.5/sqlmapapi.py 2021-07-01 17:23:26.465232679 +0200
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python
"""
Copyright (c) 2006-2021 sqlmap developers (http://sqlmap.org/)
diff --color -rub sqlmap-1.5.ori/sqlmap.py sqlmap-1.5/sqlmap.py
--- sqlmap-1.5.ori/sqlmap.py 2021-01-03 15:23:40.000000000 +0100
+++ sqlmap-1.5/sqlmap.py 2021-07-01 17:23:41.313460555 +0200
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python
"""
Copyright (c) 2006-2021 sqlmap developers (http://sqlmap.org/)
diff --color -rub sqlmap-1.5.ori/thirdparty/identywaf/identYwaf.py sqlmap-1.5/thirdparty/identywaf/identYwaf.py
--- sqlmap-1.5.ori/thirdparty/identywaf/identYwaf.py 2021-01-03 15:23:40.000000000 +0100
+++ sqlmap-1.5/thirdparty/identywaf/identYwaf.py 2021-07-01 17:20:49.558824640 +0200
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python
"""
Copyright (c) 2019-2021 Miroslav Stampar (@stamparm), MIT

3
sqlmap-1.5.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:18c38c4ccf04e81e540527abc63130eced72b157da1d705e3af26b1d4768671d
size 6794876

4
sqlmap.changes Normal file
View File

@ -0,0 +1,4 @@
-------------------------------------------------------------------
Thu Jul 1 15:38:57 UTC 2021 - Paolo Perego <paolo.perego@suse.com>
- First import from upstream

83
sqlmap.spec Normal file
View File

@ -0,0 +1,83 @@
#
# spec file for package sqlmap
#
# Copyright (c) 2021 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: sqlmap
Version: 1.5
Release: 0
Summary: Automatic SQL injection and database takeover tool
License: GPL-2.0-or-later
URL: https://github.com/sqlmapproject/sqlmap
Source: sqlmap-1.5.tar.gz
Patch0: fix_shebang.patch
BuildRequires: python-rpm-macros
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildArch: noarch
%description
sqlmap is an open source penetration testing tool that automates the process of
detecting and exploiting SQL injection flaws and taking over of database
servers. It comes with a powerful detection engine, many niche features for the
ultimate penetration tester, and a broad range of switches including database
fingerprinting, over data fetching from the database, accessing the underlying
file system, and executing commands on the operating system via out-of-band
connections.
%prep
%setup -q -n sqlmap-%{version}
%patch0 -p1
find extra lib plugins tamper thirdparty -iname "*.py" -exec sed -i '1{/^#!/ d}' {} \;
find extra lib plugins tamper thirdparty -iname "*.pl" -exec sed -i '1{/^#!/ d}' {} \;
mv extra/icmpsh/icmpsh-m.c extra/icmpsh/icmpsh-m.c.txt
mv extra/icmpsh/icmpsh-s.c extra/icmpsh/icmpsh-s.c.txt
mv extra/runcmd/src/runcmd/runcmd.cpp extra/runcmd/src/runcmd/runcmd.cpp.txt
mv extra/runcmd/src/runcmd/stdafx.cpp extra/runcmd/src/runcmd/stdafx.cpp.txt
mv extra/runcmd/src/runcmd/stdafx.h extra/runcmd/src/runcmd/stdafx.h.txt
chmod ugo-x extra/shutils/duplicates.py
chmod ugo-x thirdparty/identywaf/identYwaf.py
%build
%install
mkdir -p %{buildroot}/usr/share/sqlmap
cp -a * %{buildroot}/usr/share/sqlmap
%python_expand %fdupes %{buildroot}/usr/share/sqlmap
%post
%{__ln_s} -f /usr/share/sqlmap/sqlmap.py %{_bindir}
%{__ln_s} -f /usr/share/sqlmap/sqlmapapi.py %{_bindir}
%postun
case "$1" in
0) # last one out put out the lights
rm -f %{_bindir}/sqlmap.py
rm -f %{_bindir}/sqlmapapi.py
;;
esac
%files
/usr/share/sqlmap
%license /usr/share/sqlmap/LICENSE
%doc /usr/share/sqlmap/README.md
%changelog