net反射

1.1 查找dll文件

Load需要把dll放到程序当前路径加载,也可以读取字符串形式。LoadFrom需要写全路径,如果test1.dll引用了test2.dll,同时也会加载test2.dll进来。LoadFile不会加载test2.dll。

Assembly assembly1 = Assembly.Load("DllTest");
Assembly assembly2 = Assembly.LoadFile(@"C:\Users\Administrator\Desktop\c#\learn\reflection2\DllTest\bin\Release\DllTest.dll");
Assembly assembly3 = Assembly.LoadFrom(@"C:\Users\Administrator\Desktop\c#\learn\reflection2\DllTest\bin\Release\DllTest.dll");
Assembly assembly4 = Assembly.LoadFrom("DllTest.dll");

1.2 调用构造函数

首先写一个DllTest.dll

前面我们已经加载了dll文件,但是可能会存在多个类,所以我们要获取指定类型。

然后动态的实例化对象

调用参数构造方法

如何调用私有的构造函数

在CreateInstance方法第二个参数设置为true即可

1.3 查找所有类,构造方法和参数

很多时候我们得到一个dll文件但是不知道里面存在哪些类 我们在DllTest.dll再创建一个类。

当我们获取到类后,再获取所有的构造方法

如果我们要获取构造方法里面的参数

但是这里可以看到private没有显示出来,我们加参数即可。

static void Main(string[] args)
{
    Assembly assembly = Assembly.LoadFrom("DllTest.dll");
    foreach(var all_type in assembly.GetTypes())
    {
        Console.WriteLine("类:"+all_type.Name);
    }
    Type type = assembly.GetType("DllTest.Class1");
    foreach(var all_cons in type.GetConstructors(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic))
    {
        Console.WriteLine("构造方法:"+all_cons);
        foreach(var param in all_cons.GetParameters())
        {
            Console.WriteLine("所有参数:"+param.Name);
        }
    }
}

1.4 调用方法

在DllTest添加一个普通方法和一个私有方法

先获取所有方法

var methods = type.GetMethods(BindingFlags.Instance|BindingFlags.Public|BindingFlags.NonPublic);
foreach(var method in methods)
{
    Console.WriteLine(method);
    Console.WriteLine(method.Attributes);
}

可以看到TetMethod方法为public,TestMethod2方法为private。

调用TestMethod方法,就算我们知道这个方法里面没有参数但是还是要new一个空数组,如果有参数写进去即可。

调用TestMethod2方法。

1.5 调用泛型方法

先在DllTest添加两个泛型方法

public void Test<T>()
{
    Console.WriteLine("Test");
}

public void Test2<T>(string name)
{
    Console.WriteLine($"name is:{name}");
}
var method = type.GetMethod("Test"); //获取方法
var genericMethod = method.MakeGenericMethod(new Type[] {typeof(int)}); //指定泛型参数类型(前面的T)
genericMethod.Invoke(obj, new object[] { });

有参数

1.6 操作属性

DllTest创建一个Pro类

先获取所有属性

设置属性和获取属性

1.7 利用

DllTest添加TestCalc类

前面我们说了Assembly.Load()可以从string类型加载程序集。新建testcalc项目

然后使用File.ReadAllBytes讲testcalc.exe转换为string类型

结果

