Merge pull request #179 from g0tmi1k/fix

Fix #178
This commit is contained in:
g0tmi1k 2020-06-22 22:14:55 +01:00 committed by GitHub
commit 7480caf5bd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 4 deletions

View file

@ -148,7 +148,6 @@ In short: clone the repository, add the binary into `$PATH`, and edit the config
```
$ sudo git clone https://github.com/offensive-security/exploitdb.git /opt/exploitdb
$ sed 's|path_array+=(.*)|path_array+=("/opt/exploitdb")|g' /opt/exploitdb/.searchsploit_rc > ~/.searchsploit_rc
$ sudo ln -sf /opt/exploitdb/searchsploit /usr/local/bin/searchsploit
```

View file

@ -1,6 +1,6 @@
#!/usr/bin/env bash
# Name: SearchSploit - Exploit-DB's CLI search tool
# Version: 4.1.2 (2020-05-28)
# Version: 4.1.3 (2020-06-22)
# Written by: Offensive Security, Unix-Ninja, and g0tmi1k
# Homepage: https://github.com/offensive-security/exploitdb
# Manual: https://www.exploit-db.com/searchsploit
@ -156,8 +156,8 @@ function update() {
package="${tmp_package[${i}]}"
## Update from the repos (e.g. Kali)
apt-cache search "${package}" 2>/dev/null >/dev/null #dpkg -l "${package}" 2>/dev/null >/dev/null
if [[ "$?" == "0" ]]; then
apt=$( apt-cache search "^${package}$" 2>/dev/null ) #dpkg -l "${package}" 2>/dev/null >/dev/null
if [[ "$?" == "0" ]] && [[ "${apt}" != "" ]]; then
updatedeb "${package}"
else
## Update from homebrew (e.g. OSX)