首页 > 开发 > 综合 > 正文

反查ACC数据库的密码?

2024-07-21 02:13:52
字体:
来源:转载
供稿:网友

最大的网站源码资源下载站,

以下是html网页特效代码,点击运行按钮可查看效果:

[提示:可先修改代码再按运行]

sqlnono.asp代码

复制内容到剪贴板
以下是引用片段:
代码:
lodo_gqno,lodo_serverurl,lodo_areaurl,lodo_sysinitialvalue,lodo_servername,lodo_edition,lodo_visittimes,lodo_rzstr,lodo_addgoodsrest,lodo_addorderrest,lodo_usertgno,lodo_scjtno,lodo_qtbqno,lodo_ddkcno,lodo_yhhano,lodo_maskoperactionno,lodo_gwjscno,lodo_yhjscno,lodo_oldtime,lodo_gqstime,lodo_gqetime,lodo_usertgstime,lodo_usertgetime,lodo_scjtstime,lodo_scjtetime,lodo_qtbqstime,lodo_qtbqetime,lodo_ddkcstime,lodo_ddkcetime,lodo_yhhastime,lodo_yhhaetime,lodo_maskoperactionstime,lodo_maskoperactionetime,lodo_gwjscstime,lodo_gwjscetime,lodo_yhjscstime,lodo_yhjscetime,lodo_passstr,lodo_web_buttomstr
public lodo_version,lodo_duetime,db,databasename
incconststr = server.mappath(lodo_conststr & "inc/const.asp")
if checkfile(incconststr) then
writestr = readtext(incconststr)
writestr = decrypt(writestr, lodo_conststr)
if len(writestr)>0 then execute (writestr) end if
else
if lodo_chconst = 1 then
response.write "由于此" & lodo_conststr & "inc/const.asp文件不存在,所以无法浏览网站!"
response.end
end if
end if
versionfile = server.mappath(lodo_conststr & "inc/version.inc")
if checkfile(versionfile) then
writestr = readtext(versionfile)
if len(writestr)>0 then execute (writestr) end if
end if
lodo_version = lodo_sysname & lodo_sysversion
select case lodo_gqno
case 0
lodo_duetime = "已过期"
case 1
if lodo_gqetime >= date then lodo_duetime = lodo_gqetime & "将到期" else lodo_duetime = "已过期" end if
case 2
   lodo_duetime = "永不过期"
end select
if lodo_databasetype = 0 then
    lodo_now = "now()"
    db = lodo_conststr & lodo_dbfile & "/" & lodo_access_name & ""
    databasename = server.mappath("" & db & "")
    connstr = "provider=microsoft.jet.oledb.4.0;jet oledb:database password=" & getbinarypass(lodo_conststr) & ";data source=" & databasename & ""
else
    lodo_now = "getdate()"
    connstr = "provider=sqloledb;data source=" & lodo_sql_ipstr & ";uid=" & lodo_sql_userstr & ";pwd=" & lodo_sql_upass & ";database=" & lodo_sql_database & " " 
end if
set conn=server.createobject("adodb.connection")
on error resume next
conn.open connstr
if err <> 0 then
    err=0
    set conn = nothing
    if lodo_databasetype = 0 then response.write "access数据库连接出错。请检查连接字串!" else response.write "数据库连接出错,请检查连接字串。或者还未安装,点击这里进入<a href=’"&lodo_conststr&"install/index.html’>系统安装</a>" end if
    response.end
