Skip to content

Commit

Permalink
Using subprocess32 in all locations to reduce the chances of being hi…
Browse files Browse the repository at this point in the history
…t by the thread unsafety issues of python's subprocess module
  • Loading branch information
andresriancho committed May 21, 2019
1 parent d73a127 commit 8e590b0
Show file tree
Hide file tree
Showing 12 changed files with 25 additions and 16 deletions.
7 changes: 4 additions & 3 deletions w3af/core/controllers/ci/nosetests_wrapper/utils/nosetests.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import os
import shlex
import signal
import logging
import select
import subprocess
import shlex
import logging

import subprocess32 as subprocess

from w3af.core.controllers.ci.nosetests_wrapper.utils.output import get_run_id
from w3af.core.controllers.ci.nosetests_wrapper.constants import (ARTIFACT_DIR,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
import shlex
import pickle
import logging
import subprocess
import subprocess32 as subprocess

from xml.etree import ElementTree

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
"""
import subprocess
import subprocess32 as subprocess

from w3af.core.controllers.misc.which import which

Expand Down
3 changes: 2 additions & 1 deletion w3af/core/controllers/dependency_check/platforms/fedora.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
"""
import subprocess
import platform

import subprocess32 as subprocess

from .base_platform import Platform
from ..requirements import CORE, GUI

Expand Down
7 changes: 4 additions & 3 deletions w3af/core/controllers/dependency_check/platforms/mac.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,14 @@
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
"""
import subprocess
import sys
import platform

import subprocess32 as subprocess

from w3af.core.controllers.dependency_check.pip_dependency import PIPDependency
from .base_platform import Platform
from ..requirements import CORE_PIP_PACKAGES, GUI_PIP_EXTRAS, CORE, GUI
from w3af.core.controllers.dependency_check.platforms.base_platform import Platform
from w3af.core.controllers.dependency_check.requirements import CORE_PIP_PACKAGES, GUI_PIP_EXTRAS, CORE, GUI


TWO_PYTHON_MSG = """\
Expand Down
3 changes: 2 additions & 1 deletion w3af/core/controllers/dependency_check/platforms/openbsd.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
"""
import subprocess
import platform

import subprocess32 as subprocess

from .base_platform import Platform
from ..requirements import CORE, GUI

Expand Down
3 changes: 2 additions & 1 deletion w3af/core/controllers/dependency_check/platforms/suse.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
"""
import subprocess
import platform

import subprocess32 as subprocess

from .base_platform import Platform
from ..requirements import CORE, GUI

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
"""
import subprocess
import platform

import subprocess32 as subprocess

from .base_platform import Platform
from ..requirements import CORE, GUI

Expand Down
3 changes: 2 additions & 1 deletion w3af/core/controllers/vdaemon/vdaemon.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,10 @@
import os
import tempfile
import random
import subprocess
import time

import subprocess32 as subprocess

import w3af.core.data.kb.config as cf
import w3af.core.controllers.output_manager as om

Expand Down
3 changes: 2 additions & 1 deletion w3af/plugins/audit/deserialization/java/generator.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import base64
import json
import difflib
import subprocess
import shlex

import subprocess32 as subprocess

# java -jar ysoserial-0.0.6-SNAPSHOT-all.jar -h
PAYLOADS = ['BeanShell1',
'C3P0',
Expand Down
2 changes: 1 addition & 1 deletion w3af/plugins/crawl/phishtank/update.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
import os
import csv
import sys
import subprocess

import subprocess32 as subprocess
import lxml.etree as etree


Expand Down
3 changes: 2 additions & 1 deletion w3af/plugins/output/xml_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
import time
import base64
import jinja2
import subprocess

import subprocess32 as subprocess

import lz4.frame

Expand Down

0 comments on commit 8e590b0

Please sign in to comment.