2012年10月2日星期二

C# HttpListener Access Denied when start on Windows 7

netsh http add urlacl url=http://+:80/MyUri user=DOMAIN\user

This is helpful, but for completeness, the URL specified in this line of code: httpListener.Prefixes.Add("http://*:4444/"); must match EXACTLY with the one in the netsh command. For example, I had httpListener.Prefixes.Add("http://127.0.0.1:80/"); and the same netsh command you have, and the HttpListenerException will still be thrown. I needed to change httpListener.Prefixes.Add(http://+:80/);

http://stackoverflow.com/questions/4019466/httplistener-access-denied-c-sharp-windows-7

2012年9月30日星期日

Apple TV 备忘录

apple tv3不越狱可以看国内电影,超级简单,修改一下网络的
dns: 180.153.225.136 210.129.145.150 58.215.188.082 (任选一个, 用210.129.145.150)

原理, 改变DNS使http://trailers.apple.com/appletv/index.xml, 重定向到 http://180.153.225.136:8000/index.xml上.

http://www.atvttvv.net/index.html
UID: 7437071030927024025

Additional DNSMasq Options
address=/trailers.apple.com/210.129.145.150


Live TV URLs

Some Live TV Link

TVB
TVB-J2 http://live1.ms.tvb.com/tvb/tv/j2/04/prog_index.m3u8 TVB http://upload.wikimedia.org/wikipedia/zh/thumb/c/c8/J2.svg/200px-J2.svg.png
TVB新闻 http://live1.ms.tvb.com/tvb/tv/inews/044.m3u8 TVB http://img.tvb.com/epg/img/phd_logos_v2/gif/inews.gif
TVB高清 http://live1.ms.tvb.com/tvb/tv/jade/044.m3u8 TVB http://upload.wikimedia.org/wikipedia/zh/thumb/e/e1/Hdjade.svg/200px-Hdjade.svg.png
上海卫视
东方卫视 http://114.112.34.103:82/live/5/45/887d4d23ee894ceb8f5f457fa24f3e97.m3u 上海卫视 http://www.smg.cn/upload/LPmxCDkjEL.jpg
第一财经 http://114.112.34.103:82/live/5/45/2f7e274ef02b4cb68339d6bd54693753.m3u 上海卫视 http://www.smg.cn/upload/77hUw942M0.jpg
东方财经 http://114.112.34.103:82/live/5/45/4268c1d55d8f459882af62e005ba056d.m3u 上海卫视 http://www.smg.cn/upload/UjVSdvOTTl.jpg
上海星尚 http://114.112.34.103:82/live/5/45/e938555554d042d681e8025c2f11dfb9.m3u 上海卫视 http://www.smg.cn/upload/FKybnNejgt.jpg
炫动卡通 http://114.112.34.103:82/live/5/45/622698d290214399bc83dad5cdee2168.m3u 上海卫视 http://www.smg.cn/upload/IwYxhNAsYJ.jpg
上视纪实 http://114.112.34.103:82/live/5/45/d953c071448342209819363fcca12f95.m3u 上海卫视 http://www.smg.cn/upload/8w5mHwfQWh.jpg
上海外语 http://114.112.34.103:82/live/5/45/25ba66637e7b438e942db99dd783a25a.m3u 上海卫视 http://www.smg.cn/upload/9cNkyAP1Ae.jpg
国内卫视
凤凰中文 http://210.51.19.156/live/iphone/zxt/index_350k.m3u8 国内卫视 http://upload.wikimedia.org/wikipedia/zh/thumb/3/34/Phoenix_Chinese.svg/90px-Phoenix_Chinese.svg.png
凤凰资讯 http://210.51.19.156/live/iphone/zwt/index_350k.m3u8 国内卫视 http://upload.wikimedia.org/wikipedia/zh/thumb/1/16/Phoenix_InfoNews.svg/185px-Phoenix_InfoNews.svg.png
北京卫视 http://114.112.34.103:82/live/5/45/d005a79e2c474848a7b316f6f87cecee.m3u 国内卫视 http://upload.wikimedia.org/wikipedia/zh/thumb/e/e4/BTV2011.jpg/200px-BTV2011.jpg
旅游卫视 http://114.112.34.103:82/live/5/45/0b5ee10d0b2548329e6c8febecc305a4.m3u 国内卫视 http://upload.wikimedia.org/wikipedia/zh/thumb/0/05/Travel_Channel_Logo.png/200px-Travel_Channel_Logo.png
湖南国际 http://3glivehntv.doplive.com.cn/video3/index_128k.m3u8 国内卫视 http://upload.wikimedia.org/wikipedia/zh/2/28/Hunan_TV_World_Logo.png
湖南卫视 http://114.112.34.103:82/live/5/45/e9301e073cf94732a380b765c8b9573d.m3u 国内卫视 http://upload.wikimedia.org/wikipedia/zh/5/5e/Hunantv_logo.png
湖北卫视 http://tsl5.hls.cutv.com/cutvlive/hw2bvyV/hls/live_sd.m3u8 国内卫视 http://upload.wikimedia.org/wikipedia/zh/thumb/6/65/HBTV_logo.png/170px-HBTV_logo.png
浙江卫视 http://114.112.34.103:82/live/5/45/ecc14bb80dc347769932f57a9c0b3870.m3u 国内卫视 http://upload.wikimedia.org/wikipedia/zh/3/36/Zhejiangweishilogo.jpg
江苏卫视 http://114.112.34.103:82/live/5/45/238baa4ac12f427896cecf12234159ef.m3u 国内卫视 http://tp1.sinaimg.cn/1575527140/180/5627471108/1
天津卫视 http://114.112.34.103:82/live/5/45/0e14818cc6cf4b5e8469ffc9a15113a1.m3u 国内卫视 http://upload.wikimedia.org/wikipedia/zh/e/ef/Tjtvlogo.jpg
辽宁卫视 http://114.112.34.103:82/live/5/45/99c55805bf3f4867a34bc5bf7c9c4bc0.m3u 国内卫视 http://upload.wikimedia.org/wikipedia/zh/d/d4/Liaoning_Television_Logo.png
四川卫视 http://114.112.34.103:82/live/5/45/76e11ccfb107429d8a0725fe8db4ecac.m3u 国内卫视 http://upload.wikimedia.org/wikipedia/zh/thumb/f/fc/SCTV_logo.png/200px-SCTV_logo.png
重庆卫视 http://114.112.34.103:82/live/5/45/28d22e95eeac4098b7a7ceb3fccd1438.m3u 国内卫视 http://upload.wikimedia.org/wikipedia/zh/1/1b/CQTV_logo.png
吉林卫视 http://114.112.34.103:82/live/5/45/1fe374ae8a084e9290579d2b6982b71a.m3u 国内卫视 http://upload.wikimedia.org/wikipedia/zh/thumb/6/63/JLTV_logo.png/170px-JLTV_logo.png
山东卫视 http://114.112.34.103:82/live/5/45/3791a3d4b5214540bfe99b0680fbc76f.m3u 国内卫视 http://upload.wikimedia.org/wikipedia/zh/thumb/7/79/SDTV_logo.png/200px-SDTV_logo.png
贵州卫视 http://114.112.34.103:82/live/5/45/5ecc73f9106341609b9f629d7940e355.m3u 国内卫视 http://upload.wikimedia.org/wikipedia/zh/1/12/Guizhou_tv.jpg
兵团卫视 http://114.112.34.103:82/live/5/45/6bda77778d8146689ace3363f6a4d207.m3u 国内卫视 http://upload.wikimedia.org/wikipedia/zh/thumb/e/e8/Bingtuan_Television_Logo_20090828.png/200px-Bingtuan_Television_Logo_20090828.png
广西卫视 http://114.112.34.103:82/live/5/45/3f8a56bdf383478b85fb380343587b43.m3u 国内卫视 http://upload.wikimedia.org/wikipedia/zh/thumb/f/fd/LOGOGuangxiTV.jpg/200px-LOGOGuangxiTV.jpg
河南卫视 http://114.112.34.103:82/live/5/45/44919ebf659e4a15b02b0e3328a03e6c.m3u 国内卫视 http://upload.wikimedia.org/wikipedia/zh/thumb/a/aa/HNTV_non-on_screen_logo.jpg/130px-HNTV_non-on_screen_logo.jpg
安徽卫视 http://114.112.34.103:82/live/5/45/e4c8a2dc060b4f729bb8ce73df08c0d9.m3u 国内卫视 http://upload.wikimedia.org/wikipedia/zh/thumb/2/27/Anhui_STV_Logo.jpg/200px-Anhui_STV_Logo.jpg
黑龙江卫视 http://114.112.34.103:82/live/5/45/f59d2cc92d944fd6baa0e7c6ffd0a0fc.m3u 国内卫视 http://upload.wikimedia.org/wikipedia/zh/thumb/4/49/HLJTV_logo.png/200px-HLJTV_logo.png
厦门卫视 http://114.112.34.103:82/live/5/45/661496c1495e4d1a936dc8e4ce149189.m3u 国内卫视 http://upload.wikimedia.org/wikipedia/zh/1/15/Xiamenstar.png
河北卫视 http://114.112.34.103:82/live/5/45/676ccb4d1a1544998ac93d34011c8534.m3u 国内卫视 http://upload.wikimedia.org/wikipedia/zh/thumb/a/a2/Hebtv_logo.png/170px-Hebtv_logo.png
江西卫视 http://114.112.34.103:82/live/5/45/d682c6b5487b471aa253d00b62f7db4b.m3u 国内卫视 http://upload.wikimedia.org/wikipedia/zh/thumb/0/02/Jiang_xi_wei_shi.jpg/200px-Jiang_xi_wei_shi.jpg
内蒙古卫视 http://114.112.34.103:82/live/5/45/328304f701f34f618ada1bec1eb20206.m3u 国内卫视 http://upload.wikimedia.org/wikipedia/zh/thumb/1/1d/NMTV_logo.png/200px-NMTV_logo.png
山西卫视 http://114.112.34.103:82/live/5/45/7ea95625827d434a81dd9f45bb1b1c9a.m3u 国内卫视 http://upload.wikimedia.org/wikipedia/zh/9/9b/ShanxiTV_Logo.png
云南卫视 http://114.112.34.103:82/live/5/45/dd0d29c07db24341b703bbb16a92b287.m3u 国内卫视 http://program.yntv.cn/images/ynws.jpg
青海卫视 http://114.112.34.103:82/live/5/45/0b94e35aa6be48b5b749f3fe160efc5e.m3u 国内卫视 http://upload.wikimedia.org/wikipedia/zh/8/80/Qhtvlogo.jpg
陕西卫视 http://114.112.34.103:82/live/5/45/c477690dc6c540eb948273bfd5f145d6.m3u 国内卫视 http://upload.wikimedia.org/wikipedia/zh/thumb/3/3c/ShaanxiTV.jpg/200px-ShaanxiTV.jpg
广东卫视
广东卫视 http://114.112.34.103:82/live/5/45/e0a1564fc9cd4fb4bb4efe9e804d8bcf.m3u 广东卫视 http://img.gdtv.cn/templates/default/images/c4_logo.png
广东珠江 http://114.112.34.103:82/live/5/45/035c7371dcd44f4da64979badb6ef559.m3u 广东卫视 http://img.gdtv.cn/templates/default/images/logo_c_5.png
广东公共 http://114.112.34.103:82/live/5/45/251d45879d00488fa0826582fa397216.m3u 广东卫视 http://img.gdtv.cn/templates/default/images/c17_logo.png
广东新闻 http://114.112.34.103:82/live/5/45/8a4131d106f34fc3a632f5e804a5e944.m3u 广东卫视 http://img.gdtv.cn/templates/default/images/c19_logo.png
广东嘉佳 http://114.112.34.103:82/live/5/45/cefe6b1030b747e1bca4d7218f3ccc44.m3u 广东卫视 http://img.gdtv.cn/templates/default/images/c20_logo.png
深圳卫视
深圳卫视 http://114.112.34.103:82/live/5/45/66c56c64eda94929bf45dd212eaaa14f.m3u 深圳卫视
深圳少儿 http://tsl1.hls.cutv.com/cutvlive/1SIQj6s/hls/live_sd.m3u8 深圳卫视
深圳公共 http://tsl1.hls.cutv.com/cutvlive/2q76Sw2/hls/live_sd.m3u8 深圳卫视
深圳都市 http://tsl1.hls.cutv.com/cutvlive/ZwxzUXr/hls/live_sd.m3u8 深圳卫视
深圳电视 http://tsl1.hls.cutv.com/cutvlive/4azbkoY/hls/live_sd.m3u8 深圳卫视
深圳体育 http://tsl1.hls.cutv.com/cutvlive/4i8RVtK/hls/live_sd.m3u8 深圳卫视
深圳财经 http://tsl1.hls.cutv.com/cutvlive/3vlcoxP/hls/live_sd.m3u8 深圳卫视

English
BBC新闻 http://akamedia2.lsops.net/live/smil:bbcnews_en.smil/playlist.m3u8 English http://mandmglobal.com/Libraries/IMZ_company_logos/BBC_WorldNews_Stack_Rev_RGB_1.sflb.ashx
CNN http://akamedia2.lsops.net/live/smil:cnn_en.smil/playlist.m3u8 English http://i.cdn.turner.com/cnn/.e/img/3.0/global/header/intl/hdr-globe-central.gif
美国Cartoon http://118.69.198.230:1935/live/Cartoon.stream/playlist.m3u8 English
美国NASA http://www.nasa.gov/multimedia/nasatv/NTV-Public-IPS.m3u8 English
国家地理 http://118.69.198.230:1935/live/NaGeo.stream/playlist.m3u8 English
美国AXN http://118.69.198.230:1935/live/AXN.stream/playlist.m3u8 English
CinemaxHD http://118.69.198.230:1935/live/Cinemax.stream/playlist.m3u8 English
STAR电影 http://118.69.198.230:1935/live/StarMovie.stream/playlist.m3u8 English
Discovery http://118.69.198.230:1935/live/Discovery.stream/playlist.m3u8 English

台湾频道
生命电视 http://mobile.ccdntech.com/live/_definst_/vod116_Live/201108211/playlist.m3u8 台湾频道
一新闻 http://newshls-i.akamaihd.net/hls/live/202100/newshls/wifistream.m3u8 台湾频道

境外频道
日本NHK http://plslive3.nhk.or.jp/nhkworld/app/live.m3u8 境外频道 http://www3.nhk.or.jp/nhkworld/english/common/images/header_logo.gif
KBS http://news24kbs-2.gscdn.com/news24_300/_definst_/news24_300.stream/playlist.m3u8 境外频道 http://english.kbs.co.kr/v2/images/common/top_kbs_logo.gif
伊朗PressTV http://akamedia2.lsops.net/live/smil:presstv_en.smil/playlist.m3u8 境外频道 http://www.presstv.ir/images/logo1.jpg
德国arte http://iphone.envivio.com/iphone/downloads/ch1/index.m3u8 境外频道 http://www.arte.tv/header-include/assets/img/arte-tv.png
半岛电视台  http://akamedia2.lsops.net/live/smil:aljazeer_en.smil/playlist.m3u8?token=0680320b260f258c3dc99 境外频道
今日俄罗斯 RussiaToday http://akamedia2.lsops.net/live/smil:rustoday_en.smil/playlist.m3u8 境外频道
马来西亚BernamaTV http://110.74.142.92/demo/iphone/bernama_mqs/bernama_mqs_variant.m3u8 境外频道
泰国电视3台 http://111.223.37.194:1935/liverepeater/ruenglao/playlist.m3u8 境外频道
越南VTV1  http://112.197.2.16:1935/live/vtv1.stream/playlist.m3u8 境外频道
维京电台 http://wow01.105.net/live/virgin1/playlist.m3u8  境外频道
法国24 http://stream7.france24.yacast.net/iphone/france24/fr/iPad.f24_fr.m3u8 境外频道
法国时尚 http://217.146.95.164:8081/ch27yiphone.m3u8 境外频道
德国arte http://iphone.envivio.com/iphone/downloads/ch1/index.m3u8 境外频道

测试

2012年2月26日星期日

WinDBG命令

在断点上打log, 然后继续执行.
bp 10843770 "dd @esp+4 L 4; g"

设置条件断点
bp 10843770 ".if (poi(@esp+4)=0x00110214) {} .else {gc}"
bp 10843770 ".if (poi(@esp+4)=0x10204) {.if (poi(@esp+8)=0x7) {} .else {gc} } .else {gc}"

从内核一直调试到用户
http://www.codeproject.com/Articles/7913/Debug-Tutorial-Part-6-Navigating-The-Kernel-Debugg

During kernel-mode debugging, you can set the process context by using the .process (Set Process Context) command. Use this command to select which processs page directory is used to interpret virtual addresses. After you set the process context, you can use this context in any command that takes addresses. You can even set breakpoints at this address. By including a /i option in the .process command to specify invasive debugging, you can also use the kernel debugger to set breakpoints in user space.

You can also set user-mode breakpoints from the kernel debugger by using a process-specific breakpoint on a kernel-space function. Set strategic breakpoints and wait for the appropriate context to come up.

With WinDBG, another thing you can do is use !bpid to have the kernel debugger break into the context of the process you e interested in and then you can set your breakpoints in the user-mode code (after running .reload to reload your symbols).

For example, setting a breakpoint in CreateFileW in a process:
0: kd> !process 0 0
**** NT ACTIVE PROCESS DUMP ****
....
PROCESS 861c9d90 SessionId: 1 Cid: 0f10 Peb: 7ffd3000 ParentCid: 0b48
DirBase: 0174e2a0 ObjectTable: 96f14eb0 HandleCount: 5.
Image: testapp.exe
1: kd> .process /r /p 861c9d90
Implicit process is now 861c9d90
..cache forcedecodeuser done
Loading User Symbols

2012年2月23日星期四

Ubuntu上build insight

insight-6.8-1
1. sudo apt-get install libx11-dev
2. sudo apt-get install libncurses5-dev
3. tar -xjvf insight-6.8-1.tar.bz2
4. cd insight-6.8-1/
5. ./configure (need do configure first)
5. ./configure –disable-werror
6. make
7. sudo make install

解决电话加锁

am startservice -a com.fd.settings -d content://device/unlock -n com.futuredial.FDSettingsService/.FDSettingsService

adb shell am start -n com.futuredial.fdbox721/.fdbox721Activity