Chinese kitchen knife Batch export data

Source: Internet
Author: User

Scripthost =Wscript.fullnamescripthost= Right (Scripthost, One)if  not(UCase (scripthost) = "CSCRIPT. EXE ") ThenSetWs=Create ("Wscript.Shell") Ws.run "cscript/nologo "& " "" "&wscript.scriptfullname&" "" Wscript.QuitEnd ifSetargs =wscript.argumentsifArgs.count<>3  Then Call HelpEnd ifSetconn =CreateObject ("ADODB. Connection ") pwd= "Dense" &AMP;CHR ( -) &AMP;CHR (9) &AMP;CHR (Ten) & "Code" &AMP;CHR (2) ConnStr= "Provider=microsoft.jet.oledb."4.0; Data source= "& Args (1) & "; Mode=share Deny read| Share Deny Write; Persist Security Info=false; Jet Oledb:database password="&pwd&"; Conn.Open ConnStrSetfso=CreateObject ("Scripting.FileSystemObject")if(Args (0) = "/I") ThenCall ImportElseCall ExportEnd ifConn.closeSetfso= NothingSetconn=Nothingwscript.echo "Done"functionHelp () WScript.Echo "Chopper Export/Import Tool by ZCGONVH "WScript.Echo" Usage:cscript "&wscript.scriptname& "</e|/i>MDB TXT "WScript.Echo"/e:export totext "WScript.Echo"/i:import from text "Wscript.QuitEnd functionfunctionExport ()SetOptfile=fso.opentextfile (Args (2),8, True)Setrs =CreateObject ("ADODB. RecordSet ") Rs. Open "Select* FROM SITE ", Conn,1,1 Do  while  notRs.eoftmptext=rs ("SiteURL") &AMP;CHR (9) & RS ("Sitepass") &AMP;CHR (9) & RS ("Ntype") &AMP;CHR (9) & RS ("Ncodepage") &AMP;CHR (9) Select Casers ("Nscript") Case 0: tmptext=tmptext& "PHP" Case 1: tmptext=tmptext& "aspx" Case 2: tmptext=tmptext& "ASP" Case Else: tmptext=tmptext& "Customize"EndSelectoptfile.writeline Tmptextrs.movenextlooprs.closeoptfile.closeSetoptfile= NothingSetrs= NothingEnd functionfunctionimport () Set optfile=fso.opentextfile (Args (2),1) Do  while  notOptfile.atendofstreamtmparr= Split (OPTFILE.READLINE,CHR (9)) SQL= "INSERT INTO SITE" (Siteurl,sitepass,ntype,ncodepage,nscript) VALUES ("" "&tmparr (0) & "", "" "&tmparr (1) & "", "&tmparr (2) & "," &tmparr (3) & "," Select CaseLCase (Tmparr (4)) Case"PHP":sql=sql& "0)" Case"aspx":sql=sql& "1)" Case"ASP":sql=sql& "2)" Case Else:sql=sql& "3)"Endselectconn.execute (sql) LoopSetOptfile = NothingEnd function

Usage:

/i db.mdb export.txt

Passwords in various languages:

"Secret" &CHR (&chr) (9) &CHR (ten) & "code" &CHR (2) byte pwd[] ={0xc3,0xdc,0x0d,0x09,0x0a,0xc2,0xeb,0x02};(char*) pwdencoding.getencoding (  936). GetString (new byte[]{0xc3,0xdc,0x0d,0x09,0x0a,0xc2,0xeb,0x02})

The 64-bit system needs to use the following command

%WINDIR%\SYSWOW64\CMD.EXE/C cscript exp.vbs/e Db.mdb export.txt

Chinese kitchen knife Batch export data

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.