All Projects → Paradoxis → PIP-Module-Scanner

Paradoxis / PIP-Module-Scanner

Licence: MIT license
Scans your Python project for all installed third party pip libraries that are used and generates a requirements.txt file based on it

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to PIP-Module-Scanner

Pentest Tools Framework
Pentest Tools Framework is a database of exploits, Scanners and tools for penetration testing. Pentest is a powerful framework includes a lot of tools for beginners. You can explore kernel vulnerabilities, network vulnerabilities
Stars: ✭ 211 (+1010.53%)
Mutual labels:  scanner
Sec Admin
分布式资产安全扫描核心管理系统(弱口令扫描,漏洞扫描)
Stars: ✭ 222 (+1068.42%)
Mutual labels:  scanner
Esp32marauder
A suite of WiFi/Bluetooth offensive and defensive tools for the ESP32
Stars: ✭ 233 (+1126.32%)
Mutual labels:  scanner
Opencv Document Scanner
An interactive document scanner built in Python using OpenCV featuring automatic corner detection, image sharpening, and color thresholding.
Stars: ✭ 213 (+1021.05%)
Mutual labels:  scanner
Tfsec
Security scanner for your Terraform code
Stars: ✭ 3,622 (+18963.16%)
Mutual labels:  scanner
Aggressor
Ladon for Cobalt Strike, Large Network Penetration Scanner, vulnerability / exploit / detection / MS17010 / password/brute-force/psexec/atexec/sshexec/webshell/smbexec/netcat/osscan/netscan/struts2Poc/weblogicExp
Stars: ✭ 228 (+1100%)
Mutual labels:  scanner
Scannerl
The modular distributed fingerprinting engine
Stars: ✭ 208 (+994.74%)
Mutual labels:  scanner
yavdb
Yet Another Vulnerability Database
Stars: ✭ 14 (-26.32%)
Mutual labels:  pip
Phonia
Phonia Toolkit is one of the most advanced toolkits to scan phone numbers using only free resources. The goal is to first gather standard information such as country, area, carrier and line type on any international phone numbers with a very good accuracy.
Stars: ✭ 221 (+1063.16%)
Mutual labels:  scanner
Webdirscan
跨平台的web目录扫描工具
Stars: ✭ 234 (+1131.58%)
Mutual labels:  scanner
Gorecon
Gorecon is a All in one Reconnaissance Tool , a.k.a swiss knife for Reconnaissance , A tool that every pentester/bughunter might wanna consider into their arsenal
Stars: ✭ 208 (+994.74%)
Mutual labels:  scanner
Pycurity
Python Security Scripts
Stars: ✭ 218 (+1047.37%)
Mutual labels:  scanner
Open Paperless
Scan, index, and archive all of your paper documents (acquired by Mayan EDMS)
Stars: ✭ 2,538 (+13257.89%)
Mutual labels:  scanner
Berserker
A list of useful payloads for Web Application Security and Pentest/CTF
Stars: ✭ 212 (+1015.79%)
Mutual labels:  scanner
Rengine
reNgine is an automated reconnaissance framework for web applications with a focus on highly configurable streamlined recon process via Engines, recon data correlation and organization, continuous monitoring, backed by a database, and simple yet intuitive User Interface. reNgine makes it easy for penetration testers to gather reconnaissance with…
Stars: ✭ 3,439 (+18000%)
Mutual labels:  scanner
Bscan
an asynchronous target enumeration tool
Stars: ✭ 207 (+989.47%)
Mutual labels:  scanner
Sourceleakhacker
🐛 A multi threads web application source leak scanner
Stars: ✭ 226 (+1089.47%)
Mutual labels:  scanner
PyGLM
Fast OpenGL Mathematics (GLM) for Python
Stars: ✭ 167 (+778.95%)
Mutual labels:  pip
Retire.js
scanner detecting the use of JavaScript libraries with known vulnerabilities
Stars: ✭ 2,909 (+15210.53%)
Mutual labels:  scanner
Qrcode
qrcode scanner ( decoder ) by golang 二维码扫描识别
Stars: ✭ 233 (+1126.32%)
Mutual labels:  scanner

PIP Module Scanner

Build Status PyPI version Code Coverage

Scans your Python project for all installed third party pip libraries that are used and generates a requirements.txt based output.

Installation

Installing the scanner is easy, either clone the repository and run the script or install it via pip like so:

$ pip install pip-module-scanner

Usage

Using the scanner is incredibly simple. Open a terminal and navigate to your project folder, run the script and watch magic happen before your eyes. Example:

$ cd ~/projects/my-awesome-project/
$ pip-module-scanner
foo==1.0.0
bar==2.1.0
baz==0.0.1

Specifying a custom path

You can specify a custom path in which you want to run the script with the -p or --path argument. Example:

$ pip-module-scanner --path ~/projects/my-awesome-project/
foo==1.0.0 
bar==2.1.0
baz==0.0.1

Writing the output to a file

You can write the output of the script to a file by using the -o or --out argument. Example:

$ cd ~/projects/my-awesome-project/
$ pip-module-scanner -o requirements.txt
$ cat requirements.txt
foo==1.0.0
bar==2.1.0
baz==0.0.1

Integrating the code in your project

You can easily integrate the scanner code in your own project so you can get the output of the scanner yourself or modify the class to suit your own needs. To do this, you can use it like so:

from pip_module_scanner.scanner import Scanner

scanner = Scanner()
scanner.run()

# do whatever you want with the results here
# example:
for lib in scanner.libraries_found:
    print ("Found module %s at version %s" % (lib.key, lib.version))

Specifying a path would work like so, make sure to also import the ScannerException as it will check if the path you specified is actually a real path:

from pip_module_scanner.scanner import Scanner, ScannerException

try:
   scanner = Scanner(path="~/projects/my-awesome-project/")
   scanner.run()
   
   # do whatever you want with the results here
   # example:
   for lib in scanner.libraries_found:
       print ("Found module %s at version %s" % (lib.key, lib.version))
   
except ScannerException as e:
    print("Error: %s" % str(e))

For the one-liner junkies out there (like me) you can also get all libraries with this nifty little one-liner (I'm so considerate)

from pip_module_scanner.scanner import Scanner

libs = Scanner().run().libraries_found # Isn't it beautiful?

Class definitions

pip_module_scanner.scanner.Scanner([string path [, string output]])

Method Argument Type Required Description
__init__ path string no Directory to recursively scan through, defaults to current working directory.
output string no Output path to write the resutlts from output() to
run Runs the scan, output will be stored in libraries_found
output Writes the output to the console or a path specified in the constructor
Property Type Description
libraries_found list<pip._vendor.pkg_resources.EggInfoDistribution> List of all found pip libraries in your project, result from Scanner.run().

License

MIT License

Copyright (c) 2016 Luke Paris

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].