Fiddler Extension DLL in VB.NET can't work -
Fiddler Extension DLL in VB.NET can't work -
now, i'm studying programming vs2010 vb, , trying making extension dll fiddler.
first i've got sample code "australianimages/imageflipper", , rewrote in vb.net.
building dll file has completed (though hard) , copied "fiddler2\scripts" folder, fiddler seems not load it. using document folder, or changing .net framework version 2.0 doesn't work also.
does have clues? thanks.
public class myflip implements iautotamper private benabled boolean dim omenuitem menuitem = new menuitem("m&y flip") #region "iautotamper members" public sub onbeforereturningerror(byval osession session) implements iautotamper.onbeforereturningerror end sub public sub autotamperrequestafter(byval osession session) implements iautotamper.autotamperrequestafter end sub public sub autotamperrequestbefore(byval osession session) implements iautotamper.autotamperrequestbefore end sub public sub autotamperresponseafter(byval osession session) implements iautotamper.autotamperresponseafter end sub public sub autotamperresponsebefore(byval osession session) implements iautotamper.autotamperresponsebefore if (benabled = false) exit sub if osession.tostring() <> string.empty _ , osession.responsecode = 200 _ , osession.oresponse.tostring() <> string.empty _ , osession.oresponse.headers.tostring() & osession.oresponse.headers.existsandcontains("content-type", "image/gif").tostring() & _ osession.oresponse.headers.existsandcontains("content-type", "image/png").tostring() & _ osession.oresponse.headers.existsandcontains("content-type", "image/jp").tostring() <> string.empty seek osession.utildecoderesponse() dim ostream = new memorystream(osession.responsebodybytes) dim obmp = new bitmap(ostream) obmp.rotateflip(rotatefliptype.rotate180flipnone) dim onewstream = new memorystream() obmp.save(onewstream, system.drawing.imaging.imageformat.png) osession.responsebodybytes = onewstream.getbuffer() osession.oresponse.headers("content-length") = osession.responsebodybytes.length.tostring() osession.oresponse.headers("content-type") = "image/png" osession.oresponse.headers("cache-control") = "no-cache" ostream.dispose() onewstream.dispose() grab ex exception system.diagnostics.trace.writeline(ex.tostring(), "imageflipper failed") end seek end if end sub #end part #region "ifiddlerextension_members" public sub onbeforeunload() implements ifiddlerextension.onbeforeunload benabled = false omenuitem.dispose() end sub public sub onload() implements ifiddlerextension.onload fiddlerapplication.log.logstring("myflip onload start.") 'omenuitem = new menuitem("m&y flip") addhandler omenuitem.click, addressof omenuitem_click fiddlerapplication.ui.mnutools.menuitems.add(omenuitem) msgbox("vbok!!") fiddlerapplication.log.logstring("bb onload end.") end sub sub omenuitem_click(byval sender system.object, _ byval e system.eventargs) omenuitem.checked = not (omenuitem.checked) benabled = omenuitem.checked end sub #end part end class
i had add together sentence...(´・ω・`)
<assembly: fiddler.requiredversion("2.4.6.0")>
and,,,,, in fact, code wrote has mistranslation @ osession status judgement.
somebody please don't re-create & utilize code stands.
thanks lot.
vb.net dll
Comments
Post a Comment