svhda.exe,Backdoor.Rbot,瑞星也搞不定的病毒

  我是瑞星的正版用户。今天,瑞星提示我一个名叫svhda.exe文件在改写注册表,我当然不会让它改写。用瑞星去查毒,结果一会儿瑞星就自行退出了。在纯dos下查毒也不行,看来是碰到硬货了。

  上网用svhda.exe查了一下,百度没有查到,用google查,有22项,其中包括百度的“百度知道_反病毒_待解决问题”中的一页中文的,看来,前沿的技术性的东西还是google行。估计是这个病毒目前主要是在国外流行,中国还没有流行起来吧。

  最后是根据这个国外论坛的方法解决这个病毒的:http://forums.techguy.org/security/470410-annoying-virus-please-help.html

  真正解决问题的是一个叫作:Ewido Security Suite的软件。

  使用说明如上面论坛的:

  


27-May-2006 11:40 AM 

 Cheeseball81  

Moderator  Posts: 44,883

Join Date: Mar 2004

Location: New York

Experience: Nerd

 

* Click here to download the trial version of Ewido Security Suite.

· Install Ewido.

· During the installation, under "Additional Options" uncheck "Install background guard" and "Install scan via context menu".

· Launch ewido.

· It will prompt you to update click the OK button and it will go to the main screen.

· On the left side of the main screen click update.

· Click on Start and let it update.

· DO NOT run a scan yet.

Restart your computer into Safe Mode now.

(Start tapping the F8 key at Startup, before the Windows logo screen).

Perform the following steps in Safe Mode:

* Run Ewido:

Click on scanner

Click Complete System Scan and the scan will begin.

During the scan it will prompt you to clean files, click OK.

When the scan is finished, look at the bottom of the screen and click the Save report button.

Save the report to your desktop.

Reboot.

   

  使用截图如下:



另外,其中还介绍一个叫作Hijack This的软件,英文不大懂,好像是一个查看、删除常驻内存进程的工具。论坛中的作用就是用它,在上面那个Ewido执行前和后来查看比较内存中的进程的。正如下面所说,它查出来的东西不一定是病毒,有些是系统的和用户定制的。

使用说明如下:


26-May-2006 03:41 PM 

 Cheeseball81  

Moderator  Posts: 44,883

Join Date: Mar 2004

Location: New York

Experience: Nerd

 

Hi and welcome

* Click here to download HJTsetup.exe.

Save HJTsetup.exe to your desktop.

Double click on the HJTsetup.exe icon on your desktop.

By default it will install to C:\Program Files\Hijack This.

Continue to click Next in the setup dialogue boxes until you get to the Select Addition Tasks dialogue.

Put a check by Create a desktop icon then click Next again.

Continue to follow the rest of the prompts from there.

At the final dialogue box click Finish and it will launch Hijack This.

Click on the Do a system scan and save a log file button. It will scan and then ask you to save the log.

Click Save to save the log file and then the log will open in notepad.

Click on "Edit > Select All" then click on "Edit > Copy" to copy the entire contents of the log.

Come back here to this thread and Paste the log in your next reply.

DO NOT have Hijack This fix anything yet. Most of what it finds will be harmless or even required.

__________________

Peter: Oh my god Brian, there's a message in my Alpha-Bits. It says, 'Oooooo.'

Brian: Peter, those are Cheerios.

Member of ASAP

Microsoft MVP/Windows - Security

If we've helped, please donate to TSG.

使用截图如下:



问题:搞不懂HttpServletRequest的getCharacterEncoding()方法了

运行Struts中那个upload的例子,当使用那个upload-utf8.jsp上传文件时,上传后转到display.jsp时,显的总是乱码。就算在display.jsp中设置了<%@ page contentType="text/html; charset=utf-8" %>也没有用。

如下:

upload-utf8.jsp的设置:


<%@ page language="java" contentType="text/html; charset=gbk" %>

action:


            String encoding = request.getCharacterEncoding();

            System.out.println("the encoding is: "+ encoding);

            if ((encoding != null) && (encoding.equalsIgnoreCase("utf-8")))

            {

                response.setContentType("text/html; charset=utf-8");

            }