end if
set ld_rs = conn.execute("select backstagedata,bserverdata,stagedata from lodo_setup")
if not (ld_rs.eof or ld_rs.bof) then
lodo_stagedata = ld_rs("stagedata")
lodo_backstagedata = ld_rs("backstagedata")
lodo_bserverdata = ld_rs("bserverdata")
end if
set ld_rs = nothing
if instr(lcase(lodo_serverurl), "http://") <= 0 then lodo_serverurl = "http://www.lodoeshop.com/user/update.asp?" end if
function loadkey(cryptstr, keypath)
dim ld_key,keyfile,fso,f,filename,ts,g_keylocation,i, k,tempkey,lodokey, newlodokey, lodorightnum
lodokey = "www.lodoeshop.com"
lodorightnum = 3
g_keylocation = keypath & "inc/key.txt"
filename = server.mappath(g_keylocation)
set fso = server.createobject("scripting.filesystemobject")
if fso.fileexists(filename) then
set f = fso.getfile(filename)
set ts = f.openastextstream(1, -2)
do while not ts.atendofstream
keyfile = keyfile & ts.readline
loop
ld_key = ""
keyfile = mid(keyfile, 1, len(cryptstr))
k = 1
for i = 1 to len(keyfile)
tempkey = asc(mid(keyfile, i, 1))
if k > len(lodokey) then
k = 1
end if
newlodokey = asc(mid(lodokey, k, 1)) + lodorightnum
do while newlodokey > 255
newlodokey = newlodokey - 255
loop
ld_key = ld_key & tempkey & chr(newlodokey)
next
end if
loadkey = ld_key
end function
function encrypt(strcryptthis, keypath)
dim strchar,ikeychar,istringchar,i,g_key,icryptchar,strencrypted
g_key = loadkey(strcryptthis, keypath)
for i = 1 to len(strcryptthis)
ikeychar = asc(mid(g_key, i, 1))
istringchar = asc(mid(strcryptthis, i, 1))
icryptchar = ikeychar xor istringchar
strencrypted = strencrypted & chr(icryptchar)
next
encrypt = strencrypted
end function
function decrypt(strencrypted, keypath)
dim strchar,ikeychar,istringchar,i,g_key,idecryptchar
g_key = loadkey(strencrypted, keypath) 
for i = 1 to len(strencrypted) 
ikeychar = (asc(mid(g_key, i, 1)))
istringchar = asc(mid(strencrypted, i, 1))
idecryptchar = ikeychar xor istringchar
strdecrypted = strdecrypted & chr(idecryptchar) 
next
decrypt = strdecrypted
end function
function getbinarypass(passinc)
dim passurl
dim fso
dim fl
dim objstream
dim password, passwordstr
passurl = server.mappath(passinc & "inc/") & "/wwwlodocom" 
set fso = server.createobject("scripting.filesystemobject")
set fl = fso.getfile(passurl) 
set objstream = server.createobject("adodb.stream")
objstream.open
objstream.type = 1
objstream.loadfromfile passurl
passwordstr = objstream.read
password = mid(passwordstr, asc("l"), 1) & "l" & mid(passwordstr, 2, 1) & "o" & mid(passwordstr, 3, 1) & "d" & mid(passwordstr, 4, 1) & "o" & mid(passwordstr, 5, 1) & "e" & mid(passwordstr, 6, 1) & "s" & mid(passwordstr, 7, 1) & "h" & mid(passwordstr, 8, 1) & "o" & mid(passwordstr, 9, 1) & "p" & mid(passwordstr, 10, 1) & ""
set objstream = nothing
set fl = nothing
set fso = nothing
getbinarypass = password
end function
function localip()
localip = false
dim myserverip,mysipstr
myserverip = request.servervariables("local_addr")
if myserverip = "127.0.0.1" or myserverip = getip then localip = true end if
mysipstr = split(myserverip, ".")
select case trim(mysipstr(0))
case "192"
if trim(mysipstr(1)) = "168" then localip = true end if
case "127"
if int(mysipstr(1)) >= 16 and int(mysipstr(1)) <= 31 then localip = true end if
case "10"
localip = true
end select
end function
sqlnono.asp代码
复制内容到剪贴板
代码:
lodo_gqno,lodo_serverurl,lodo_areaurl,lodo_sysinitialvalue,lodo_servername,lodo_edition,lodo_visittimes,lodo_rzstr,lodo_addgoodsrest,lodo_addorderrest,lodo_usertgno,lodo_scjtno,lodo_qtbqno,lodo_ddkcno,lodo_yhhano,lodo_maskoperactionno,lodo_gwjscno,lodo_yhjscno,lodo_oldtime,lodo_gqstime,lodo_gqetime,lodo_usertgstime,lodo_usertgetime,lodo_scjtstime,lodo_scjtetime,lodo_qtbqstime,lodo_qtbqetime,lodo_ddkcstime,lodo_ddkcetime,lodo_yhhastime,lodo_yhhaetime,lodo_maskoperactionstime,lodo_maskoperactionetime,lodo_gwjscstime,lodo_gwjscetime,lodo_yhjscstime,lodo_yhjscetime,lodo_passstr,lodo_web_buttomstr
public lodo_version,lodo_duetime,db,databasename
incconststr = server.mappath(lodo_conststr & "inc/const.asp")
if checkfile(incconststr) then
writestr = readtext(incconststr)
writestr = decrypt(writestr, lodo_conststr)
if len(writestr)>0 then execute (writestr) end if
else
if lodo_chconst = 1 then
response.write "由于此" & lodo_conststr & "inc/const.asp文件不存在,所以无法浏览网站!"
response.end
end if
end if
versionfile = server.mappath(lodo_conststr & "inc/version.inc")
if checkfile(versionfile) then
writestr = readtext(versionfile)
if len(writestr)>0 then execute (writestr) end if
end if
lodo_version = lodo_sysname & lodo_sysversion
select case lodo_gqno
case 0
lodo_duetime = "已过期"
case 1
if lodo_gqetime >= date then lodo_duetime = lodo_gqetime & "将到期" else lodo_duetime = "已过期" end if
case 2
   lodo_duetime = "永不过期"
