The MASM Forum Archive 2004 to 2012
Welcome, Guest. Please login or register.
December 07, 2022, 03:21:09 AM

Login with username, password and session length
Search:     Advanced search
128553 Posts in 15254 Topics by 684 Members
Latest Member: mottt
* Home Help Search Login Register
+  The MASM Forum Archive 2004 to 2012
|-+  Project Support Forums
| |-+  MASM32
| | |-+  ascii to bytes?
« previous next »
Pages: [1] Print
Author Topic: ascii to bytes?  (Read 7194 times)
caseys
Asm Beginner
Member
****
Gender: Male
Posts: 59


Level -3 Asm Coder


ascii to bytes?
« on: December 28, 2010, 10:13:06 AM »

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

--

Code:

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
Logged

Uf, never been so hard to understand
caseys
Asm Beginner
Member
****
Gender: Male
Posts: 59


Level -3 Asm Coder


Re: ascii to bytes?
« Reply #1 on: December 28, 2010, 10:18:09 AM »

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

Code:

...
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
...

Logged

Uf, never been so hard to understand
hutch--
Administrator
Member
*****
Posts: 12013


Mnemonic Driven API Grinder


Re: ascii to bytes?
« Reply #2 on: December 28, 2010, 11:24:18 AM »

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.
Logged

Regards,



Download site for MASM32
http://www.masm32.com
caseys
Asm Beginner
Member
****
Gender: Male
Posts: 59


Level -3 Asm Coder


Re: ascii to bytes?
« Reply #3 on: December 28, 2010, 01:27:56 PM »

im looking howto convert binary data (music for example xm file etc) to such type of code
Logged

Uf, never been so hard to understand
dedndave
Member
*****
Posts: 12523


Re: ascii to bytes?
« Reply #4 on: December 28, 2010, 02:02:40 PM »

if i understand your question, you want to see what these bytes mean
Code:
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
Code:
db 'Extended Module:'
db '                '
db '     .FastTracke'

to find out - the easy way is to stick it in a small program and assemble it   BigGrin
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
Code:
        .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
Logged
caseys
Asm Beginner
Member
****
Gender: Male
Posts: 59


Level -3 Asm Coder


Re: ascii to bytes?
« Reply #5 on: December 28, 2010, 02:25:47 PM »

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:

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


I've been using bin2db, but its different:

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

The difference is that bin2db is not adding 0 and h characters.
Logged

Uf, never been so hard to understand
dedndave
Member
*****
Posts: 12523


Re: ascii to bytes?
« Reply #6 on: December 28, 2010, 02:31:17 PM »

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
Logged
caseys
Asm Beginner
Member
****
Gender: Male
Posts: 59


Level -3 Asm Coder


Re: ascii to bytes?
« Reply #7 on: December 28, 2010, 02:39:00 PM »

yay!! finally i found it :} -> ftp://ftp.sac.sk/pub/sac/utilprog/bin2asm.zip
Logged

Uf, never been so hard to understand
dedndave
Member
*****
Posts: 12523


Re: ascii to bytes?
« Reply #8 on: December 28, 2010, 02:54:49 PM »

that's a nice ftp folder   Tongue
Logged
hutch--
Administrator
Member
*****
Posts: 12013


Mnemonic Driven API Grinder


Re: ascii to bytes?
« Reply #9 on: December 28, 2010, 09:54:24 PM »

caseys,

Try this one, multiple formats supported.

http://www.masm32.com/board/index.php?topic=15154.0
Logged

Regards,



Download site for MASM32
http://www.masm32.com
caseys
Asm Beginner
Member
****
Gender: Male
Posts: 59


Level -3 Asm Coder


Re: ascii to bytes?
« Reply #10 on: December 29, 2010, 05:31:16 PM »

thanks hutch!!! =] dont you want to share a source of a new extended version?
Logged

Uf, never been so hard to understand
Pages: [1] Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP The MASM Forum Archive 2004 to 2012 | Powered by SMF 1.0.12.
© 2001-2005, Lewis Media. All Rights Reserved.
Valid XHTML 1.0! Valid CSS!