虽然在upload-utf8.jsp中也指定了utf8编码,但是在request.getCharacterEncoding();得到的encoding总是null,也就是没有在request中没有指定编码,明明是指定了的呀?怪事。

还有,就是那个upload.jsp,在昨天的运行中还是在display.jsp中出现了乱码,可是今天却没有了,搞不懂,怪事。

struts在上传文件过程中如何自动建立文件夹(转)

转自:http://bbs.chinajavaworld.com/thread.jspa?messageID=724084&tstart=0

 struts上传文件问题

发表于: 2006-5-23 下午9:27         回复 

 

struts在上传文件过程中如何自动建立文件夹?并根据上传的文件名存入不同的文件夹中?如果能有具体的例子代码更好。请各位多多指教,十分感谢!

 

·Hibernate查询出错 

 

chenyanji 

 

 

发表: 268

点数: 80

来自: 北京

注册: 05-3-1 

  Re: struts上传文件问题

发表于: 2006-5-26 下午11:53    原帖: springlet         回复 

 

还是应该用FILE处理吧

 

POPO帐号:yanji94521 QQ:309157714 MSN:yanji94521@hotmail.com 欢迎加入IT交流QQ群:5468368

 

·不需要编写actionForm、action来完成struts架构。 

 

gzxthebest 

 

 

发表: 9

点数: 100

注册: 05-9-23 

  Re: struts上传文件问题

发表于: 2006-5-29 上午1:16    原帖: springlet         回复 

 

自动创建文件夹?还真没实现过,关注中

 

·关于jsp页面执行问题 

 

test_1982 

 

发表: 116

点数: 100

注册: 05-7-26 

  Re: struts上传文件问题

发表于: 2006-5-29 下午1:30    原帖: springlet         回复 

 

可以通过file对象创建文件夹的。

1: 如果不存在{

File file = new File("d:/testD");

file.mkdir();

}

这样就创建了一个文件夹。后面的你应该知道如何递归的创建文件夹了吧。

 

Knowing how to make the one of the most abilities counts for much more

 

·大家好 关于3gp文件的转换 

 

JavaScript精简学习4:表单(转帖)

转自:http://www.dvbbs.net/tech/js/2006041949627.asp

 JavaScript精简学习4:表单

作者: 来源:

阅读 156 人次 , 2006-4-19 16:47:00

43 表单构成

1: <form method=”post” action=”target.html” name=”thisForm”>

2: <input type=”text” name=”myText”>

3: <select name=”mySelect”>

4: <option value=”1”>First Choice</option>

5: <option value=”2”>Second Choice</option>

6: </select>

7: <br>

8: <input type=”submit” value=”Submit Me”>

9: </form>

44 访问表单中的文本框内容

1: <form name=”myForm”>

2: <input type=”text” name=”myText”>

3: </form>

4: <a href='#' onClick='window.alert(document.myForm.myText.value);'>Check Text Field</a>

45 动态复制文本框内容

1: <form name=”myForm”>

2: Enter some Text: <input type=”text” name=”myText”><br>

3: Copy Text: <input type=”text” name=”copyText”>

4: </form>

5: <a href=”#” onClick=”document.myForm.copyText.value =

6: document.myForm.myText.value;”>Copy Text Field</a>

46 侦测文本框的变化

1: <form name=”myForm”>

2: Enter some Text: <input type=”text” name=”myText” onChange=”alert(this.value);”>

3: </form>

47 访问选中的Select

1: <form name=”myForm”>

2: <select name=”mySelect”>

3: <option value=”First Choice”>1</option>

4: <option value=”Second Choice”>2</option>

5: <option value=”Third Choice”>3</option>

6: </select>

7: </form>

8: <a href='#' onClick='alert(document.myForm.mySelect.value);'>Check Selection List</a>

48 动态增加Select项

1: <form name=”myForm”>

2: <select name=”mySelect”>

3: <option value=”First Choice”>1</option>

4: <option value=”Second Choice”>2</option>

5: </select>

6: </form>

7: <script language=”JavaScript”>

