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

推荐订阅源

WordPress大学
WordPress大学
The GitHub Blog
The GitHub Blog
F
Fortinet All Blogs
Cloudbric
Cloudbric
P
Palo Alto Networks Blog
T
Threatpost
T
Tor Project blog
T
Tenable Blog
AWS News Blog
AWS News Blog
Project Zero
Project Zero
L
LangChain Blog
Cyberwarzone
Cyberwarzone
Engineering at Meta
Engineering at Meta
雷峰网
雷峰网
C
CERT Recently Published Vulnerability Notes
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Security Latest
Security Latest
云风的 BLOG
云风的 BLOG
I
Intezer
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
P
Proofpoint News Feed
A
Arctic Wolf
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Google DeepMind News
Google DeepMind News
V
Vulnerabilities – Threatpost
C
Cybersecurity and Infrastructure Security Agency CISA
MongoDB | Blog
MongoDB | Blog
aimingoo的专栏
aimingoo的专栏
K
Kaspersky official blog
Jina AI
Jina AI
N
News | PayPal Newsroom
T
The Blog of Author Tim Ferriss
D
DataBreaches.Net
A
About on SuperTechFans
博客园 - 三生石上(FineUI控件)
博客园 - 【当耐特】
Hugging Face - Blog
Hugging Face - Blog
Recorded Future
Recorded Future
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
S
Secure Thoughts
TaoSecurity Blog
TaoSecurity Blog
P
Privacy & Cybersecurity Law Blog
P
Proofpoint News Feed
MyScale Blog
MyScale Blog
IT之家
IT之家
Forbes - Security
Forbes - Security
The Hacker News
The Hacker News
Last Week in AI
Last Week in AI
T
Threat Research - Cisco Blogs
Y
Y Combinator Blog

博客园 - RevengeBoy

请求帮助 SQL 2005 master..xp_cmdshell 死锁问题 CSS隐藏滚动条 - RevengeBoy - 博客园 程序员 2008的最后一天 大家有什么感想说出来吧 vista ie7 window.confirm() 取消按钮 失效 解决办法 - RevengeBoy 魔兽争霸III 1.20, 1.21 1.22 需要特定语言版本之Window 解决办法 css 换行 且不分割最后一个单词 - RevengeBoy 英文系统 中 中文成了乱码问题 sql 查询第5行到第7行 之间的行 反射技术与工厂方法 (using C#) 图片水印效果 - RevengeBoy - 博客园 Membership、MembershipUser和Roles类 上传大文件控件 显示进度条! (OnClientClick 和 OnClick 新页面回传值)(gridview中获取控件 获取值) [转]ASP.NET(C#)常用代码33例 电脑常识---[二] 最近创作---用户控件 蓦然回首 profile 的使用(更换皮肤转换语言) dropdownlist 下的 SelectedValue 问题
Rc4 encrypt in PeopleSoft - RevengeBoy
RevengeBoy · 2010-12-02 · via 博客园 - RevengeBoy

起因: 经常我们会遇到url加密的情况。目前不管在国内国外关于peoplesoft 的资料是远远少于C# vb 等之类的资料的。

经过: 无奈之下只好自己了解rc4的加密原理自己写一个方法好了。

结果: 经过几天的折腾终于完成了。 代码如下。 如有疑问欢迎骚扰。

 Function IScript_RevengeBoy

   &Link = MsgGetExplainText(32000, 62, "Message Not Found");
   &sQuery = "http://home.cnblogs.com/RevengeBoy/";
   &Key = "uw*$2I5";
   Local array of any &s, &b16_map;
   &b16_digits = "0123456789abcdef";
   &b16_map = CreateArray();
   &result = CreateArray();
   &s = CreateArray();
  
   &times = 0;
   For &i3 = 0 To 255;
      If Mod(&i3, 16) = 0 And
            &i3 <> 0 And
            &i3 <> 255 Then
         &times = &times + 1;
      End-If;
      &charAtH1 = Substring(&b16_digits, &times + 1, 1);
      &charAtH2 = Substring(&b16_digits, Mod(&i3, 16) + 1, 1);
      &b16_map [&i3 + 1] = &charAtH1 | &charAtH2;
      rem %Response.Write("i=" | &i3 | "times=" | &times | ",    Mod(&i3, 15)=" | Mod(&i3, 16) | "<br>");
     
      rem %Response.Write("&b16_map [" | (&i3 + 1) | "] =" | &charAtH1 | &charAtH2 | "<br>");
      &map = &charAtH1 | &charAtH2;
      rem %Response.Write(&map);
   End-For;
  
  
   For &i0 = 1 To 256;
      &s [&i0] = &i0 - 1;
   End-For;
  
   &j = 0;
   &x = 0;
   For &i = 0 To 255;
      &charAtX = Substring(&Key, Mod(&i, Len(&Key)) + 1, 1);
      &j = Mod((&j + &s [&i + 1] + Code(&charAtX)), 256);
      &x = &s [&i + 1];
      &s [&i + 1] = &s [&j + 1];
      &s [&j + 1] = &x;
   End-For;
  
   &i2 = 0;
   &j = 0;
   &ct = "";
   &str = "";
   For &y = 0 To Len(&sQuery) - 1;
      &i2 = Mod((&i2 + 1), 256);
      &j = Mod((&j + &s [&i2 + 1]), 256);
      &x = &s [&i2 + 1];
      &s [&i2 + 1] = &s [&j + 1];
      &s [&j + 1] = &x;
      &charAtY = Substring(&sQuery, &y + 1, 1);
      &Char1 = Code(&charAtY);
      &Char2 = &s [Mod((&s [&i2 + 1] + &s [&j + 1]), 256) + 1];
      SQLExec(" select (" | &Char1 | "  +  " | &Char2 | ")   -   BITAND(" | &Char1 | "," | &Char2 | ")   *   2  from   dual", &str);
      &ct = &ct | &b16_map [&str + 1];

   End-For;
rem reuslt
%Response.Write(&Link | "w" | &ct);
  
End-Function;