("Internetexplorer.application")
Ie. Navigate "About:blank"
Ie. Visible = 1
Ie. ToolBar = 0
Ie. StatusBar = 0
Ie. width=500
Ie. height=335
Do while (IE. BUSY): Loop
Set Doc = IE. Document
Doc.open
Execute "Doc.writeln" Chr (+) Vttv Chr (34)
Doc.close
Set ie=nothing
End Function
Another is that I wrote, inserting ASP code into Access as a back door, which should have been my first, but I don't know if anyone else had found it earlier. Later, the spread of the Internet directly to the databas
Set abo=nothing
Function Bin2str (Re)
For i = 1 to LenB (Re)
BT = AscB (MidB (Re, I, 1))
If BT Bin2str=bin2str Hex (BT)
Next
End Function
======================================
Download by Down.vbs
=============
[Code]
On Error Resume Next
Set arg=wscript.arguments
If Arg.count=0 then Wscript.Quit
' Code by Netpatch
' cscript down.vbs http://122.136.32.55/demo.htm c:\good.exe
Set Mail1 = CreateObject ("CDO.") Message ")
Mail1.createmhtmlbody Arg (0), 31
ss= Mail1.htmlbody
Set Mail1
,getbytestring (Chr (13)))
Posbeg = Pos + 4
Posend = InstrB (posbeg,strrequestbin,boundary)-2
Value = getString (MidB (Strrequestbin,posbeg,posend-posbeg))
End If
' Add content to Dictionary object
Uploadcontrol.add "Value", value
' Add Dictionary object to main dictionary
Set uploadrequest (Name) = Uploadcontrol
' Loop to Next object '
Boundarypos = InstrB (Boundarypos+lenb (boundary), strrequestbin,boundary)
Loop
End Function
' String to byte string conversion
Public Function getbytestring
(Chr (13)))
Posbeg = Pos + 4
Posend = InstrB (posbeg,strrequestbin,boundary)-2
Value = getString (MidB (Strrequestbin,posbeg,posend-posbeg))
End If
' Add content to Dictionary object
Uploadcontrol.add "Value", value
' Add Dictionary object to main dictionary
Set uploadrequest (Name) = Uploadcontrol
' Loop to Next object '
Boundarypos = InstrB (Boundarypos+lenb (boundary), strrequestbin,boundary)
Loop
End Function
' String to byte string conversion
Public Function getbytestring (strstring)
D
Source =" Server. MapPath (db)
Conn. open connstr
Conn.exe cute ("create table notdownload (notdown oleobject )")
Set rs = server. createobject ("adodb. recordset ")
SQL = "select * from notdownload"
Rs. open SQL, conn, 1, 3
Rs. addnew
Rs ("notdown"). appendchunk (chrB (asc ("
Rs. update
Rs. close
Set rs = nothing
Conn. close
Set conn = nothing
%>
After this code is run, a nodownload table is generated in the database, and the field in the table is
Syntax: strconv (to be convertedString, conversion format)
Here, the conversion format is used:
Vbunicode converts ANSI strings to Unicode
Vbfromunicode converts Unicode strings to ANSI
After the string is converted to ANSI, all string processing commands must be added with B, for example, leftb, rightb,
Midb, chrb, Region B, lenb, inputb, etc. For example, you can use these commands to process it.
After processing, you can convert it back to Unicode
downloaded. And if you use the download tool such as flashget can also download directly.
Three, ASP type
This practice is more professional but also very safe and is now more popular practice, but now a lot of people just do half, just change the data name to ASP, so that directly with the FlashGet such as download tools can download the database, this way the correct approach is two steps:
Step One: Create a field in the database with the name random, the type is an OLE object, and the conten
currentpagetext = "private string Nopageselectedtext = "No Selection page."
private String Querypagecommandtext = "SELECT * from" +
"(SELECT top {0} * from" +
"(SELECT top {1} * FROM ({2}) as T0 order by {3} {4}) as T1" +
' ORDER by {3} {5} ' as T2 +
"Order BY {3}";
private String querycountcommandtext = "Select COUNT (*) from ({0}) as T0";
// ***********************************************************************
#endregion
Private variables related to properties:
Char[] Chra = {', '};
Char[
general understanding of some of the methods and how they are used, we then start designing the database and related code.
The first step: Database design (for example, Ms SQL Server7):
CREATE TABLE img--Creates a table for storing pictures, named img
(
ID int identity (1,1) not NULL,
IMG Image
)
Second Step: program writing, which omits the user input interface, here only gives very important two files namely Picture upload processing (processimg.asp) and display picture (showimg.asp) f
general understanding of some of the methods and how they are used, we then start designing the database and related code.
The first step: Database design (for example, Ms SQL Server7):
CREATE TABLE img--Creates a table for storing pictures, named img
(
ID int identity (1,1) not NULL,
IMG Image
)
Second Step: program writing, which omits the user input interface, here only gives very important two files namely Picture upload processing (processimg.asp) and display picture (showimg.asp)
conn = Server.CreateObject ("ADODB. Connection ")
Conn.Open "Dsn=wroxdns", "User", "pass"
Then create a recordset from the connection:
sql = "Select PHOTO, CONTENTTYPE from MYTABLE"
Set rs = Server.CreateObject ("ADODB.") Recordset ")
Rs. Open SQL, Conn, 3, 3
After the recordset is created, put the binary data into a BLOB field in the database:
Picturechunk = picture ChrB (0)
Rs. Fields ("Picture"). AppendChunk Picturechunk
Rs. Fields ("CONTENTTYP
used, we then start designing the database and related code.
The first step: Database design (for example, Ms SQL Server7):CREATE TABLE img--Creates a table for storing pictures, named img(ID int identity (1,1) not NULL,IMG Image)
Second Step: program writing, which omits the user input interface, here only gives very important two files namely Picture upload processing (processimg.asp) and display picture (showimg.asp) file.
1) processimg.asp File code:The following is a reference fragment:〈%R
// ***********************************************************************
private string currentpagetext = "private string Nopageselectedtext = "No Selection page."
private String Querypagecommandtext = "SELECT * from" +
"(SELECT top {0} * from" +
"(SELECT top {1} * FROM ({2}) as T0 order by {3} {4}) as T1" +
' ORDER by {3} {5} ' as T2 +
"Order BY {3}";
private String querycountcommandtext = "Select COUNT (*) from ({0}) as T0";
// ***************************************************************
= Strdata
End Function
' Double-byte string converted to a single byte string
function Getsbfromdb (bytstring)
Dim bin, I
Bin = ""
For I=1 to Len (bytstring)
bin = bin ChrB (ASC (Mid-bytstring,i,1))
Next
Getsbfromdb = Bin
End Function
' Single byte string to double byte string
function GETDBFROMSB (bitstring)
Dim str, I
str = ""
For I=1 to LenB (bitstring)
str = str chr (ASCB (MidB (bitstring,i,1))
Next
GETDBFROMSB = str
End Function
'
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.