TVqQAAMAAAAEAAAA//8AALgAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAA4fug4AtAnNIbgBTM0hVGhpcyBwcm9ncmFtIGNhbm5vdCBiZSBydW4gaW4gRE9TIG1vZGUuDQ0KJAAAAAAAAABQRQAATAEDAI+UC8QAAAAAAAAAAOAAIgALATAAAAgAAAAIAAAAAAAAsicAAAAgAAAAQAAAAABAAAAgAAAAAgAABAAAAAAAAAAEAAAAAAAAAACAAAAAAgAAAAAAAAMAQIUAABAAABAAAAAAEAAAEAAAAAAAABAAAAAAAAAAAAAAAF4nAABPAAAAAEAAALwFAAAAAAAAAAAAAAAAAAAAAAAAAGAAAAwAAACwJgAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAACAAAAAAAAAAAAAAACCAAAEgAAAAAAAAAAAAAAC50ZXh0AAAAuAcAAAAgAAAACAAAAAIAAAAAAAAAAAAAAAAAACAAAGAucnNyYwAAALwFAAAAQAAAAAYAAAAKAAAAAAAAAAAAAAAAAABAAABALnJlbG9jAAAMAAAAAGAAAAACAAAAEAAAAAAAAAAAAAAAAAAAQAAAQgAAAAAAAAAAAAAAAAAAAACSJwAAAAAAAEgAAAACAAUAjCAAACQGAAABAAAAAQAABgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA

然后再使用Assembly.Load加载string反射调用Strat类的run方法

using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;

namespace Loader
{
    internal class Program
    {
        static void Main(string[] args)
        {
            string base64str = "TVqQAAMAAAAEAAAA//8AALgAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAA4fug4AtAnNIbgBTM0hVGhpcyBwcm9ncmFtIGNhbm5vdCBiZSBydW4gaW4gRE9TIG1vZGUuDQ0KJAAAAAAAAABQRQAATAEDAI+UC8QAAAAAAAAAAOAAIgALATAAAAgAAAAIAAAAAAAAsicAAAAgAAAAQAAAAABAAAAgAAAAAgAABAAAAAAAAAAEAAAAAAAAAACAAAAAAgAAAAAAAAMAQIUAABAAABAAAAAAEAAAEAAAAAAAABAAAAAAAAAAAAAAAF4nAABPAAAAAEAAALwFAAAAAAAAAAAAAAAAAAAAAAAAAGAAAAwAAACwJgAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAACAAAAAAAAAAAAAAACCAAAEgAAAAAAAAAAAAAAC50ZXh0AAAAuAcAAAAgAAAACAAAAAIAAAAAAAAAAAAAAAAAACAAAGAucnNyYwAAALwFAAAAQAAAAAYAAAAKAAAAAAAAAAAAAAAAAABAAABALnJlbG9jAAAMAAAAAGAAAAACAAAAEAAAAAAAAAAAAAAAAAAAQAAAQgAAAAAAAAAAAAAAAAAAAACSJwAAAAAAAEgAAAACAAUAjCAAACQGAAABAAAAAQAABgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC5yAQAAcCgOAAAKKh4CKA8AAAoqcnMQAAAKJW8RAAAKcgsAAHBvEgA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AAAAAAAAAAAAAAAA";
            byte[] buffer = Convert.FromBase64String(base64str);
            Assembly assembly = Assembly.Load(buffer);
            Type type = assembly.GetType("testcalc.Strat");
            MethodInfo method = type.GetMethod("run");
            Object obj = assembly.CreateInstance(method.Name);
            method.Invoke(obj, new object[] { });
        }
    }
}

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:/a/401513.html

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

互联网加竞赛 大数据疫情分析及可视化系统

文章目录 0 前言2 开发简介3 数据集4 实现技术4.1 系统架构4.2 开发环境4.3 疫情地图4.3.1 填充图(Choropleth maps)4.3.2 气泡图 4.4 全国疫情实时追踪4.6 其他页面 5 关键代码最后 0 前言 &#x1f525; 优质竞赛项目系列&#xff0c;今天要分享的是 &#x1f6a9; 大数据疫…

Open AI — Sora 如何发挥其魔力 — 近距离观察该技术

OpenAI 的大模型 Sora 可以制作一整分钟的高质量视频。他们的工作成果表明,使视频生成模型更大是为现实世界创建多功能模拟器的好方法。Sora 是一种灵活的可视化数据模型。它可以创建不同长度、形状和大小的视频和图片,甚至可以创建长达一分钟的高清视频。我阅读了 OpenAI 的…

