File: test_self_ssh

package info (click to toggle)
burp 3.1.4-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,684 kB
  • sloc: ansic: 50,989; sh: 3,612; cpp: 2,859; makefile: 868
file content (41 lines) | stat: -rwxr-xr-x 918 bytes parent folder | download | duplicates (3)
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
#!/usr/bin/env bash
#
# Test a burp client on the same machine as the server, but interact with the
# client over ssh.

DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
cd "$DIR"

path="$PWD"
build="$path/build"
target="$path/target"

. build_and_install

# args:
# 1 - directory where build was installed
# 2 - location of client burp
# 3 - location of client conf (for editing)
# 4 - location of client conf (for giving as option to burp binary)
# 5 - directory to backup
# 6 - directory to restore to
# 7 - address of the server
# 8 - ssh command (leave unset for self test)
# 9 - scp command (leave unset for self test)
# 10 - address of the client (leave unset for self test)
do_run()
{
	./test_main \
		"$target" \
		"$target/usr/sbin/burp" \
		"$target/etc/burp/burp.conf" \
		"$target/etc/burp/burp.conf" \
		"$build" \
		"/tmp/restore" \
		127.0.0.1 \
		"ssh" \
		"scp" \
		"localhost" || exit 1
}

do_run