Comments (6)
Thanks for the assist! This is implemented in v1.5a.
from findsploit.
I like the idea and will implement it but do you have details for how to query the Github API for the latest release version? If you want to send a pull request with the changes, that works too.
from findsploit.
Set this at the top of the file and change it with every new release
currentVersion=1.5
This is the code that would go under the Findsploit -u option which I can show you how to setup later. I modified this from my own code, it seems you use egrep where I use perl grep I'm not sure how that will affect the functionality. I can look into a further solid implementation later today or tomorrow and will create a pull request.
if [[ $(curl -s https://api.github.com/repos/1N3/Findsploit/tags) == "" ]];then
echo "Error: no active internet connection"
exit 1
fi
latestVersion=$(curl -s https://api.github.com/repos/1N3/Findsploit/tags | grep -Po '"name":.*?[^\\]",'| head -1 | cut -c11-13)
if [[ "$latestVersion" != "$currentVersion" && "$latestVersion" != "" ]]; then
echo "Version $latestVersion available"
echo -n "Do you wish to update Findsploit [Y/n]: "
read answer
if [[ "$answer" == "Y" || "$answer" == "y" ]] ;then
cd ~ || { echo 'Update Failed' ; exit 1 ; }
rm -r Findsploit 2> /dev/null
git clone https://github.com/1N3/Findsploit || {echo "Couldn't download latest version" ; exit 1; }
cd Findsploit || { echo 'Update Failed' ; exit 1 ;}
git checkout $latestVersion 2> /dev/null
#chmod +x install.sh #this might be necessary in your case but wasnt in mine.
./install.sh
cd ..
rm -r Findsploit
else
exit 1
fi
else
echo "Findsploit is already the latest version"
fi
If you are going to add options, a -v option is also nice it essentially just echos the current version variable which my method requires you to set at the top of the bash file anyways
echo "Findsploit Version $currentVersion"
from findsploit.
Seems like you implemented it well, just know that the cut command when checking the GitHub api for the latest version is not going to recognize that the latest version is 1.5a it will only recognize [a-Z || 0-9].[a-Z || 0-9] Therefore currently the program will set the latest_version variable for the 1.5a release as 1.5 so it will believe you are on the latest version
from findsploit.
ah, good catch man! Thanks for the pull request.
from findsploit.
Glad to help
from findsploit.
Related Issues (11)
- console.error: fx_pnh: HOT 4
- Question about purpose of this tool HOT 3
- Add support for OSX HOT 4
- New path to searchsploit script HOT 1
- Cannot update due to seachsploit's location HOT 1
- Nice
- Dynamic management of installed browser
- How to use compilesploit? HOT 1
- License? HOT 5
- Update "$BROWSER_CMD" to xdg-open HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from findsploit.