File: install.sh

package info (click to toggle)
sqlmap 1.9.6-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 12,792 kB
  • sloc: python: 51,991; xml: 13,943; ansic: 989; sh: 304; makefile: 62; sql: 61; perl: 30; cpp: 27; asm: 7
file content (63 lines) | stat: -rwxr-xr-x 2,059 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#!/bin/bash
# lib_postgresqludf_sys - a library with miscellaneous (operating) system level functions
# Copyright (C) 2009-2010  Bernardo Damele A. G.
# web: http://bernardodamele.blogspot.com/
# email: bernardo.damele@gmail.com
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA

# Adapt the following settings to your environment
USER="postgres"
#PORT="5435"
#VERSION="9.0"
PORT="5434"
VERSION="8.4"
#PORT="5433"
#VERSION="8.3"
#PORT="5432"
#VERSION="8.2"

echo "Compiling the PostgreSQL UDF"
make ${VERSION}

if test $? -ne 0; then
	echo "ERROR: You need postgresql-server development software installed"
	echo "to be able to compile this UDF, on Debian/Ubuntu just run:"

	if test "${VERSION}" == "8.2"; then
		echo "apt-get install postgresql-server-dev-8.2"
	elif test "${VERSION}" == "8.3"; then
		echo "apt-get install postgresql-server-dev-8.3"
	elif test "${VERSION}" == "8.4"; then
		echo "apt-get install postgresql-server-dev-8.4"
	elif test "${VERSION}" == "9.0"; then
		echo "apt-get install postgresql-server-dev-9.0"
	fi

	exit 1
else
	echo "PostgreSQL UDF compiled successfully"
fi

echo -e "\nPlease provide your PostgreSQL 'postgres' user's password"

psql -h 127.0.0.1 -p ${PORT} -U ${USER} -q template1 < lib_postgresqludf_sys.sql

if test $? -ne 0; then
	echo "ERROR: unable to install the UDF"
	exit 1
else
	echo "PostgreSQL UDF installed successfully"
fi