惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Cyberwarzone
Cyberwarzone
S
Secure Thoughts
L
LINUX DO - 热门话题
C
Cyber Attacks, Cyber Crime and Cyber Security
C
CERT Recently Published Vulnerability Notes
P
Privacy & Cybersecurity Law Blog
A
Arctic Wolf
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
C
Cybersecurity and Infrastructure Security Agency CISA
大猫的无限游戏
大猫的无限游戏
U
Unit 42
Recorded Future
Recorded Future
Hacker News: Ask HN
Hacker News: Ask HN
F
Full Disclosure
Spread Privacy
Spread Privacy
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Know Your Adversary
Know Your Adversary
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
云风的 BLOG
云风的 BLOG
Stack Overflow Blog
Stack Overflow Blog
D
Darknet – Hacking Tools, Hacker News & Cyber Security
F
Fortinet All Blogs
Martin Fowler
Martin Fowler
T
Threatpost
I
InfoQ
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Cloudbric
Cloudbric
L
LangChain Blog
N
Netflix TechBlog - Medium
The Register - Security
The Register - Security
S
Security @ Cisco Blogs
B
Blog
T
Threat Research - Cisco Blogs
T
The Blog of Author Tim Ferriss
The GitHub Blog
The GitHub Blog
D
DataBreaches.Net
Simon Willison's Weblog
Simon Willison's Weblog
P
Proofpoint News Feed
Microsoft Security Blog
Microsoft Security Blog
Blog — PlanetScale
Blog — PlanetScale
B
Blog RSS Feed
MongoDB | Blog
MongoDB | Blog
W
WeLiveSecurity
Forbes - Security
Forbes - Security
O
OpenAI News
C
Check Point Blog
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
The Last Watchdog
The Last Watchdog
H
Help Net Security
SecWiki News
SecWiki News

博客园 - 启明

Web纯前端“旭日图”实现元素周期表 能在多种前端框架下使用的表格控件 控件使用经验-MVP模式+控件封装 最好的Angular2表格控件 跨平台开发的两种方法及其对比 是时候 UWP 了 ! 你的系统也可以拥有“数据透视表”功能! Xamarin 免费了,你能做什么? 使用SQL向SQL Server2005中插入图片 在服务器端修改HTML控件的属性 - 启明 - 博客园 IsPostBack深入探讨 ViewState机制由浅入深3 ViewState机制由浅入深2 ViewState机制由浅入深1 MasterPage和内容页之间数据传递 web form事件不提交 NDoc简介 如何从开发人员走向架构师(转贴) 195本免费的在线编程类书籍 全是E文
如何调用.Net中的非Public方法 - 启明 - 博客园
启明 · 2008-04-08 · via 博客园 - 启明

今天在网上闲逛,无意见发现一个代码中使用反射调用.Net框架中的非Public方法,觉得这个思路很好.我怎么就没有想到呢?前两个还在想怎样调用Page类中的Internal方法DecryptString来解一个隐藏域"__PREVIOUSPAGE"的值,看判断自己的一个分析是否正确.马上动手代码如下,^_^问题解决了.

    protected void Button2_Click(object sender, EventArgs e)
    
{
        
//Server.Transfer("default2.aspx");
        Type t = typeof(System.Web.UI.Page);
        
object[] args = new object[] "Htr9cH0-sPEsru8HSXo70y6PnBg8nwjl0" };


        BindingFlags bindingFlags 
= BindingFlags.DeclaredOnly | BindingFlags.Static | BindingFlags.NonPublic | BindingFlags.InvokeMethod | BindingFlags.Instance;
        
string s=(string) t.InvokeMember("DecryptString", bindingFlags, nullthis, args);
        Response.Write(
"</br>"+s+"</br>");
    }