Skip to content

Commit

Permalink
v0.0.1 - beta~
Browse files Browse the repository at this point in the history
  • Loading branch information
screetsec committed Jun 11, 2019
1 parent c484c53 commit dd34a93
Show file tree
Hide file tree
Showing 10 changed files with 337 additions and 2 deletions.
7 changes: 5 additions & 2 deletions README.md
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
1 change: 1 addition & 0 deletions config/oke
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
echo" hai"
9 changes: 9 additions & 0 deletions config/ops.conf
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/"}



187 changes: 187 additions & 0 deletions opspack
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.
23 changes: 23 additions & 0 deletions opspackage/installer/dirsearch/dirsearch.ops
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"


18 changes: 18 additions & 0 deletions opspackage/installer/dracnmap/dracnmap.ops
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"


18 changes: 18 additions & 0 deletions opspackage/installer/recsech/recsech.ops
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"


18 changes: 18 additions & 0 deletions opspackage/installer/sqlmap/sqlmap.ops
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"


58 changes: 58 additions & 0 deletions script/opsFunction
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
}

0 comments on commit dd34a93

Please sign in to comment.