end select
if lodo_databasetype = 0 then
    lodo_now = "now()"
    db = lodo_conststr & lodo_dbfile & "/" & lodo_access_name & ""
    databasename = server.mappath("" & db & "")
    connstr = "provider=microsoft.jet.oledb.4.0;jet oledb:database password=" & getbinarypass(lodo_conststr) & ";data source=" & databasename & ""
else
    lodo_now = "getdate()"
    connstr = "provider=sqloledb;data source=" & lodo_sql_ipstr & ";uid=" & lodo_sql_userstr & ";pwd=" & lodo_sql_upass & ";database=" & lodo_sql_database & " "
end if
set conn=server.createobject("adodb.connection")
on error resume next
conn.open connstr
if err <> 0 then
    err=0
    set conn = nothing
    if lodo_databasetype = 0 then response.write "access数据库连接出错。请检查连接字串!" else response.write "数据库连接出错,请检查连接字串。或者还未安装,点击这里进入<a href='"&lodo_conststr&"install/index.html'>系统安装</a>" end if
    response.end
end if
set ld_rs = conn.execute("select backstagedata,bserverdata,stagedata from lodo_setup")
if not (ld_rs.eof or ld_rs.bof) then
lodo_stagedata = ld_rs("stagedata")
lodo_backstagedata = ld_rs("backstagedata")
lodo_bserverdata = ld_rs("bserverdata")
end if
set ld_rs = nothing
if instr(lcase(lodo_serverurl), "http://") <= 0 then lodo_serverurl = "http://www.lodoeshop.com/user/update.asp?" end if
function loadkey(cryptstr, keypath)
dim ld_key,keyfile,fso,f,filename,ts,g_keylocation,i, k,tempkey,lodokey, newlodokey, lodorightnum
lodokey = "www.lodoeshop.com"
lodorightnum = 3
g_keylocation = keypath & "inc/key.txt"
filename = server.mappath(g_keylocation)
set fso = server.createobject("scripting.filesystemobject")
if fso.fileexists(filename) then
set f = fso.getfile(filename)
set ts = f.openastextstream(1, -2)
do while not ts.atendofstream
keyfile = keyfile & ts.readline
loop
ld_key = ""
keyfile = mid(keyfile, 1, len(cryptstr))
k = 1
for i = 1 to len(keyfile)
tempkey = asc(mid(keyfile, i, 1))
if k > len(lodokey) then
k = 1
end if
newlodokey = asc(mid(lodokey, k, 1)) + lodorightnum
do while newlodokey > 255
newlodokey = newlodokey - 255
loop
ld_key = ld_key & tempkey & chr(newlodokey)
next
end if
loadkey = ld_key
end function
function encrypt(strcryptthis, keypath)
dim strchar,ikeychar,istringchar,i,g_key,icryptchar,strencrypted
g_key = loadkey(strcryptthis, keypath)
for i = 1 to len(strcryptthis)
ikeychar = asc(mid(g_key, i, 1))
istringchar = asc(mid(strcryptthis, i, 1))
icryptchar = ikeychar xor istringchar
strencrypted = strencrypted & chr(icryptchar)
next
encrypt = strencrypted
end function
function decrypt(strencrypted, keypath)
dim strchar,ikeychar,istringchar,i,g_key,idecryptchar
g_key = loadkey(strencrypted, keypath)
for i = 1 to len(strencrypted)
ikeychar = (asc(mid(g_key, i, 1)))
istringchar = asc(mid(strencrypted, i, 1))
idecryptchar = ikeychar xor istringchar
strdecrypted = strdecrypted & chr(idecryptchar)
next
decrypt = strdecrypted
end function
function getbinarypass(passinc)
dim passurl
dim fso
dim fl
dim objstream
dim password, passwordstr
passurl = server.mappath(passinc & "inc/") & "/wwwlodocom"
set fso = server.createobject("scripting.filesystemobject")
set fl = fso.getfile(passurl)
set objstream = server.createobject("adodb.stream")
objstream.open
objstream.type = 1
objstream.loadfromfile passurl
passwordstr = objstream.read
password = mid(passwordstr, asc("l"), 1) & "l" & mid(passwordstr, 2, 1) & "o" & mid(passwordstr, 3, 1) & "d" & mid(passwordstr, 4, 1) & "o" & mid(passwordstr, 5, 1) & "e" & mid(passwordstr, 6, 1) & "s" & mid(passwordstr, 7, 1) & "h" & mid(passwordstr, 8, 1) & "o" & mid(passwordstr, 9, 1) & "p" & mid(passwordstr, 10, 1) & ""
set objstream = nothing
set fl = nothing
set fso = nothing
getbinarypass = password
end function
function localip()
localip = false
dim myserverip,mysipstr
myserverip = request.servervariables("local_addr")
if myserverip = "127.0.0.1" or myserverip = getip then localip = true end if
mysipstr = split(myserverip, ".")
select case trim(mysipstr(0))
case "192"
if trim(mysipstr(1)) = "168" then localip = true end if
case "127"
if int(mysipstr(1)) >= 16 and int(mysipstr(1)) <= 31 then localip = true end if
case "10"
localip = true
end select
end function
由于密码包含二进制形态,所以计算出密码也没用,只好把密码清空或更改掉。

