-
Notifications
You must be signed in to change notification settings - Fork 501
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
breachedcompilation fix & ticket #16 suggestion
- Loading branch information
ktx
committed
May 10, 2019
1 parent
bcbf69b
commit 5c22001
Showing
4 changed files
with
54 additions
and
35 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
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,22 @@ | ||
from utils.colors import colors as c | ||
import os | ||
|
||
def breachcomp_check(targets, breachcomp_path): | ||
# https://gist.github.com/scottlinux/9a3b11257ac575e4f71de811322ce6b3 | ||
try: | ||
import subprocess | ||
|
||
query_bin = os.path.join(breachcomp_path, "query.sh") | ||
subprocess.call(["chmod", "+x", query_bin]) | ||
for t in targets: | ||
procfd = subprocess.run([query_bin, t.email], stdout=subprocess.PIPE) | ||
output = procfd.stdout.decode("utf-8") | ||
if len(output) != 0: | ||
split_output = output.split("\n") | ||
for line in split_output: | ||
if ":" in line: | ||
t.data.append(("BREACHEDCOMP", line.split(":")[1])) | ||
return targets | ||
except Exception as ex: | ||
c.bad_news(c, "Breach compilation") | ||
print(ex) |
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
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