Web Images Videos Maps News Shopping Gmail more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Extending TcpListener publisher error.
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Robgas  
View profile  
 More options Oct 26, 1:11 pm
From: Robgas <rob...@gmail.com>
Date: Mon, 26 Oct 2009 10:11:37 -0700 (PDT)
Local: Mon, Oct 26 2009 1:11 pm
Subject: Extending TcpListener publisher error.
Hi,

I'm testing Peach 2.3.1 on a Ubuntu 9.04 linux box and I'd like to
create an HTTP server publisher starting from TcpListener. I've
created the following basic file httpserver.py in the folder
Peach_2.3.1/Peach/Publishers:

from tcp import TcpListener

class HttpServerBase(TcpListener):
        def __init__(self, host, port, timeout = 0.25):
                TcpListener.__init__(self,host,port,timeout)

I've modified the Server-Example.xml pit file with:

<Publisher class="httpserver.HttpServerBase">
  <Param name="host" value="127.0.0.1"/>
  <Param name="port" value="9001"/>
</Publisher>

in order to use the new publisher but when I run peach, I get the
following error:

] Peach 2.3.1 DEV Runtime
] Copyright (c) Michael Eddington

Traceback (most recent call last):
  File "peach.py", line 475, in <module>
    engine.Run(args[0], None, verbose, watcher, restartFuzzerFile,
noCount, parallel, startNum)
  File "/home/x/Devel/Peach_2.3.1/Peach/Engine/engine.py", line 397,
in Run
    self.peach = Analyzer.DefaultParser().asParser(uri)
  File "/home/x/Devel/Peach_2.3.1/Peach/Analyzers/pit.py", line 57, in
asParser
    return parser.parse(uri)
  File "/home/x/Devel/Peach_2.3.1/Peach/Engine/parser.py", line 159,
in parse
    obj = self.HandleDocument(doc, uri)
  File "/home/x/Devel/Peach_2.3.1/Peach/Engine/parser.py", line 362,
in HandleDocument
    tests = self.HandleTest(child, None)
  File "/home/x/Devel/Peach_2.3.1/Peach/Engine/parser.py", line 2244,
in HandleTest
    test.publisher = self.HandlePublisher(child, test)
  File "/home/x/Devel/Peach_2.3.1/Peach/Engine/parser.py", line 2580,
in HandlePublisher
    pub = eval(code, globals(), locals())
  File "<string>", line 1, in <module>
NameError: name 'PeachXml_httpserver' is not defined

Where can I define the new publisher?


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Michael Eddington  
View profile  
 More options Oct 27, 12:12 am
From: Michael Eddington <medding...@gmail.com>
Date: Mon, 26 Oct 2009 21:12:02 -0700
Local: Tues, Oct 27 2009 12:12 am
Subject: Re: [Peach] Extending TcpListener publisher error.
Sounds like you haven't used <Import> to import your module with the new
code.  I recommend keeping the file in the same folder as your pit.
Then you can use <PythonPath> and <Import> to include the file for use.

mike

On 10/26/2009 10:11 AM, Robgas wrote:


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google