当前位置: 首页 > news >正文

成华区网站建设政协网站建设要求

成华区网站建设,政协网站建设要求,鄞州做网站,智慧政务网站怎么做本文转自王子博客#xff1a;http://www.cnblogs.com/killbit/p/4355950.html 首先要感谢哥们对我的指点#xff0c;多谢。 当我们遇到类似情况下#xff0c;如何获取保存在MSSQL工具里的凭证呢#xff1f; //如果对方连接地址后面加了IP\sqlexpress 连接的时候你也记得加上… 本文转自王子博客http://www.cnblogs.com/killbit/p/4355950.html 首先要感谢哥们对我的指点多谢。 当我们遇到类似情况下如何获取保存在MSSQL工具里的凭证呢  //如果对方连接地址后面加了IP\sqlexpress 连接的时候你也记得加上不然即使密码正确也会说登录失败。   通过和哥们讨论研究分析以及查找资料知道了密码存放的地方 C:\Users\Administrator\AppData\Roaming\Microsoft\Microsoft SQL Server\90\Tools\ShellSEM\mru.dat (当前MSSQL 连接工具为2005) 我们通过C32来查看MRU.DAT会发现一串BASE64编码   这个就是我们的保存的凭证但是并不是直接还原BASE64就可以了需要DECODE后还需要DPAPI来进行解密   代码如下   // Encode.cpp : 定义控制台应用程序的入口点。 // #include stdafx.h #include Windows.h #include stdio.h #include iostream #include cstdlib #include stdio.h #pragma comment(lib, crypt32.lib) using namespace std;int Base64Decoder(char *input, unsigned char *output) {char base64string[]ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789/;BYTE dataBuffer[4];BYTE outputBuffer[3];BYTE finalBuffer[1000];int count0;int padCount0;int length;length strlen(input);//Validate the data for BASE64if( length % 4 ){printf(%s - Invalid base64 data is supplied %s (%d) , input, length);return 0;}//count the no of paddingif (input[length-1] )padCount;if (input[length-2] )padCount;// Process 4 chars in each loop to produce 3 charsfor (int i0; i length; i 4){// Populate data buffer with position of Base64 characters for// next 4 bytes from encoded datafor (int j0; j 4 (i j length); j) dataBuffer[j] ( (int)strchr(base64string, input[ij]) - (int)base64string );//Decode data buffer back into bytesoutputBuffer[0] (dataBuffer[0] 2) ((dataBuffer[1] 0x30) 4);outputBuffer[1] ((dataBuffer[1] 0x0f) 4) ((dataBuffer[2] 0x3c) 2); outputBuffer[2] ((dataBuffer[2] 0x03) 6) dataBuffer[3];// Add all non-padded bytes in output buffer to decoded datafor (int k 0; k 3; k)finalBuffer[count]outputBuffer[k];}count count-padCount;//copy the decoded data into input buffermemcpy(output, finalBuffer, count);output[count]\0;printf(Base64 decoded string is [%s] (%d) , output, count);// std::cout 11111 std::endl;std::cout finalBuffer std::endl;return count; }int main(int argc,char** argv) {unsigned char output[1000] {0};//Base64Decoder(ZnVja3lvdQ,output);int iBase64Decoder(AQAAANCMnd8BFdERjHoAwE/ClsBAAAAfKVVCtCkz0SDfRfzGeyufQAAAAAQAAAARABlAGYAYQB1AGwAdAAAABBmAAAAAQAAIAAAAIDhFHSsCl9qoM1CbxlSVXqLXSDUuBs5sCx2hzytnkuAAAAAA6AAAAAAgAAIAAAAAdEQoQTYAeQGJYMsDfuOJdLHMGK4VtTu6SOzbla/TZFEAAAAACxb3rEQZjUHOpYTlkfwnhAAAAASc5uN4LAZ9A2IZadYsBRG87JhQjbWaQLY18FKf0fbyRlxIEQmxJm1FLBCep32aWY4qkPy1aELhj6IjnbCq/A,output);if (i 0){printf(Encode error\r\n);return -1;}DATA_BLOB DataPassword;DATA_BLOB DataOutput;DataPassword.cbData i;DataPassword.pbData output;if(CryptUnprotectData(DataPassword,0,0,0,0,CRYPTPROTECT_UI_FORBIDDEN,DataOutput)) //Crypt Mssql password{wcout Mssql credence Password Length: DataOutput.cbData \r\n; wcout Mssql credence Password: (wchar_t*)DataOutput.pbData; }else{wcout Error;     return -1;}return 0;}   还有一份C#是我哥们写的   using System; using System.Collections.Generic; //using System.Linq; using System.Text;namespace Mssql {class Program{static void Main(string[] args){Console.WriteLine(Encoding.Unicode.GetString(System.Security.Cryptography.ProtectedData.Unprotect(Convert.FromBase64String(AQAAANCMnd8BFdERjHoAwE/ClsBAAAAfKVVCtCkz0SDfRfzGeyufQAAAAAQAAAARABlAGYAYQB1AGwAdAAAABBmAAAAAQAAIAAAAIDhFHSsCl9qoM1CbxlSVXqLXSDUuBs5sCx2hzytnkuAAAAAA6AAAAAAgAAIAAAAAdEQoQTYAeQGJYMsDfuOJdLHMGK4VtTu6SOzbla/TZFEAAAAACxb3rEQZjUHOpYTlkfwnhAAAAASc5uN4LAZ9A2IZadYsBRG87JhQjbWaQLY18FKf0fbyRlxIEQmxJm1FLBCep32aWY4qkPy1aELhj6IjnbCq/A), null, System.Security.Cryptography.DataProtectionScope.LocalMachine)));}} }     还原后 VC     C#  转载于:https://www.cnblogs.com/dongchi/p/4491421.html
http://www.huolong8.cn/news/411242/

相关文章:

  • 自己做网站,为什么出现403交换友链要注意什么
  • 我想帮别人做网站有这样的平台吗100种晚上禁用的app大全
  • 做公司网站备案可以个人现在外贸推广做哪个平台
  • 石家庄建站优化公司wordpress 修改时间
  • 作品集公司网站古风网站建设模板下载
  • 建设银行官方网站链接怎样利用云盘做电影网站
  • 凡科网站代理登录入口做国外零售的话是在什么网站开店
  • 安监网站安全建设信息ps教程app
  • 福州做网站互联网公司wordpress-5.2.1
  • 台州网站排名公司自己在家可以做网站吗
  • 什么网站专门做软件的网站建设包含seo吗
  • 新网站怎么做谷歌推广呢免费asp网站空间
  • 做网站赚钱吗 怎么赚网站开发和商城的科目
  • iis如何发布asp.net网站百度链接提交
  • 网站建设 标准网站建设销售ppt模板
  • 深圳集团网站开发网站开发公司电话销售平台建设方案
  • 中明建投建设集团 网站网站后台权限分配说明
  • php做网站访问记录湖北建站公司
  • 免费个人网站如何帮人做网站赚钱
  • 学校网站的功能合肥做网站需要多少钱
  • 葫芦岛市住房和城乡建设局网站sem优化系统
  • 眼镜网站源码南宁网页制作过程
  • 济源做网站怎么收费网站建设用什么网站好一点
  • 优秀的网站建设南通营销网站制作
  • 通辽网站开发0475seo网站建设适合女生吗
  • 网站的改版怎么做华为网站建设费用
  • 苍山做网站公司背景设计图
  • 军事网站模板wordpress页面链接地址
  • 网站开发与维护专业怎么开一个平台
  • 网站推广找网站开发成本如何账务处理