Merge pull request #420 from linxon/master

getsploit: new tool
This commit is contained in:
Anton Bolshakov 2019-03-04 06:57:33 +06:00 committed by GitHub
commit dc46850f11
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 126 additions and 6 deletions

View file

@ -1,2 +1,2 @@
DIST dpapick-0.2_p20130826.zip 799084 SHA256 2c38a295076e1cd533bc838ac0fb1c129b024803ba9bdee4b7e18046a1496ddb SHA512 3d025720e1b651e0b5a316c943d9969f897dd1a257c9d0576c21d17b7ea732451664c7f8c7f34f26113c0466adb7e438f4df04155c1ee696dc0b706911cb19d2 WHIRLPOOL 81260978b49a4672c5c7e65ac892a397388c4985caca954d086d11e1e750c5cbb711f00387d3c10329003a86c77444abf80df38335c94256f830b28e37bd36d4
DIST dpapick-0.3.tar.bz2 66607 SHA256 0ab8000dce72267ed23253297c62204a0c128673c463af47c0263c8492d352d5 SHA512 9939e0b6afe6b281c56e13fedc5ddf747c6ffc8802cbbd92199eef22239c8b2cba85e137018e09edaed11420c261ebd4b1d99441cb4be365e636e38bbc01a0cc WHIRLPOOL 1b70489f2c92e46da29605b9833f7fbf6c0525134bb2fc98d7ed698e61ce45b21e9d1314ce38d91ebffa7ddaba1073d0a278376011759757485f26381fc30ed8
DIST dpapick-0.2_p20130826.zip 799096 BLAKE2B 3e6c8040649a41d54fa098a6084ebf338c3369ba1f252bc400f20a5cef551d2e1069c66ec21a5b951c5c90d01fd6d1ae6228050f89b8bd2e1b2b63cf9c45ace8 SHA512 8aae65fae26bb28dbbd92265b790ac9b5645fd9acffa0de54faffde948587de63b60141a45cc423e79d456f0c30b25da8df23b4ca34e0610cc9bc335488ac143
DIST dpapick-0.3.tar.bz2 66607 BLAKE2B 5f6e398848b6359c7d32ecceac417bc5696cfafdc4d5f58273521fe4aaa9b73b938bd6a9c155d0e3e025601bd95320c401f17f7bc2896e718d06951745d33141 SHA512 9939e0b6afe6b281c56e13fedc5ddf747c6ffc8802cbbd92199eef22239c8b2cba85e137018e09edaed11420c261ebd4b1d99441cb4be365e636e38bbc01a0cc

View file

@ -1,6 +1,5 @@
# Copyright 1999-2014 Gentoo Foundation
# Copyright 1999-2019 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: blshkv $
EAPI=5

View file

@ -1,6 +1,5 @@
# Copyright 1999-2014 Gentoo Foundation
# Copyright 1999-2019 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: blshkv $
EAPI=5

View file

@ -0,0 +1 @@
DIST getsploit-0.2.2.tar.gz 12681 BLAKE2B 58fbfc265758bbd5e65e50e9df04690f592b13bea8b3c8a3b4ae76b42d51f8fe1f6a9c82258b33d64eef2c982b6580b70d9edb75fc25009b44ac4455d7bfe387 SHA512 b7150a49050fdef8a9e709844483c0fee991d13916a01a625f1f0c5a23960914d282cc48f74ffafe463053343d52a88576d06824fd27b5b8d7ce4d631b2fed81

View file

@ -0,0 +1,35 @@
diff -ur a/getsploit/getsploit.py b/getsploit/getsploit.py
--- a/getsploit/getsploit.py 2018-03-15 17:56:27.000000000 +0300
+++ b/getsploit/getsploit.py 2018-04-28 09:24:36.500368156 +0300
@@ -2,7 +2,7 @@
# -*- coding: utf-8 -*-
from __future__ import division
-from __init__ import __version__
+from getsploit import __version__
try:
import urllib.request as urllib2
@@ -16,6 +16,7 @@
import unicodedata
import re
import os
+from pathlib import Path
vulnersURL = {
'searchAPI' : 'https://vulners.com/api/v3/search/lucene/',
@@ -54,9 +55,13 @@
bytes_type = str
-DBPATH, SCRIPTNAME = os.path.split(os.path.abspath(__file__))
+SCRIPTNAME = os.path.split(os.path.abspath(__file__))
+DBPATH = str(Path.home()) + '/.getsploit'
DBFILE = os.path.join(DBPATH, 'getsploit.db')
+if not os.path.exists(DBPATH):
+ os.makedirs(DBPATH, exist_ok=True)
+
try:
import sqlite3
import zipfile

View file

@ -0,0 +1,39 @@
# Copyright 1999-2019 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=7
PYTHON_COMPAT=( python3_{4,5,6,7} )
PYTHON_REQ_USE="sqlite"
inherit eutils distutils-r1
DESCRIPTION="Command line utility for searching and downloading exploits."
HOMEPAGE="https://github.com/vulnersCom/getsploit"
SRC_URI=""
if [[ ${PV} == *9999 ]]; then
inherit git-r3
EGIT_REPO_URI="https://github.com/vulnersCom/getsploit"
KEYWORDS=""
else
SRC_URI="https://github.com/vulnersCom/getsploit/archive/${PV}.tar.gz -> ${P}.tar.gz"
KEYWORDS="~amd64 ~x86"
fi
RESTRICT="mirror"
LICENSE="LGPL-3"
SLOT="0"
IUSE=""
RDEPEND="${PYTHON_DEPS}"
src_prepare() {
eapply "${FILESDIR}"/${P}_add_support_user_home_dir.patch
eapply_user
}
pkg_postinst() {
elog
elog "See documentation: https://github.com/vulnersCom/getsploit#how-to-use"
elog
}

View file

@ -0,0 +1,39 @@
# Copyright 1999-2019 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=7
PYTHON_COMPAT=( python3_{4,5,6,7} )
PYTHON_REQ_USE="sqlite"
inherit eutils distutils-r1
DESCRIPTION="Command line utility for searching and downloading exploits."
HOMEPAGE="https://github.com/vulnersCom/getsploit"
SRC_URI=""
if [[ ${PV} == *9999 ]]; then
inherit git-r3
EGIT_REPO_URI="https://github.com/vulnersCom/getsploit"
KEYWORDS=""
else
SRC_URI="https://github.com/vulnersCom/getsploit/archive/${PV}.tar.gz -> ${P}.tar.gz"
KEYWORDS="~amd64 ~x86"
fi
RESTRICT="mirror"
LICENSE="LGPL-3"
SLOT="0"
IUSE=""
RDEPEND="${PYTHON_DEPS}"
src_prepare() {
eapply "${FILESDIR}"/${P}_add_support_user_home_dir.patch
eapply_user
}
pkg_postinst() {
elog
elog "See documentation: https://github.com/vulnersCom/getsploit#how-to-use"
elog
}

View file

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>email@linxon.ru</email>
<name>Yury Martynov</name>
</maintainer>
</pkgmetadata>