forked from DataSploit/datasploit
-
Notifications
You must be signed in to change notification settings - Fork 0
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
2 changed files
with
24 additions
and
0 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,5 +1,8 @@ | ||
#!/usr/bin/env python | ||
|
||
import dep_check | ||
dep_check.check_dependency() | ||
|
||
import re | ||
import sys | ||
import shutil | ||
|
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,21 @@ | ||
import pip | ||
import sys | ||
|
||
def check_dependency(): | ||
list_deps = [] | ||
missing_deps = [] | ||
|
||
with open('requirements.txt') as f: | ||
list_deps = f.read().splitlines() | ||
|
||
pip_list = sorted([(i.key) for i in pip.get_installed_distributions()]) | ||
|
||
for req_dep in list_deps: | ||
if req_dep not in pip_list: | ||
missing_deps.append(req_dep) | ||
|
||
if missing_deps: | ||
print missing_deps | ||
print "You are missing a module for Datasploit. Please install them using: " | ||
print "pip install -r requirements.txt" | ||
sys.exit() |