[C#]winform使用引导APSF和梯度自适应卷积增强夜间雾图像的可见性算法实现夜间雾霾图像的可见度增强

【算法介绍】 提升夜间雾霾图像可见度的技术研究&#xff1a;引导APSF与梯度自适应卷积的应用 随着城市化的快速发展&#xff0c;雾霾现象日益严重&#xff0c;尤其是在夜间&#xff0c;雾霾对图像的可见度造成了极大的影响。因此&#xff0c;提升夜间雾霾图像的可见度成为了…

ElasticSearch聚合操作

目录 ElasticSearch聚合操作 基本语法 聚合的分类 后续示例数据 Metric Aggregation Bucket Aggregation ES聚合分析不精准原因分析 提高聚合精确度 ElasticSearch聚合操作 Elasticsearch除搜索以外&#xff0c;提供了针对ES 数据进行统计分析的功能。聚合(aggregation…

一文彻底搞懂JVM垃圾回收算法

文章目录 1. 标记-清除算法&#xff08;Mark and Sweep&#xff09;2. 复制算法&#xff08;Copying&#xff09;3. 标记-整理算法&#xff08;Mark and Compact&#xff09;4. 分代算法&#xff08;Generational&#xff09;4.1 执行流程 1. 标记-清除算法&#xff08;Mark an…

《雾锁王国》超简单0成本自建个人专属16人联机服务器教程

阿里云雾锁王国服务器搭建教程是基于计算巢服务&#xff0c;3分钟即可成功创建Enshrouded游戏服务器&#xff0c;阿里云8核32G雾锁王国专用游戏服务器90元1个月、271元3个月&#xff0c;阿里云服务器网aliyunfuwuqi.com亲自整理雾锁王国服务器详细搭建教程&#xff1a; 一、前…

「实战应用」如何使用图表控件LightningChart创建数据采集系统?(一)

LightningChart.NET完全由GPU加速&#xff0c;并且性能经过优化&#xff0c;可用于实时显示海量数据-超过10亿个数据点。 LightningChart包括广泛的2D&#xff0c;高级3D&#xff0c;Polar&#xff0c;Smith&#xff0c;3D饼/甜甜圈&#xff0c;地理地图和GIS图表以及适用于科学…

了解电力测试中负载箱的重要性?

电力测试是电力系统运行和维护的重要环节&#xff0c;其中负载箱作为一种重要的测试设备&#xff0c;其重要性不言而喻。负载箱主要用于模拟实际的电力负载&#xff0c;对电力设备进行性能测试和故障诊断&#xff0c;以确保电力系统的稳定运行。 负载箱可以模拟实际的电力负载。…

电商网站的大规模网页抓取 (终极指南)

电商网站的大规模网页抓取|电商数据采集API接口 与小型项目相比&#xff0c;大规模的网页抓取带来了一系列截然不同的挑战&#xff0c;例如基础结构搭建、管理资源成本、绕过爬虫检测措施等。 本文将指导您完成大规模数据收集&#xff0c;并以电商领域为重点。 Oxylabs 网页…

安卓系统和iOS系统的手机备忘录同步数据方法

在这个智能手机时代&#xff0c;安卓与iOS系统犹如两位王者&#xff0c;各自拥有庞大的用户群体。有人钟情于安卓的开放与多样&#xff0c;有人偏爱iOS的流畅与稳定。甚至&#xff0c;有些人为了满足不同需求&#xff0c;同时使用着两个系统的手机。我就是其中的一员。 工作中…

PDF控件Spire.PDF for .NET【安全】演示:获取 PDF 签名中的所有证书

Spire.PDF for .NET 是一款独立 PDF 控件&#xff0c;用于 .NET 程序中创建、编辑和操作 PDF 文档。使用 Spire.PDF 类库&#xff0c;开发人员可以新建一个 PDF 文档或者对现有的 PDF 文档进行处理&#xff0c;且无需安装 Adobe Acrobat。 E-iceblue 功能类库Spire 系列文档处…

golang实现延迟队列(delay queue)

golang实现延迟队列 1 延迟队列&#xff1a;邮件提醒、订单自动取消 延迟队列&#xff1a;处理需要在未来某个特定时间执行的任务。这些任务被添加到队列中&#xff0c;并且指定了一个执行时间&#xff0c;只有达到指定的时间点时才能从队列中取出并执行。 应用场景&#xff1…

Linux的Ubuntu的APT使用

Linux的Ubuntu的APT使用 apt 介绍 apt 是 Advanced Packaging Tool 的简称&#xff0c;是一款安装包管理工具。在 Ubuntu 下&#xff0c;我们可以使用 apt 命令进行软件包的安装、删除、清理等&#xff0c;类似于 Windows 中的软件管理工具。 Ubuntu 软件操作的相关命令 su…

042-WEB攻防-PHP应用MYSQL架构SQL注入跨库查询文件读写权限操作

042-WEB攻防-PHP应用&MYSQL架构&SQL注入&跨库查询&文件读写&权限操作 #知识点&#xff1a; 1、PHP-MYSQL-SQL注入-常规查询 2、PHP-MYSQL-SQL注入-跨库查询 3、PHP-MYSQL-SQL注入-文件读写 演示案例&#xff1a; ➢PHP-MYSQL-Web组成架构 ➢PHP-MYSQL-SQL…

python自动化接口测试

前几天&#xff0c;同组姐妹说想要对接口那些异常值进行测试&#xff0c;能否有自动化测试的方法。仔细想了一下&#xff0c;工具还挺多&#xff0c;大概分析了一下&#xff1a; 1、soapui:可以对接口参数进行异常值参数化&#xff0c;可以加断言&#xff0c;一般我们会加http…

undo日志详解

一、undo日志介绍 上一节详细的说了redo日志&#xff0c;redo日志的功能就是把增删改操作都记录着&#xff0c;如果断电导致内存中的脏页丢失&#xff0c;可以根据磁盘中的redo日志文件进行恢复。redo日志被设计出来是为了保证数据库的持久性&#xff0c;undo日志设计出来是为…

从故宫修建看「软件物料清单」的重要性 @安全历史01

故宫&#xff0c;这座中国传统文化的重要代表和象征性建筑已屹立近600年&#xff0c;是世界上现存规模最大、保存最为完整的木质结构古建筑之一。 故宫之所以能至今保存完好&#xff0c;除持续保护和修缮外&#xff0c;其使用的木材和砖石等材料也经过了精挑细选&#xff0c;保…

一周学会Django5 Python Web开发-Django5路由重定向

锋哥原创的Python Web开发 Django5视频教程&#xff1a; 2024版 Django5 Python web开发 视频教程(无废话版) 玩命更新中~_哔哩哔哩_bilibili2024版 Django5 Python web开发 视频教程(无废话版) 玩命更新中~共计25条视频&#xff0c;包括&#xff1a;2024版 Django5 Python we…

图片速览 PrintListener: 通过手指摩擦声发现指纹认证漏洞

原有一些方法主要是用字典猜测的方式来解锁的&#xff0c;文章的方法利用了用户滑手机屏幕产生的声音来辅助指纹的生成&#xff0c;且本文所提方案的准确性要更高(文章采样了各种环境、各种情况的数据&#xff0c;详见原文)。 PrintListener的攻击场景广泛且隐蔽。它只需要记录…

小米标准模组+MCU 快速上手开发(一)——之固件下载

小米标准模组+MCU 开发笔记之固件下载 背景技术名词简介● 小米IoT开发者平台● 小米IoT 模组● ESP系列简介问题描述 + 解决方式问题1:固件下载是否有示例,如何下载到硬件板卡中?问题2:固件下载的官方程序是什么?在哪里?该如何使用?问题3:固件下载时,Flash和Ram 有什…