昨天,今天,明天,每天的每天,你是否都多懂得一点点...

星期五, 六月 17, 2011

Fiddler removed session contains url

1. Add a tag for url contains something in OnBeforeResponse

if(oSession.uriContains("abc/abc.html")){

oSession.oResponse["tag"] = "mock";
}


2. Add a case in OnExecAction

case "removetag":
if (sParams.Length<2) { FiddlerObject.StatusText="Please specify url part to wipe."; return;}
FiddlerObject.UI.actSelectSessionsWithResponseHeaderValue("tag", sParams[1]);
FiddlerObject.UI.actRemoveSelectedSessions();
FiddlerObject.UI.lvSessions.SelectedItems.Clear();
FiddlerObject.StatusText="Removed url contains: " + sParams[1];
break;


Then, ALT+Q in fiddler 

type removetag mock, then all the url contains abc/abc.html will be removed.

For keep sessions contains url is very similar 

case "keeptag":
if (sParams.Length<2) { FiddlerObject.StatusText="Please specify url to retain during wipe."; return;}
FiddlerObject.UI.actSelectSessionsWithResponseHeaderValue("tag", sParams[1]);
FiddlerObject.UI.actRemoveUnselectedSessions();
FiddlerObject.UI.lvSessions.SelectedItems.Clear();
FiddlerObject.StatusText="Removed all but URL contains: " + sParams[1];
break;



For filter out something other than url, you can do in the same way.


Please make sure your new added http header doesn't break your stuff.


--
Feng

星期一, 六月 13, 2011

Release port 80 for win7

Release from IIS first

then

  1. Right click on My Computer
  2. Select Manage
  3. Double click Services and Applications
  4. Then double click Services
  5. Right click on "Sql server reporting services(MSSQLSERVER)"
  6. Select Stop ...and voila, port 80 was released


--
Feng

星期五, 六月 03, 2011

Install ADB driver for android device.

Open Adb Manager to install Google USB Driver package, revision 4 from Available packages->Third party Add-ons->Google Inc

After that, you will find the downloaded files here

c:\Dev\Android\android-sdk\extras\google\usb_driver

Your one will be different, you should be able to find it.

Then, Go to device manager (WIN+R, devmgmt.msc)

Then, plug in your device, and find the hardware ID of your device,

open the file Added your device hardware id

[Google.NTamd64]
; HTC Dream
%SingleAdbInterface%        = USB_Install, USB\VID_0BB4&PID_0C01
%CompositeAdbInterface%     = USB_Install, USB\VID_0BB4&PID_0C02&MI_01
%SingleBootLoaderInterface% = USB_Install, USB\VID_0BB4&PID_0FFF
; HTC Magic
%CompositeAdbInterface%     = USB_Install, USB\VID_0BB4&PID_0C03&MI_01
%CompositeAdbInterface%        = USB_Install, USB\VID_0BB4&PID_0C91&REV_0226&MI_01   <-- I added this line, Put to [Google.NTx86] if you are running 32bit os.

Then, update your driver from device manager, point the file location to c:\Dev\Android\android-sdk\extras\google\usb_driver

...Then, you know how to install a drvier.

--
Feng

其它博客地址

此博客的同步博客地址: http://fengnz.wordpress.com
这里进入我的MSN SPACE.