吾爱破解 - LCG - LSG |安卓破解|病毒分析|www.52pojie.cn

 找回密码
 注册[Register]

QQ登录

只需一步,快速开始

查看: 557|回复: 5
收起左侧

[求助] 建模DLL插件求思路

[复制链接]
af33215 发表于 2023-3-21 22:43
最近工作需要,想找个REVIT插件提高工作效率,但是因为不是经常使用,所以想找个免费版的,论坛帖子里bimlgq大哥的帖子看了一遍,奈何找不到同版本的插件,高版本的顺着思路去做,碰到瓶颈了,求大神帮助!
我理解下面这段,就是检查用户信息,匹配就可以载入登录成功的窗口,但是不知道怎么改,试了几次都不行

public bool CheckUserInfo()
{
   
bool flag = false;
   
string userName = this.TbUserNameBox.Text.Trim();
   
string passWord = this.tbPasswordBox.Password.Trim();
   
try
   
{
        
if (this.TbUserNameBox.Text.Trim() == string.Empty)
        
{
            
MessageBox.Show(Class2.smethod_11(13278));
            
this.TbUserNameBox.Focus();
        
}
        
else if (this.tbPasswordBox.Password.Trim() == string.Empty)
        
{
            
MessageBox.Show(Class2.smethod_11(13306));
            
this.tbPasswordBox.Focus();
        
}
        
else
        
{
            
int num = this.LoginEvent(userName, passWord);
            
if (num == 0)
            
{
               
flag = this.AfterLoginSuccessfully();
            
}
            
else if (num == -5)
            
{
               
MessageBoxResult messageBoxResult = MessageBox.Show(Class2.smethod_11(13322), Class2.smethod_11(13368), MessageBoxButton.YesNo, MessageBoxImage.Asterisk);
               
if (messageBoxResult == MessageBoxResult.Yes && HymakeHome.HymakeHome_ShowKickUser(new WindowInteropHelper(this).Handle))
               
{
                    
flag = this.AfterLoginSuccessfully();
               
}
            
}
            
else
            
{
               
StringBuilder stringBuilder = new StringBuilder(256);
               
HymakeHome.HymakeHome_GetLastError(stringBuilder, 256);
               
if (stringBuilder.ToString() == string.Empty)
               
{
                    
MessageBox.Show(Class2.smethod_11(13376));
               
}
               
else
               
{
                    
MessageBox.Show(stringBuilder.ToString());
               
}
            
}
        
}
   
}
   
catch (Exception ex)
   
{
        
MessageBox.Show(Class2.smethod_11(13416) + ex.Message);
   
}
   
if (flag)
   
{
        
MemberLoginForm.lastUserName = userName;
        
MemberLoginForm.lastPassWord = passWord;
   
}
   
return flag;
}

发帖前要善用论坛搜索功能,那里可能会有你要找的答案或者已经有人发布过相同内容了,请勿重复发帖。

3yu3 发表于 2023-3-22 16:39
this.LoginEvent() 方法 return 0; AfterLoginSuccessfully()方法里边不知道做了什么,进去看看,要返回 true;

免费评分

参与人数 1热心值 +1 收起 理由
af33215 + 1 谢谢@Thanks!

查看全部评分

 楼主| af33215 发表于 2023-3-22 17:17
3yu3 发表于 2023-3-22 16:39
this.LoginEvent() 方法 return 0; AfterLoginSuccessfully()方法里边不知道做了什么,进去看看,要返回 tr ...

