News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

ascii to bytes?

Started by caseys, December 28, 2010, 10:13:06 AM

Previous topic - Next topic

caseys

hey

im just wondering, what encryption method is here and how do they use that:

http://www.rdos.net/svn/tags/V8.9.2/kernel/os/rdfscryp.asm

--



CryptTab:
ct000  DB 0ECh, 043h, 087h, 083h, 080h, 009h, 07Ah, 021h
ct008  DB 011h, 0FFh, 086h, 0DEh, 0F2h, 021h, 0F1h, 0C9h
ct010  DB 001h, 067h, 00Ch, 08Ch, 017h, 066h, 0B9h, 08Fh
...




as i know there is a software bin2db which generates similiar code, but it looks like:

Quote

db 69,120,116,101,110,100,101,100,32,77,111,100,117,108,101,58
db 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32
db 32,32,32,32,32,26,70,97,115,116,84,114,97,99,107,101
...



please explain,

thanks
Uf, never been so hard to understand

caseys

by the way, this is not about the cracking or something, so please do not close this thread.



...
This program is free software; you can redistribute it and/or modify
; it under the terms of the GNU General Public License as published by
; the Free Software Foundation; either version 2 of the License, or
; (at your option) any later version. The only exception to this rule
; is for commercial usage in embedded systems. For information on
; usage in commercial embedded systems, contact embedded@rdos.net
...

Uf, never been so hard to understand

hutch--

caseys,

The link is just a large lookup table. Some encryption methods use big tables like this but there was no runtime code with it. If you need to encrypt data a few of our members know a lot about it and may be able to help you if you know what you want to do.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

caseys

im looking howto convert binary data (music for example xm file etc) to such type of code
Uf, never been so hard to understand

dedndave

if i understand your question, you want to see what these bytes mean
db 69,120,116,101,110,100,101,100,32,77,111,100,117,108,101,58
db 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32
db 32,32,32,32,32,26,70,97,115,116,84,114,97,99,107,101

it is ascii text - these lines could be used to replace those
db 'Extended Module:'
db '                '
db '     .FastTracke'


to find out - the easy way is to stick it in a small program and assemble it   :bg
then, i used a program called HxD to view the results

http://mh-nexus.de/en/downloads.php?product=HxD

another way to go, is to stick a 0 at the end and use the print macro
        .XCREF
        .NOLIST
        INCLUDE    \masm32\include\masm32rt.inc
        .LIST

        .DATA

TxtStr  db 69,120,116,101,110,100,101,100,32,77,111,100,117,108,101,58
        db 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32
        db 32,32,32,32,32,26,70,97,115,116,84,114,97,99,107,101
        db 13,10,0

        .CODE

_main   PROC

        print   offset TxtStr
        exit

_main   ENDP

        END     _main

caseys

dedndave, nice! to extract tables there is a tool named 'Table Extractor 1.34 - Thigo'.

But im looking howto convert data (for example *.XM media file) to such type of code:

DB 001h, 067h, 00Ch, 08Ch, 017h, 066h, 0B9h, 08Fh


I've been using bin2db, but its different:

DB 01, 67, 0C, 8C, 17, 66, B9, 8F

The difference is that bin2db is not adding 0 and h characters.
Uf, never been so hard to understand

dedndave

that's odd - the bintodb.exe program that is in my \masm32 folder converts it to decimal defines
there are other tools around that will convert binary files to RES or OBJ files, if you want

caseys

Uf, never been so hard to understand

dedndave

that's a nice ftp folder   :P

hutch--

Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

caseys

thanks hutch!!! =] dont you want to share a source of a new extended version?
Uf, never been so hard to understand