Sign in to follow this  
Followers 0
PantZ4

String to hex problem

4 posts in this topic

#1 ·  Posted (edited)

Ok I got this program I wanna to create a exe when excuted.

So I have taken my exe file and convert it to a txt file so I can see the ANSI strings.

So I thougt I was clever and then do the _StringtoHex command. Here is my srcipt

#include <string.au3>
#include <file.au3>

$File = FileOpen("testexe.txt",0)
$String = FileRead($File)
FileClose($File)
$Hex = _StringToHex($String)
_FileCreate(@workingdir & "\hex.txt")
$File = FileOpen(@workingdir & "\hex.txt",2)
FileWrite($File,$Hex)
FileClose($File)

But its creating a emtpy txt file... :lmao:.

Why does it not work?

Thank You :ph34r:

Ps. How do you count the lines in a file?

Edited by Mr. Zero

Share this post


Link to post
Share on other sites



Ok I got this program I wanna to create a exe when excuted.

So I have taken my exe file and convert it to a txt file so I can see the ANSI strings.

So I thougt I was clever and then do the _StringtoHex command. Here is my srcipt

#include <string.au3>
#include <file.au3>

$File = FileOpen("testexe.txt",0)
$String = FileRead($File)
FileClose($File)
$Hex = _StringToHex($String)
_FileCreate(@workingdir & "\hex.txt")
$File = FileOpen(@workingdir & "\hex.txt",2)
FileWrite($File,$Hex)
FileClose($File)oÝ÷ Ø­Û­æ­xzkiÊÜm~)^èV'hzÈ­p¢¹©äb¿ªê-x{¡ée£¡Êz-ë-ºÇWËZS«v¨ºØbL¨¹Æ§©{·öÊ')bëaÄèj{0z»az«¨¶ènW¦ªê-{ayÊ{br¬Z²n¶*'¶¼­+ºÚ"µÍÌÍÑ[HH    ÌÎNÕÝ^IÌÎNÂÌÍÜÔÝ[ÈH^
[TÝ[Ê[TXY
    ÌÍÙ[JJJB[PÛÜÙJ[SÜ[   ÌÎNÚ^Y   ÌÎNËJB[UÜ]J ÌÎNÚ^Y   ÌÎNË ÌÍÜÔÝ[ÊJ

[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Why not just use FileInstall()?

Because I wanna the file to be in the exe so I don't have to use rar files or something like that...

Ps. How do you count the lines in a file?

Edited by Mr. Zero

Share this post


Link to post
Share on other sites

Because I wanna the file to be in the exe so I don't have to use rar files or something like that...

Ps. How do you count the lines in a file?

Have you bothered to look at any of the File topics in the help file, you'd be amazed at how quick that answer pops out at you.

[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0