PDA

View Full Version : ASP Site Admin App.


Dubie
09.04.2005, 03:44
Sup all,

Trying to allow users from the DB to login and see misc stuff about thier Chars & Accounts

Ok, I'm having some real problems with this script .
I'll try to keep it as simple as I can.

I'm doing an authentication script, the complication lies in that the passwords I need to authenticate are stored in the SQL database as binary objects.

I've successfully hunted down several functions that convert binary data to string, so that I can compare with form input.

However, it seems the database is Korean, or something, because the output looks like this when I convert from binary to string form:
5ÀáuÄk´¥ ˆ Oˆw»»

Not sure what is going wrong here at all.
This is what I need some help on.

However the password is (originally) in english...

So, is there any way without a component to convert that to normal charset? A couple of the functions had a charset option, I tried 'us-ascii' and 'utf-8' but neither worked.

Any help is appreciated, if more details are needed, here's all the functions I tried below:

Function Stream_BinaryToString(Binary, CharSet)
Const adTypeText = 2
Const adTypeBinary = 1

'Create Stream object
Dim BinaryStream 'As New Stream
Set BinaryStream = CreateObject("ADODB.Stream")

'Specify stream type - we want To save text/string data.
BinaryStream.Type = adTypeBinary

'Open the stream And write text/string data To the object
BinaryStream.Open
BinaryStream.Write Binary


'Change stream type To binary
BinaryStream.Position = 0
BinaryStream.Type = adTypeText

'Specify charset For the source text (unicode) data.
If Len(CharSet) > 0 Then
BinaryStream.CharSet = CharSet
Else
BinaryStream.CharSet = "us-ascii"
End If

'Open the stream And get binary data from the object
Stream_BinaryToString = BinaryStream.ReadText
End Function
Function BinToText(varBinData, intDataSizeInBytes) ' as String
Const adFldLong = &H00000080
Const adVarChar = 200
Set objRS = Server.CreateObject("ADODB.Recordset")

objRS.Fields.Append "txt", adVarChar, intDataSizeInBytes, adFldLong
objRS.Open

objRS.AddNew
objRS.Fields("txt").AppendChunk varBinData
BinToText = objRS("txt").Value

objRS.Close
Set objRS = Nothing
End Function
Function BinaryToString(Binary)
Dim cl1, cl2, cl3, pl1, pl2, pl3
Dim L
cl1 = 1
cl2 = 1
cl3 = 1
L = LenB(Binary)

Do While cl1<=L
pl3 = pl3 & Chr(AscB(MidB(Binary,cl1,1)))
cl1 = cl1 + 1
cl3 = cl3 + 1
If cl3>300 Then
pl2 = pl2 & pl3
pl3 = ""
cl3 = 1
cl2 = cl2 + 1
If cl2>200 Then
pl1 = pl1 & pl2
pl2 = ""
cl2 = 1
End If
End If
Loop
BinaryToString = pl1 & pl2 & pl3
End Function

We can change anyone password that is not a problem, its trying to compare it to the old one that is stoping us for allowing ppl to login that are players in the DB.

Would appreciate any input on this problem

Thanks for your time,
Dubie

Dubie
09.04.2005, 08:16
Ran into another lil problem so I thought I would just post it with this.
When I edit a char it adds everything fine.
But it requires a restart of the server for the changes to take place.
I thought if you updated with script it was instant change and if you used MSSQL EM with would require a restart of server to take effect.

Well the ban is instant no reboot required.
Just seems like the items are all cached so its not allowing me to add to it till its all cleared out or some shit.

Any idea on what I can do to make it update the DB with out a restart?
I will post some screenshots later on when I get some more options added on it. Hopefully these 2 thing can be worked out.
If the first one can not then its cool it will just be an Admin only app.
You can:
Ban
Remove Items
Remover Skills
Remove Chars
Add Items To:
Chars backpack & Warehouse
Also Chars Clan warehouse
View Items
View Skills
Password changer
So on
More options to come.
Easy to use and easy to setup
No .Net Required
All ASP

Thanks for your time,
Dubie

Nya-o
09.04.2005, 22:19
well, i use l2admin and it does almost everything realtime (except for character parameters like class or sex......).
the only thing that is worth telling is that the character you changing must be logged off or the changes won't work X_X, so try changing offline players' data.......

fitz_roy
09.04.2005, 22:47
well, i use l2admin and it does almost everything realtime (except for character parameters like class or sex......).
the only thing that is worth telling is that the character you changing must be logged off or the changes won't work X_X, so try changing offline players' data.......

l2admin is way too buggy for my taste.
It requires lots of recourses which makes it virtually unusable for large servers.
Plus, i never made it to work 100%. There were always things missing, SQL errors, crashes etc.

Gave up on it long time ago. Looking forward to checking out whatever alternatives there can be. :)

Dubie
09.04.2005, 23:23
Some one said I should look into trying to write to the cache memory and inject it in that way so it would pick it up.
Not sure if that is even a doable way.

Other one is to maybe crack open cached.exe and see how its calling items from the memory or what ever.

or

Run a sniffer and see how the items are getting adding in realtime then try to write an app that would work the same way.

These are all just ideas tho so, if someone else has something they think I should try then by all means please post it up.

Thanks for your time,
Dubie