8: document.myForm.mySelect.length++;

9: document.myForm.mySelect.options[document.myForm.mySelect.length - 1].text = “3”;

10: document.myForm.mySelect.options[document.myForm.mySelect.length - 1].value = “Third Choice”;

11: </script>

49 验证表单字段

1: <script language=”JavaScript”>

2: function checkField(field) {

3: if (field.value == “”) {

4: window.alert(“You must enter a value in the field”);

5: field.focus();

6: }

7: }

8: </script>

9: <form name=”myForm” action=”target.html”>

10: Text Field: <input type=”text” name=”myField”onBlur=”checkField(this)”>

11: <br><input type=”submit”>

12: </form>

50 验证Select项

1: function checkList(selection) {

2: if (selection.length == 0) {

3: window.alert(“You must make a selection from the list.”);

4: return false;

5: }

6: return true;

7: }

51 动态改变表单的action

1: <form name=”myForm” action=”login.html”>

2: Username: <input type=”text” name=”username”><br>

3: Password: <input type=”password” name=”password”><br>

4: <input type=”button” value=”Login” onClick=”this.form.submit();”>

5: <input type=”button” value=”Register” onClick=”this.form.action = ‘register.html’; this.form.submit();”>

6: <input type=”button” value=”Retrieve Password” onClick=”this.form.action = ‘password.html’; this.form.submit();”>

7: </form>

52 使用图像按钮

1: <form name=”myForm” action=”login.html”>

2: Username: <input type=”text” name=”username”><br>

3: Password: <input type=”password”name=”password”><br>

4: <input type=”image” src=”login.gif” value=”Login”>

5: </form>

6:

53 表单数据的加密

1: <SCRIPT LANGUAGE='JavaScript'>

2: <!--

3: function encrypt(item) {

4: var newItem = '';

5: for (i=0; i < item.length; i++) {

6: newItem += item.charCodeAt(i) + '.';

7: }

8: return newItem;

9: }

10: function encryptForm(myForm) {

11: for (i=0; i < myForm.elements.length; i++) {

12: myForm.elements.value = encrypt(myForm.elements.value);

13: }

14: }

15:

16: //-->

17: </SCRIPT>

18: <form name='myForm' onSubmit='encryptForm(this); window.alert(this.myField.value);'>

19: Enter Some Text: <input type=text name=myField><input type=submit>

20: </form>

上面的encryptForm方法把表单中的数据转换为编码,在提交表单之前完成了简单的表单数据加密~

运用javascript制作弹出式表单获取用户输入数据及验证的

有两个主题:

一是接收数据:The JavaScript prompt - Getting user input

二是验证数据:Create JavaScript Input Text Validation Fields

"javascript""input"为关健字在google中搜索到这个方法如下:

http://www.webdevelopersnotes.com/tutorials/javascript/javascript_prompt_visitor_inputs.php3

The JavaScript prompt - Getting user input


The JavaScript prompt - Getting user inputGo to The JavaScript prompt - Getting user inputJavaScript TutorialGo to JavaScript TutorialWeb Development TutorialsGo to Web Development TutorialsHomepage

The JavaScript prompt - Getting user input

Welcome mdx

In this session we'll look at the JavaScript prompt. The prompt() is a method of the window object, just like alert() or confirm().

The format for prompt() is similar to alert() or confirm() except for one addition.

prompt("Message", "default value in the text field");

In addition to the "OK" and "Cancel" buttons, a prompt box also has a text field that is employed for gathering visitor input. JavaScript lets you specify a default text for this text field. This is optional, that is you can construct a prompt() without specifing the default text. In such cases, JavaScript displays an ugly "undefined" value in the text field.

The information submitted by the visitor from prompt() can be stored in a variable, just as we had stored the value returned by confirm().

var name = prompt("What is your name", "Type you name here");

Once we have the value, we can write a customized greeting using document.write() as I have done or display an alert box.

var name = prompt("What is your name", "Type you name here");

alert("Hi " + name + "\nHope you are enjoying JavaScript!");

Click here to test the code.

