forked from codingo/Reconnoitre
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request codingo#112 from tonydelanuez/replace-text-with-un…
…iversal-newlines Fix python 3.6 compat issue with subprocess.Popen keyword arguments && creating helper function 'run_scan' to create a subprocess, moving subprocess logic to helper.
- Loading branch information
Showing
6 changed files
with
21 additions
and
19 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
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
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,8 @@ | ||
import subprocess | ||
|
||
|
||
def run_scan(scan, stderr=None): | ||
"""Helper method to perform a scan using a subprocess and return results. | ||
We use the same configuration options for each call to check_output, this | ||
can be bunched into one helper function to keep config constant.""" | ||
return subprocess.check_output(scan, shell=True, stderr=stderr, universal_newlines=True) |