Skip to content

Commit

Permalink
Adhere more to familar language idioms.
Browse files Browse the repository at this point in the history
  • Loading branch information
ahri committed Feb 23, 2017
1 parent 9b940db commit e442c84
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 11 deletions.
2 changes: 0 additions & 2 deletions python/HelloWorld.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ class BurpExtender(IBurpExtender):
#

def registerExtenderCallbacks(self, callbacks):

# set our extension name
callbacks.setExtensionName("Hello world extension")

Expand All @@ -28,4 +27,3 @@ def registerExtenderCallbacks(self, callbacks):

# throw an exception that will appear in our error stream
raise RuntimeException("Hello exception")

15 changes: 6 additions & 9 deletions ruby/HelloWorld.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,23 @@ class BurpExtender
include IBurpExtender

def registerExtenderCallbacks(callbacks)

# set our extension name
callbacks.setExtensionName("Hello world extension")
callbacks.setExtensionName "Hello world extension"

# obtain our output and error streams
stdout = java.io.PrintWriter.new(callbacks.getStdout(), true)
stderr = java.io.PrintWriter.new(callbacks.getStderr(), true)
stdout = java.io.PrintWriter.new callbacks.getStdout, true
stderr = java.io.PrintWriter.new callbacks.getStderr, true

# write a message to our output stream
stdout.println("Hello output")
stdout.println "Hello output"

# write a message to our error stream
stderr.println("Hello errors")
stderr.println "Hello errors"

# write a message to the Burp alerts tab
callbacks.issueAlert("Hello alerts")
callbacks.issueAlert "Hello alerts"

# throw an exception that will appear in our error stream
raise "Hello exception"

end

end

0 comments on commit e442c84

Please sign in to comment.