It's important to remember that the value returned by prompt() and subsequently stored in a variable will always be a string data type. This is fine if you are dealing with text, but might present problems to the code if you plan to receive numeric data through prompt(). Javascript provides two functions to convert this string value to a numeric data type; parseInt() and parseFloat().

The parseInt() converts a string to an integer value while parseFloat() parses the string converting it to a floating point number.

Note: An integer is a whole number without any fractional part while floating-point numbers have a decimal part.

Now let's write a small script that takes a number from the visitor, checks whether its odd or even and displays the result through an alert box.

var n = prompt("Check your number", "Type your number here");

n = parseInt(n);

if (n == 0)

   {

   alert("The number is zero");

   }

else if (n%2)

   {

   alert("The number is odd");

   }

else

   {

   alert("The number is even");

   }

Click here to test the code

When parseInt() or parseFloat() encounter alphabet or any non-digit character, parsing (conversion) stops and the functions return NaN, which means Not a Number. The only way to test for NaN is to use isNaN() function.

We can make the code above more user-friendly by introducing one more if statement that checks for valid input.

var n = prompt("Check your number", "Type your number here");

n = parseInt(n);

if (isNaN(n))

   {

   alert("The input cannot be parsed to a number");

   }

else

   {

   if (n == 0)

      {

      alert("The number is zero");

      }

   else if (n%2)

      {

      alert("The number is odd");

      }

   else

      {

      alert("The number is even");

      }

   }

Click here to test the code.

Assignments

   1. With which object would you associate the prompt() method?

   2. Prompt() takes two arguments. Where are they displayed?

   3. The input from a prompt() is of which data type?

   4. What is the function of parseFloat() and parseInt()?

   5. What will be result if we send "abcd" through a prompt() input and pass it through parseInt()?

   6. What is the use of isNaN()?

如这是测试页面:


<HTML>

<HEAD>

<TITLE>JavaScript</TITLE>

<SCRIPT LANGUAGE="JAVASCRIPT" TYPE="TEXT/JAVASCRIPT">

<!--

//-->

var name = prompt("What is your name", "Type you name here");

alert("Hi " + name + "\nHope you are enjoying JavaScript!");

</SCRIPT>

</HEAD>

<BODY>

</BODY>

</HTML>

在javascript进行数据有效性的验证:

http://www.codeave.com/javascript/code.asp?u_log=100

Create JavaScript Input Text Validation Fields

Limit the amount of traffic and empty form fields submitted to your site by stopping blank user input before it leaves the client. Server side form validation isn’t always the best answer. Whenever possible it is best to eliminate as much unwanted input as possible. The following script writer aids in that goal. Simply enter the number of text input fields that you need to ensure are not containing blank information, the names of the elements and copy the output code into your document. (Note: Blanks will be converted to the underscore and the use of special characters or numerics as field names will mess up your resultant output)

示例代码:


<html>

<body>

<script Language="JavaScript">

<!--

function Blank_TextField_Validator(form)

{

if (form.password.value == "")

{

alert("Please fill in the password field.");

form.password.focus();

return (false);

}

return (true);

}

//-->

</script>

<form method="post" action="where_ever_you_want.htm"  onsubmit="return Blank_TextField_Validator(this)">

<p>

password

<br>

<input type="text" name="password" >

<br>

<input type="submit" value="Submit">

</form>

</body>

用DIV标签和CSS技术进行HTML网页设计(转帖2篇)

转自:http://www.blogjava.net/weidy/archive/2006/06/01/49766.html,标题有改变。

不能再等了,快把Table换成DIV吧

  用了四五年的Table排版,没觉得有什么不好,这一段时间迷上了Dojo,才发现如今已经到了不用DIV不行的年代。还是赶紧跟上潮流,把Table换成DIV吧! 改了几个页面,发现比想象的简单,更是尝到了用div的甜头。share自己一点浅浅的经验:

1. 先上网搜一下找点前人经验。推荐两篇好文:

  http://www.glish.com/css/                         "CSS Layout Techniques: for Fun and Profit"

  http://www.alistapart.com/articles/practicalcss   "Practical CSS Layout Tips, Tricks, & Techniques"   