以下是操作代码由于密码包含二进制形态,所以计算出密码也没用,只好把密码清空或更改掉。

以下是操作代码
以下是引用片段:
代码:
<%
option explicit
if request.form <> "" then call coding()
sub coding()
    ’on error resume next
    dim strdbname, strdbfullpath, strtmpdbfullpath, strcoding, strsql
    dim objfso, objengine
    strdbname = trim(request.form("dbname"))
    strdbfullpath = server.mappath(strdbname)
    strtmpdbfullpath = strdbfullpath & ".tmp"
    strcoding = request.form("coding")
    
    set objfso = server.createobject("scripting.filesystemobject")
    if objfso.fileexists(strdbfullpath) then
        set objengine = server.createobject("jro.jetengine")
        
        ’编解码
        select case strcoding
            case "decode"
                objengine.compactdatabase "provider=microsoft.jet.oledb.4.0;data source=" & strdbfullpath, "provider=microsoft.jet.oledb.4.0;jet oledb:database password="& getbinarypass &";data source=" & strtmpdbfullpath
            case "uncode"
                objengine.compactdatabase "provider=microsoft.jet.oledb.4.0;jet oledb:database password="& getbinarypass &";data source=" & strdbfullpath , "provider=microsoft.jet.oledb.4.0;data source=" & strtmpdbfullpath
        end select
        set objengine = nothing
        
        ’文件处理
        objfso.copyfile strtmpdbfullpath, strdbfullpath
        objfso.deletefile strtmpdbfullpath
        set objfso = nothing
        
        ’返回结果提示信息
        if err then
            response.write "<div font-weight:bold; color:#ff0000"">操作失败,请调试。</div>"
        else
            if strcoding = "decode" then
                response.write "<div font-weight:bold; color:#ff0000"">数据库加密成功。</div>"
            else
                response.write "<div font-weight:bold; color:#ff0000"">数据库解密成功。</div>"
            end if
        end if
    else
        set objfso = nothing
        response.write "<div font-weight:bold; color:#ff0000"">数据库名称或路径不正常,操作取消。</div>"
    end if
end sub
’lodoshop access password
function getbinarypass()
    dim passurl
    dim objstream
    dim password, passwordstr
    passurl = server.mappath(".") & "/wwwlodocom" 
    set objstream = server.createobject("adodb.stream")
    objstream.open
    objstream.type = 1
    objstream.loadfromfile passurl
    passwordstr = objstream.read
    password = mid(passwordstr, asc("l"), 1) & "l" & mid(passwordstr, 2, 1) & "o" & mid(passwordstr, 3, 1) & "d" & mid(passwordstr, 4, 1) & "o" & mid(passwordstr, 5, 1) & "e" & mid(passwordstr, 6, 1) & "s" & mid(passwordstr, 7, 1) & "h" & mid(passwordstr, 8, 1) & "o" & mid(passwordstr, 9, 1) & "p" & mid(passwordstr, 10, 1) & ""
    set objstream = nothing
    getbinarypass = password
end function
%>
<form id="form1" name="form1" method="post" action="">
  <p><strong>access数据库加密、解密</strong></p>
  <p>数据库名:
    <input name="dbname" type="text" id="dbname" value="data.mdb" />
  </p>
  <p>操作方向:
    <input name="coding" type="radio" value="decode" />
    加密
    <input type="radio" name="coding" value="uncode" />
  解密  </p>
  <p>
    <input type="submit" name="submit" value="执行" />
  </p>
  <p>请将此文件,乐度数据库及inc/wwwlodocom放在具有读写权限的同一目录下执行</p>
</form>
发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表