Fix an clipboard issue if it there wasn't $DISPLAY

This commit is contained in:
g0tmi1k 2016-09-20 23:28:07 +01:00
parent 235761b103
commit 01cd5bae40

View file

@ -1,6 +1,6 @@
#!/bin/bash
# Name: SearchSploit - Exploit-DB's CLI search tool
# Version: 3.6 (Release date: 2016-09-19)
# Version: 3.6.1 (Release date: 2016-09-20)
# Written by: Offensive Security, Unix-Ninja & g0tmi1k
# Homepage: https://github.com/offensive-security/exploit-database
#
@ -274,9 +274,9 @@ if [[ "${GETPATH}" -eq 1 ]]; then
if [[ "${CLIPBOARD}" -eq 1 ]]; then
## Are any copy programs available?
if hash xclip 2>/dev/null || hash pbcopy 2>/dev/null; then
## Linux
## Linux (Will require $DISPLAY)
if hash xclip 2>/dev/null; then
echo -ne "${location}" | xclip -selection clipboard
echo -ne "${location}" | xclip -selection clipboard 2>/dev/null
echo "Copied EDB-ID ${edbdb}'s path to the clipboard."
## OSX
elif hash pbcopy 2>/dev/null; then