Sophie

Sophie

distrib > Mageia > 4 > x86_64 > by-pkgid > 0c066a8055ef778d4e14da656cffc84b > files > 3

sqlmap-0.9-9.mga4.src.rpm

%define revision 3630

# prevent rpm to create debug files for binary content
%define _enable_debug_packages    %{nil}
%define debug_package     %{nil}
# disable automatic dependencies, because of shipped exploits
%define __find_provides %{nil}
%define __find_requires %{nil}

Name:           sqlmap
Version:        0.9
Release:        %mkrel 9
Summary:        Automatic SQL injection and database takeover tool
Group:          Security
License:        GPL
URL:            http://sqlmap.org/
Source0:        http://downloads.sourceforge.net/sqlmap/sqlmap-%{version}.tar.gz
Patch0:         sqlmap-0.9-disable-svn-lookup.patch
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 lasting from database
fingerprinting, over data fetching from the database, to accessing the
underlying file system and executing commands on the operating system via
out-of-band connections.

%prep
%setup -q -n sqlmap
%patch0 -p 1
find . -name .svn | xargs rm -rf
# use a static revision, as we don't ship svn admin files
perl -pi -e 's/\@revision\@/%{revision}/' lib/core/settings.py

%install
rm -rf %{buildroot}

install -d -m 755 %{buildroot}%{_datadir}/%{name}
install -m 755 sqlmap.py %{buildroot}%{_datadir}/%{name}
cp -pr extra %{buildroot}%{_datadir}/%{name}
cp -pr lib %{buildroot}%{_datadir}/%{name}
cp -pr plugins %{buildroot}%{_datadir}/%{name}
cp -pr shell %{buildroot}%{_datadir}/%{name}
cp -pr txt %{buildroot}%{_datadir}/%{name}
cp -pr udf %{buildroot}%{_datadir}/%{name}
cp -pr xml %{buildroot}%{_datadir}/%{name}

install -d -m 755 %{buildroot}%{_bindir}
cat > %{buildroot}%{_bindir}/sqlmap <<EOF
#!/bin/sh
cd %{_datadir}/%{name}
./sqlmap.py "$@"
EOF
chmod +x %{buildroot}%{_bindir}/sqlmap

install -d -m 755 %{buildroot}%{_sysconfdir}
install -m 644 sqlmap.conf %{buildroot}%{_sysconfdir}
pushd %{buildroot}%{_datadir}/%{name}
ln -s ../../..%{_sysconfdir}/sqlmap.conf .
popd

%files
%doc doc/*
%{_datadir}/%{name}
%{_bindir}/%{name}
%config(noreplace) %{_sysconfdir}/%{name}.conf


%changelog
* Fri Oct 18 2013 umeabot <umeabot> 0.9-9.mga4
+ Revision: 502369
- Mageia 4 Mass Rebuild
- Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild

* Tue Oct 16 2012 guillomovitch <guillomovitch> 0.9-7.mga3
+ Revision: 307152
- switch to Security group

* Tue Aug 23 2011 guillomovitch <guillomovitch> 0.9-6.mga2
+ Revision: 134955
- fix wrapper
- disable automatic dependencies, because of shipped exploits
- this is a noarch package
- stop deleting binaries, they are exploit payloads for the target
- fix wrapper script
- disable automatic svn lookup if pysvn is installed
- drop useless obsoletes tag

  + fwang <fwang>
    - should be arch dependent package

* Wed Jul 20 2011 guillomovitch <guillomovitch> 0.9-1.mga2
+ Revision: 127303
- imported package sqlmap


* Thu Jul 07 2011 Guillaume Rousse <guillomovitch@mandriva.org> 0.9-1mdv2011
+ Revision: 689092
- import sqlmap