Convert Binary to String

前端 未结 4 1679
情话喂你
情话喂你 2021-01-03 16:57

I want to convert a password which is stored in binary to normal ASCII form so that i can read it. I need a VBscript for that and script should also return this de-crypted p

4条回答
  •  借酒劲吻你
    2021-01-03 17:11

    There are so many ways.

    If it's a binary reg value then from Help (you did read it, didn't you)

    The RegRead method returns values of the following five types.

    Type  Description  In the Form of  
    REG_SZ
     A string
     A string
    
    REG_DWORD
     A number
     An integer
    
    REG_BINARY
     A binary value
     A VBArray of integers
    
    REG_EXPAND_SZ
     An expandable string (e.g., "%windir%\\calc.exe")
     A string
    
    REG_MULTI_SZ
     An array of strings
     A VBArray of strings
    

    If a string, split on space (gives you an array of strings). The least significant bit is 2^0, 2^1, ..., 2^7.


    EDIT


    The normal way, not the only way though, to store a password, is to dump it in the registry.

    Reading it gives you an array, not a scalar variable. So ...

    The second method, handles cases where it's stored in a file.

提交回复
热议问题