如何使用程序实现控制上网?也就是分级控制

uscool 2003-12-12 05:23:34
IE中有个分级控制,现在需要使用程序来进行监控,使用RSAC分级控制策略,如何实现?如果没有使用RSAC分级的网页又该如何进行检测?或者使用过滤关键字的方法,如何实现?
谢谢!
...全文
58 21 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
21 条回复
切换为时间正序
请发表友善的回复…
发表回复
zhaodaguang2003 2004-01-12
  • 打赏
  • 举报
回复
using System;
using System.Diagnostics ;
using System.Runtime.InteropServices;
using System.Collections;
using System.Net .Sockets ;
namespace fupip
{
public class geturl
{
public geturl()
{

}
[DllImport( "user32.dll ")]
public static extern int GetClassName(int hwnd, byte[] lpClassName,Int32[] nMaxCount);


[DllImport( "user32.dll ")]
public static extern int GetWindow(int hwnd,int wCmd);

[DllImport( "user32.dll ")]
public static extern int SendMessage(int hwnd,int wMsg,int wParam, byte[] lParam);


public const int GW_CHILD = 5;
public const int GW_HWNDNEXT = 2;
public const int WM_GETTEXT =13;
public const int WM_GETTEXTLENGTH = 14;

public static string[] GetIEURL(string args)
{

string[] urls;

Process[] ps =Process.GetProcessesByName(args);
urls=new string[ps.Length];
for(int i=0;i <ps.Length;i++)
{
int hwndIE=(int)ps[i].MainWindowHandle;

int hwndEdit=getkid(hwndIE);


urls[i]= gettext(hwndEdit);



}
return urls;
}




static int getkid(int hwnd)
{
byte[] str=new byte[100];
Int32[] len=new Int32[1];
int hwndkid=0;
string classname;
int handle=0;
len[0]=100;
ArrayList al=new ArrayList();


GetClassName(hwnd,str,len);
classname=System.Text.Encoding.ASCII.GetString(str);


if(classname.Substring(0,4)== "Edit ")
{

handle= hwnd;
}

hwndkid=GetWindow(hwnd,GW_CHILD);

while(hwndkid!=0)

zhaodaguang2003 2004-01-12
  • 打赏
  • 举报
回复
using System;
using System.Diagnostics ;
using System.Runtime.InteropServices;
using System.Collections;
using System.Net .Sockets ;
namespace fupip
{
public class geturl
{
public geturl()
{

}
[DllImport( "user32.dll ")]
public static extern int GetClassName(int hwnd, byte[] lpClassName,Int32[] nMaxCount);


[DllImport( "user32.dll ")]
public static extern int GetWindow(int hwnd,int wCmd);

[DllImport( "user32.dll ")]
public static extern int SendMessage(int hwnd,int wMsg,int wParam, byte[] lParam);


public const int GW_CHILD = 5;
public const int GW_HWNDNEXT = 2;
public const int WM_GETTEXT =13;
public const int WM_GETTEXTLENGTH = 14;

public static string[] GetIEURL(string args)
{

string[] urls;

Process[] ps =Process.GetProcessesByName(args);
urls=new string[ps.Length];
for(int i=0;i <ps.Length;i++)
{
int hwndIE=(int)ps[i].MainWindowHandle;

int hwndEdit=getkid(hwndIE);


urls[i]= gettext(hwndEdit);



}
return urls;
}




static int getkid(int hwnd)
{
byte[] str=new byte[100];
Int32[] len=new Int32[1];
int hwndkid=0;
string classname;
int handle=0;
len[0]=100;
ArrayList al=new ArrayList();


GetClassName(hwnd,str,len);
classname=System.Text.Encoding.ASCII.GetString(str);


if(classname.Substring(0,4)== "Edit ")
{

handle= hwnd;
}

hwndkid=GetWindow(hwnd,GW_CHILD);

while(hwndkid!=0)

uscool 2003-12-22
  • 打赏
  • 举报
回复
up
uscool 2003-12-21
  • 打赏
  • 举报
回复
up
流梓 2003-12-18
  • 打赏
  • 举报
回复
可以试试用美萍
cuckoo_7 2003-12-18
  • 打赏
  • 举报
回复
关注
uscool 2003-12-18
  • 打赏
  • 举报
回复
to: napsoft(乡下人)
我们是想开发同类的软件,可以借鉴,但是其中技术又有谁会说呢?
呵呵!
bankliu 2003-12-17
  • 打赏
  • 举报
回复
~~~~~~~~~找这个:
ZoneIdentityPermission
在System.Security.Permissions中~关于权限,
也许对你有帮助?我没研究过~
李洪喜 2003-12-16
  • 打赏
  • 举报
回复
UP
zxwdl 2003-12-16
  • 打赏
  • 举报
回复
up
elite2018 2003-12-16
  • 打赏
  • 举报
回复
wmi 行不 , 不知道
uscool 2003-12-15
  • 打赏
  • 举报
回复
大家可以去看看这个!
http://www.rsac.org/rsac/
conquersky 2003-12-15
  • 打赏
  • 举报
回复
NavyBlue 2003-12-14
  • 打赏
  • 举报
回复
ding
sharplee82 2003-12-14
  • 打赏
  • 举报
回复
楼主的意思我还不明白,先顶一下。
uscool 2003-12-13
  • 打赏
  • 举报
回复
偶是西安的!
呵呵!先发了一个给误删了,郁闷?!
只好重发了!
谁会啊!给各思路先!
cchinasp 2003-12-13
  • 打赏
  • 举报
回复
关注。
GreenSpring 2003-12-13
  • 打赏
  • 举报
回复
mark
tjq_tang 2003-12-13
  • 打赏
  • 举报
回复
up
juqiang 2003-12-13
  • 打赏
  • 举报
回复
楼主是济南的?昨天正好听到一个兄弟问这个事情。
加载更多回复(1)

111,097

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • AIGC Browser
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