大哥,能抽空帮忙看看吗?两个DLL已脱壳,文件在网盘
链接:https://pan.baidu.com/s/1MMGbFITSGBna1nekcCwfSQ
提取码:dd4q
gksj 发表于 2023-3-23 15:05
flag = this.AfterLoginSuccessfully();方法中:
[C#] 纯文本查看 复制代码
List<ProductInfo> usableProductList = LoginController.Instance.UsableProductList;
			usableProductList.Clear();
			foreach (ProductInfo productInfo in LoginConfig.Instance.AllProductInfo)
			{
				int num = HymakeHome.HymakeHome_QueryFeature(int.Parse(productInfo.MemberTypeCode));
				productInfo.Res = num;
				productInfo.LoginState = this.GetLoginStateByRemainingDays(num);
				if (num > 0)
				{
					usableProductList.Add(productInfo);
				}
			}
			if (this.NeedSaveUserInfo)
			{
				this.SaveUserInfo();
			}



foreach历遍中主要内容是读取XML的序列化参数,包括一下几个内容:
[C#] 纯文本查看 复制代码
		public string AddinFileName { get; set; }

		public string AssemblyFileName { get; set; }

		public string DisplayName { get; set; }

		public string FileName { get; set; }

		public string FullClassName { get; set; }

		public string Guid { get; set; }

		public string InstallLocation { get; set; }

		public string MemberTypeCode { get; set; }

		public string ProductName { get; set; }

		public string ProductCode { get; set; }

		public ProductLoginState LoginState { get; set; }

		public int Res { get; set; }

		public string AppId { get; set; }



private int LoginEvent(string userName, string passWord)方法中:
[C#] 纯文本查看 复制代码
private int LoginEvent(string userName, string passWord)
		{
			if (this.cbUseProxy.IsChecked == true)
			{
				HymakeHome.HymakeHome_EnableHttpProxy(this.tbAddress.Text.Trim(), this.tbUserName.Text.Trim(), this.tbPwd.Password.Trim(), int.Parse(this.tbPort.Text.Trim()));
			}
			string text = LoginConfig.Instance.MemberLogServerInfo.HymakeLoginIP;
			if (string.IsNullOrEmpty(text))
			{
				text = LoginConfig.Instance.MemberLogServerInfo.HymakeHomeIP;
			}
			if (!string.IsNullOrEmpty(text))
			{
				string text2 = Class2.smethod_11(13186) + text + LoginConfig.Instance.MemberLogServerInfo.HomeName;
				HymakeHome.HymakeHome_SetURL(text2);
			}
			return HymakeHome.HymakeHome_Login(userName, passWord, LoginController.Instance.CurProductInfo.Guid, LoginController.Instance.CurProductVersion);
		}


HymakeHome.HymakeHome_EnableHttpProxy(this.tbAddress.Text.Trim(), this.tbUserName.Text.Trim(), this.tbPwd.Password.Trim(), int.Parse(this.tbPort.Text.Trim()));
HymakeHome.HymakeHome_SetURL(text2);


这两个参数跟进:
        [DllImport("HymakeHome64.dll", CallingConvention = CallingConvention.StdCall, CharSet = CharSet.Ansi
        
public static extern void HymakeHome_EnableHttpProxy(string server, string user, string password, int port);


        [DllImport("HymakeHome64.dll", CallingConvention = CallingConvention.StdCall, CharSet = CharSet.Ansi
        
public static extern int HymakeHome_Login(string userName, string password, string guid, string ver);


所以可知:
应用程序将用户名和密码参数传递给HymakeHome64.dll文件,由HymakeHome64.dll文件调用HTTP请求数据验证用户名和密码,并由这个文件下载用户名和密码对应的授权模块数据(XML序列化文件),然后保存文件,全部完成后返回C#程序对XML文件进行读取并获取授权数据.
所以你的重点应该放在HymakeHome64.dll这个文件里面,如果没猜错的话这个文件应该是C++编译的


 楼主| af33215 发表于 2023-3-23 16:06
gksj 发表于 2023-3-23 15:05
flag = this.AfterLoginSuccessfully();方法中:
[mw_shl_code=csharp,true]List usableProductList = Logi ...

谢谢,我再试试
 楼主| af33215 发表于 2023-3-25 20:13
gksj 发表于 2023-3-23 15:05
flag = this.AfterLoginSuccessfully();方法中:
[mw_shl_code=csharp,true]List usableProductList = Logi ...

请教老哥,证书: WinAuth(2.0),这个是什么混淆器啊?查不到都
您需要登录后才可以回帖 登录 | 注册[Register]

本版积分规则 警告:本版块禁止回复与主题无关非技术内容,违者重罚!

快速回复 收藏帖子 返回列表 搜索

RSS订阅|小黑屋|处罚记录|联系我们|吾爱破解 - LCG - LSG ( 京ICP备16042023号 | 京公网安备 11010502030087号 )

GMT+8, 2024-6-2 05:54

Powered by Discuz!

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表