-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
337 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,5 @@ | ||
# opspack | ||
simple package manager for bug bounty/offensive. Using command line interface that can be used to install,update and upgrade tools easily | ||
# opspack - | ||
#### beta v.0.0.1 | ||
|
||
Opspack - [ Open Source Security ] is a simple package manager for bug bounty/offensive. Using command line interface that can be used to | ||
install,update and upgrade tools easily |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
echo" hai" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
|
||
REPO="" | ||
OPS_VERSION=0.0.1 | ||
OUTPUT=${OUTPUT:-/opt/opspackage/tools} | ||
Archives=${ARCHIVES:-/opt/opspackage/tarball/archives/} | ||
PackageScript=${BUILDSCRIPTS:-"opspackage/installer/"} | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,187 @@ | ||
#!/usr/bin/env bash | ||
|
||
|
||
ops_args (){ | ||
APPNAME="Opspack" | ||
APP_INFO="Open source security" | ||
VERSION="0.0.1.beta" | ||
action=none | ||
|
||
|
||
# 01010101 | ||
FALSE="0" | ||
TRUE="1" | ||
SUCCESS="0" | ||
FAILURE="1" | ||
|
||
#patternserch | ||
|
||
|
||
[[ "${#}" == 0 ]] && { | ||
|
||
|
||
echo "Usage: ${APPNAME} [options] command" | ||
echo " ${APPNAME} --help" | ||
echo " ${APPNAME} -I [pakacge] example : ops -I dirsearch" | ||
|
||
exit 1 | ||
|
||
} | ||
|
||
|
||
while [[ $# -gt 0 ]];do | ||
case "$1" in | ||
|
||
-c|commit) | ||
COMMIT=1 | ||
;; | ||
'-?'|help|-h) | ||
cat << ! | ||
Usage: opspack [options] command | ||
opspack --help | ||
opspack -I [pakacge] example : ops -I dirsearch | ||
Ops [Open source security] is a simple package manager for bug bounty | ||
using command line interface [CLI],that can be used to install, update, and upgrade their dependencies itself. | ||
Popular Command Tu Use: | ||
-I|install : Install package | ||
-U|upgrade : update database | ||
-R|remove : Remove package | ||
-l|installed : List Availible pkg | ||
-F|show : Show Information pkg | ||
-S|search : Search Availible pkg | ||
-v|version : Show version pkg | ||
-h|help : Show help | ||
! | ||
exit 0 | ||
;; | ||
-v|version|--version) | ||
echo ${APPNAME}: $APP_INFO v${VERSION} | ||
exit 0 | ||
;; | ||
-u|updatedb|--updatedb) | ||
sleep 2 | ||
updatedatabase | ||
;; | ||
-I|install|--instal) | ||
pkgname="$2" | ||
installpackage | ||
;; | ||
-t|template|--template) | ||
pkgname="$2" | ||
maketemplate | ||
;; | ||
-f|fdepends|--fdepends) | ||
pkgame="$1" | ||
;; | ||
-l|list|--list) | ||
list | ||
;; | ||
-s|search|--search) | ||
echo -ne "Enter the search : ";read patt; list | grep -i "$patt" | ||
|
||
|
||
;; | ||
|
||
*) | ||
OPTS[$OPTCOUNT]="$1" | ||
(( OPTCOUNT++ )) | ||
;; | ||
esac | ||
shift | ||
done | ||
|
||
} | ||
|
||
|
||
|
||
|
||
|
||
|
||
#PACKNAME="dirsearch" | ||
#REPO="maurosoria" | ||
#VERSION="v0.3.8" | ||
#PACKDES="Automatic SQL injection and database takeover tool" | ||
#TAG="SQL Injection" | ||
#PACKDEP="X" | ||
|
||
|
||
install () | ||
{ | ||
#echo "2" | ||
local PackscriptInstall="$1" | ||
local PACKDEPENDS | ||
#echo $PackscriptInstall | ||
PACKNAME=`grep "PACKNAME=" ${PackscriptInstall} | grep -v \# | head -n1 | cut -d\" -f 2` | ||
#echo $PACKNAME | ||
PACKVER=`grep "VERSION=" $PackscriptInstall | grep -v \# | head -n1 | cut -d\" -f 2` | ||
#echo $PACKVER | ||
PACKDEPENDS=`grep "PACKDEP=" $PackscriptInstall | grep -v \# | head -n1 | cut -d\" -f 2` | ||
#echo $PACKDEPENDS | ||
PACKDES=`grep "PACKDES=" $PackscriptInstall | grep -v \# | head -n1 | cut -d\" -f 2` | ||
#echo $PACKDES | ||
|
||
#echo "3" | ||
echo -e "\n$PACKNAME: "$white"$PACKDES" | ||
echo -e " Depends requirements for $PACKNAME-$PACKVER $white: $PACKDEPENDS" | ||
#__resultvar="$PackageDepens" | ||
#eval $__resultvar="'$PackageDepens'" | ||
} | ||
|
||
list() | ||
{ | ||
|
||
pkg=${1} | ||
|
||
find "${PackageScript}" -name "*.ops"| ( while read -r; do | ||
opspackage=$(local _var=${REPLY%/*}; echo "${_var##*/}") | ||
if [[ "${opspackage}" =~ "${pkg}" ]]; then | ||
found="${SUCCESS}" | ||
echo | ||
echo -e $red"${opspackage}"/VERSION: "$(cat "${REPLY}"|grep "VERSION"|cut -d"=" -f2| head -n1 | sed 's/^.\(.*\).$/\1/')" | ||
echo -e $white" $(cat "${REPLY}"|grep "PACKDES"|cut -d"=" -f2| sed 's/^.\(.*\).$/\1/')" | ||
elif grep pkgdesc "${REPLY}"| grep -qi "${pkg}"; then | ||
found="${SUCCESS}" | ||
echo "$(local _var=${REPLY%/*}; echo "${_var##*/}")" | ||
echo -e $red"${opspackage}"/VERSON: "$(cat "${REPLY}"|grep "VERSION"|cut -d"=" -f2| head -n1 | sed 's/^.\(.*\).$/\1/')" | ||
echo -e $white"$(cat "${REPLY}"|grep "PACKDES"| cut -d"=" -f2| sed 's/^.\(.*\).$/\1/')" | ||
fi | ||
done | ||
|
||
) | ||
|
||
} | ||
|
||
|
||
installpackage () | ||
{ | ||
#echo "1" | ||
local pkgname=$pkgname | ||
#echo $pkgname | ||
#PACKNAME=`grep "PACKNAME=$pkgname"` | ||
PackscriptInstall=`find ${PackageScript} -name $pkgname.ops -type f -print` | ||
#echo $PackscriptInstall | ||
#echo $PackageScript | ||
install $PackscriptInstall | ||
#test=${__resultvar} | ||
sleep 1 | ||
echo "" ; read -p "are you want to install ${pkgname} ( y/n )" respon | ||
if [[ $respon = y ]]; then | ||
. $PackscriptInstall | ||
fi | ||
|
||
#echo $test | ||
#echo $depens | ||
} | ||
|
||
|
||
|
||
if [ -e config/ops.conf ];then | ||
. config/ops.conf | ||
fi | ||
|
||
ops_args "$@" | ||
set -- "${OPTS[@]}" |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/bin/bash -e | ||
|
||
|
||
. script/opsFunction | ||
|
||
PACKNAME="dirsearch" | ||
REPO="maurosoria" | ||
VERSION="v0.3.8" | ||
PACKDES="is a simple command line tool designed to brute force directories and files in websites." | ||
TAG="Bruteforce" | ||
PACKDEP="Python 2.7" | ||
|
||
TARBALL="${REPO}/${PACKNAME}/archive/${VERSION}.tar.gz" | ||
|
||
downloadsource "http://github.com/${TARBALL}" PPA | ||
|
||
|
||
|
||
#tar -xvf /root/dev/Ops/Package/tools/${PACKNAME}/${VERSION}.tar.gz | ||
#rm -rf /root/dev/Ops/Package/tools/${PACKNAME}/${VERSION}.tar.gz | ||
echo " complete" | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/bin/bash -e | ||
|
||
. script/opsFunction | ||
|
||
PACKNAME="dracnmap" | ||
REPO="screetsec" | ||
VERSION="2.2" | ||
PACKDES="Easy Scanner with multithread using nmap " | ||
TAG="Scanner" | ||
PACKDEP="xterm" | ||
|
||
TARBALL="${REPO}/${PACKNAME}/archive/${VERSION}.tar.gz" | ||
|
||
downloadsource "http://github.com/${TARBALL}" PPA | ||
|
||
echo " complete" | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/bin/bash -e | ||
|
||
. script/opsFunction | ||
|
||
PACKNAME="Recsech" | ||
REPO="radenvodka" | ||
VERSION="1.6.0" | ||
PACKDES="Recsech is a tool for doing Footprinting & Reconnaissance " | ||
TAG="Scanner" | ||
PACKDEP="php" | ||
|
||
TARBALL="${REPO}/${PACKNAME}/archive/${VERSION}.tar.gz" | ||
|
||
downloadsource "http://github.com/${TARBALL}" PPA | ||
|
||
echo " complete" | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/bin/bash -e | ||
|
||
. script/opsFunction | ||
|
||
PACKNAME="sqlmap" | ||
REPO="sqlmapproject" | ||
VERSION="1.3" | ||
PACKDES="Automatic SQL injection and database takeover tool" | ||
TAG="SQL Injection" | ||
PACKDEP="X" | ||
|
||
TARBALL="${REPO}/${PACKNAME}/archive/${VERSION}.tar.gz" | ||
|
||
downloadsource "http://github.com/${TARBALL}" PPA | ||
|
||
echo " complete" | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
#!/bin/bash | ||
|
||
if [ -e ../config/ops.conf ];then | ||
. ../config/ops.conf | ||
fi | ||
|
||
downloadsource () { | ||
|
||
local url="$1" tarballname sourcedir | ||
local section | ||
|
||
if [ ${NODOWNLOAD:-0} -eq 1 ];then | ||
return | ||
fi | ||
|
||
if [ "X$2" != "X" ];then | ||
section="$2" | ||
else | ||
section="" | ||
fi | ||
|
||
if [ "X$3" != "X" ];then | ||
outname="-O $3" | ||
else | ||
outname="" | ||
fi | ||
|
||
|
||
if [ ! -e "${Archives}" ];then | ||
mkdir -vp "${Archives}"||true | ||
fi | ||
|
||
mkdir -vp "${Archives}/${PACKNAME}" 2>/dev/null||true | ||
pushd "${Archives}/${PACKNAME}" | ||
if ! type wget &> /dev/null;then | ||
echo "No 'wget' installed cannot download archive" | ||
popd | ||
return | ||
fi | ||
|
||
tarname="$(basename "$url")" | ||
if [ -e $tarname ];then | ||
#tar -xvf /root/dev/Ops/Package/tools/${PACKNAME}/${VERSION}.tar.gz | ||
popd | ||
return | ||
fi | ||
|
||
if ! wget -q --show-progress --no-check-certificate -c "$url" $outname;then | ||
echo "Download Failed Please Check Url $1!!!!!" | ||
if [ $EXITONFAIL -eq 1 ];then | ||
popd | ||
exit -1 | ||
fi | ||
fi | ||
# tar -xvf /root/dev/Ops/Package/tools/${PACKNAME}/${VERSION}.tar.gz | ||
popd | ||
} | ||
|