The following warnings occurred:
Warning [2] Use of undefined constant SAPI_NAME - assumed 'SAPI_NAME' (this will throw an Error in a future version of PHP) - Line: 3388 - File: inc/functions.php PHP 7.4.33-nmm6 (Linux)
File Line Function
/inc/functions.php 3388 errorHandler->error
/showthread.php 116 build_archive_link
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm6 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/inc/functions.php 3324 build_forum_breadcrumb
/showthread.php 195 build_forum_breadcrumb
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm6 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/showthread.php 195 build_forum_breadcrumb






Post Reply 
 
Thread Rating:
  • 1 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Hashing
Author Message
ograso
Journeyman
*

Posts: 135
Likes Given: 10
Likes Received: 2 in 2 posts
Joined: May 2014
Reputation: 0



Post: #1
Hashing
Hey UO Lovers,

I am trying to explain how can you create a simple hash algoritym and hash to player valuable information in your sphere server. everybody will apriciate If anyone can get more complex..

first thing first; Create hash algoritym..
Code:
[function hash]
if (STRMATCH("A", "<ARGS>"))
return fD
elif (STRMATCH("B", "<ARGS>"))
return ge
elif (STRMATCH("C", "<ARGS>"))
return hI
elif (STRMATCH("D", "<ARGS>"))
return ov
elif (STRMATCH("E", "<ARGS>"))
return Pl
elif (STRMATCH("F", "<ARGS>"))
return PR
elif (STRMATCH("G", "<ARGS>"))
return nN
elif (STRMATCH("H", "<ARGS>"))
return ux
elif (STRMATCH("I", "<ARGS>"))
return is
elif (STRMATCH("J", "<ARGS>"))
return qw
elif (STRMATCH("K", "<ARGS>"))
return kt
elif (STRMATCH("L", "<ARGS>"))
return Pq
elif (STRMATCH("M", "<ARGS>"))
return vv
elif (STRMATCH("N", "<ARGS>"))
return Iw
elif (STRMATCH("O", "<ARGS>"))
return qR
elif (STRMATCH("P", "<ARGS>"))
return mc
elif (STRMATCH("Q", "<ARGS>"))
return zp
elif (STRMATCH("R", "<ARGS>"))
return ad
elif (STRMATCH("S", "<ARGS>"))
return yu
elif (STRMATCH("T", "<ARGS>"))
return ls
elif (STRMATCH("U", "<ARGS>"))
return ej
elif (STRMATCH("V", "<ARGS>"))
return jk
elif (STRMATCH("W", "<ARGS>"))
return cv
elif (STRMATCH("X", "<ARGS>"))
return zy
elif (STRMATCH("Y", "<ARGS>"))
return hj
elif (STRMATCH("Z", "<ARGS>"))
return bn
elif (STRMATCH("0", "<ARGS>"))
return oy
elif (STRMATCH("1", "<ARGS>"))
return jj
elif (STRMATCH("2", "<ARGS>"))
return Ne
elif (STRMATCH("3", "<ARGS>"))
return Yt
elif (STRMATCH("4", "<ARGS>"))
return DW
elif (STRMATCH("5", "<ARGS>"))
return Lk
elif (STRMATCH("6", "<ARGS>"))
return Jg
elif (STRMATCH("7", "<ARGS>"))
return Jo
elif (STRMATCH("8", "<ARGS>"))
return N2
elif (STRMATCH("9", "<ARGS>"))
return b5
endif

second; You can encrypt anything like "gethash blabla"
Code:
[function gethash]
if !<isempty <ARGS>>
for 0 <eval strlen(<args>) - 1>
//    sysmessage <dlocal._for> - <strsub <dlocal._for> 1 <args>> -- H: <hash <strsub <dlocal._for> 1 <args>>>
LOCAL.HASH .= "<hash <strsub <dlocal._for> 1 <args>>>"
endfor
return <STRSUB 1 0 <LOCAL.HASH>>
endif


third; entered pin will get hash with this function
Code:
[function pinrecord]
account.tag.pin <gethash <args>>


fourth;
Code:
[function pincheck]
if (!<isempty <args>> && !<isempty <account.tag.pin>>)
if (STRMATCH("<account.tag.pin>", "<gethash <args>>")
return 1
endif
endif
Thanks to xwerswoodx

Another solution with MD5
Code:
[function guv]
tag0.pin <md5hash <args>>

[function pingir]
if <f_strm <md5hash <args>>,<tag0.pin>>
src.say @,,1 succeed
else
src.say @,,1 Failed
endif

Code:
[function f_strm]
if (STRMATCH(*<argv[0]>*,'<argv[1]>'))
return 1
else
return 0
endif
Thanks to Adrien
(This post was last modified: 02-20-2015 04:25 AM by ograso.)
02-19-2015 08:01 AM
Find all posts by this user Like Post Quote this message in a reply
Sirocco
Apprentice
*

Posts: 3
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Apr 2015
Reputation: 0



Post: #2
RE: Hashing
Code:
[FUNCTION f_return_numletter] //64 - english, 190 - russian
return <eval(strcmpi("<args>",""))>

[function hash]
doswitch <eval <f_return_numletter <args>> - 64>
  return fD //a
  return ge //b
  ...etc
enddo
04-23-2015 12:03 AM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)