2. 随便找几个用DIV+CSS实现,结构又比较简单的网站,研究一下它的页面结构和CSS。比如我就是主要看了下面几个网站:

      CSS禅花园          http://csszengarden.com/      

      Eclipse.org        http://www.eclipse.org/

      mozilla.com        http://www.mozilla.com/

作为世界上CSS高手比武的擂台,CSS禅花园的模板实在多的恐怖,以前都只站在欣赏的角度不觉得,自己研究起来,也就只能是挑了一两个看看,再感慨了一番作者真是好创意好美工。有趣的是Eclipse.org的首页居然基本用的都是mozilla.com的CSS,对比着这两个网站看更能看出端倪。

3.  自己上手干吧,让你的页面内容和显示样式彻底分离,其实并不难。

Forward on committed response错误

原来用struts1.1使用如下注释掉的代码一切正常,

 


if (target.equals("messageSuccess")) {

/*// changed Struts version from 1.1 to 1.2.9, this will generate error: Forward on committed response

PrintWriter out;

response.setContentType("text/html;charset=utf-8");

out = response.getWriter();

out.println(

"<script language=\"JavaScript\" type=\"text/javascript\">");

out.println("alert(\"感谢您对本站提出的宝贵意见和建议!回复见公告牌中的'回复网友留言集'。\")");

out.println("</script>");

out.flush();

*/

request.setAttribute("isMessage", "true");

}

换为struts1.2.9后就出现:Forward on committed response错误(Tomcat5.0控制台debug);在网站上运行resin2.1.12在页面上报错:

500 Servlet Exception

java.lang.IllegalStateException: forward() not allowed after buffer has

committed.

at com.caucho.server.http.QRequestDispatcher.forward(QRequestDispatcher.java:131)

at com.caucho.server.http.QRequestDispatcher.forward(QRequestDispatcher.java:103)

at com.caucho.server.http.QRequestDispatcher.forward(QRequestDispatcher.java:80)

at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1085)

at org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:398)

at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:241)

at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)

at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:165)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:103)

at com.caucho.server.http.FilterChainServlet.doFilter(FilterChainServlet.java:96)

at com.learndiary.website.util.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:102)

at com.caucho.server.http.FilterChainFilter.doFilter(FilterChainFilter.java:88)

at com.caucho.server.http.Invocation.service(Invocation.java:315)

at com.caucho.server.http.RunnerRequest.handleRequest(RunnerRequest.java:346)

at com.caucho.server.http.RunnerRequest.handleConnection(RunnerRequest.java:274)

at com.caucho.server.TcpConnection.run(TcpConnection.java:139)

at java.lang.Thread.run(Thread.java:595)

--------------------------------------------------------------------------------

Resin 2.1.12 (built Tue Dec 9 14:58:25 PST 2003)

经过查资料,发现是PrintWriter已经返回用户数据后,就不能再forward到其它页面了。也就是这个错误:

forward should be called before the response has been committed to the client (before response body output has been flushed). If the response already has been committed, this method throws an IllegalStateException. Uncommitted output in the response buffer is automatically cleared before the forward. forward应当在响应提交给客户端之前调用(响应体输出被刷新前)。如果响应已经被提交,该方法抛出IllegalStateException。响应缓存中未提交的输出在转发之前自动清空。

所以就不在Action中写提示信息了,而把其移动jsp页面,如下:


  <c:if test="${requestScope['isMessage'] == true }">

   <script language="JavaScript" type="text/javascript">

    alert("感谢您对本站提出的宝贵意见和建议!回复见公告牌中的'回复网友留言集'。")

   </script>

  </c:if>

同时,我发现如果在Action中用的是request.setAttribute("isMessage", "true");

则在页面中可以  <c:if test="${requestScope['isMessage'] == true }">

注意,上面的“true”是没有加引号的,可能这就是c:if的boolean类型吧,我也没有去查资料;

但是,如果为:request.setAttribute("isMessage", "otherString");

则必须这样:  <c:if test="${requestScope['isMessage'] == \"otherString\"); }">

就是要加双引号,而且要进行转意。