示例#1
0
    def __init__(self, trace_path):
        """
        <Purpose>
          Creates an StraceParser object containing all the information needed to
          extract data from a  trace file generated by the strace utility.
        
        <Arguments>
          trace_path:
            The path to the trace file containing the traced system calls. This file
            should contain the output of the strace utility.
        
        <Exceptions>
          IOError:
            If the pickle file containing the system call definitions is not found.
            (this file should come as part of this program)
        
        <Side Effects>
          None
        
        <Returns>
          None
        """

        Parser.__init__(self, trace_path)

        # regex compiled for _parse_line
        #
        # Example unfinished syscall.
        # accept(3,  <unfinished ...>
        #
        # Example complete syscall.
        # socket(PF_INET, SOCK_STREAM, IPPROTO_IP) = 5 <0.000066>
        #
        # Example resumed syscall.
        # <... accept resumed> {sa_family=AF_INET, sin_port=htons(44289), sin_addr=inet_addr("127.0.0.1")}, [16]) = 4 <0.002020>
        #
        # Example unfinished syscall due to end of program.
        # nanosleep({...},  <unfinished ... exit status 0>
        self._re_unfinished_syscall = re.compile(
            r"([^(]+)\((.*)\<unfinished .*")
        self._re_resumed_syscall = re.compile(
            r"\<\.\.\. ([^ ]+) resumed\> (.*)\)[ ]+=[ ]+([a-fx\d\-?]+)(.*)")
        self._re_complete_syscall = re.compile(
            r"([^(]+)\((.*)\)[ ]+=[ ]+([a-fx\d\-?]+)(.*)")
示例#2
0
    def __init__(self, trace_path):
        """
        <Purpose>
          Creates an StraceParser object containing all the information needed to
          extract data from a  trace file generated by the strace utility.
        
        <Arguments>
          trace_path:
            The path to the trace file containing the traced system calls. This file
            should contain the output of the strace utility.
        
        <Exceptions>
          IOError:
            If the pickle file containing the system call definitions is not found.
            (this file should come as part of this program)
        
        <Side Effects>
          None
        
        <Returns>
          None
        """

        Parser.__init__(self, trace_path)

        # regex compiled for _parse_line
        #
        # Example unfinished syscall.
        # accept(3,  <unfinished ...>
        #
        # Example complete syscall.
        # socket(PF_INET, SOCK_STREAM, IPPROTO_IP) = 5 <0.000066>
        #
        # Example resumed syscall.
        # <... accept resumed> {sa_family=AF_INET, sin_port=htons(44289), sin_addr=inet_addr("127.0.0.1")}, [16]) = 4 <0.002020>
        #
        # Example unfinished syscall due to end of program.
        # nanosleep({...},  <unfinished ... exit status 0>
        self._re_unfinished_syscall = re.compile(r"([^(]+)\((.*)\<unfinished .*")
        self._re_resumed_syscall = re.compile(r"\<\.\.\. ([^ ]+) resumed\> (.*)\)[ ]+=[ ]+([a-fx\d\-?]+)(.*)")
        self._re_complete_syscall = re.compile(r"([^(]+)\((.*)\)[ ]+=[ ]+([a-fx\d\-?]+)(.*)")
示例#3
0
 def __init__(self, html='', arrayList=[]):
     Parser.__init__(self, html, arrayList)
     self._json = None
     self._ceps = []
     self._address = []
示例#4
0
 def __init__(self, html = '', arrayList = []):
     Parser.__init__(self, html, arrayList)
     self._imgs = []
示例#5
0
 def __init__(self, html='', lista=[]):
     Parser.__init__(self, html, lista)
     self._emails = []
示例#6
0
 def __init__(self, html='', arrayList=[]):
     Parser.__init__(self, html, arrayList)
     self._list = []
     self._externals = []