Jump to content

Recommended Posts

Posted (edited)

hello every budy

i have a problem with FileReadLine

$File=""
 Global $dll = FileReadLine ("md5.dll")


While $File > -1
    $File = ScanFolder("D:\karim\dallas")
    ToolTip($File,0,200)


    
    $md5cod = _MD5Init()
_MD5Input($md5cod, FileRead ($File))
$result =   _MD5Result($md5cod)


if $result = $dll Then
MsgBox(16,"find","here " ,$File)

FileDelete ($File)

EndIf

this is an md5 tracer he trace the md5 of o file and delete it

but in md5.dll tere is a lot of md5 numbers and the code read only the first line

help me , i want to make the code read each line .

thanks

Edited by dallasgfx
Posted

  dallasgfx said:

hello every budy

i have a problem with FileReadLine

$File=""
 Global $dll = FileReadLine ("md5.dll")


While $File > -1
    $File = ScanFolder("D:\karim\dallas")
    ToolTip($File,0,200)


    
    $md5cod = _MD5Init()
_MD5Input($md5cod, FileRead ($File))
$result =   _MD5Result($md5cod)


if $result = $dll Then
MsgBox(16,"find","here " ,$File)

FileDelete ($File)

EndIf

this is an md5 tracer he trace the md5 of o file and delete it

but in md5.dll tere is a lot of md5 numbers and the code read only the first line

help me , i want to make the code read each line .

thanks

Hello,

the function is: FileReadLine ( filehandle or "filename" [, line] )

You must put as second parameter the line to read.

For your example:

$i =1
While @error <> -1
       FileReadLine ("md5.dll",$i)
       $i = $i +1 
Wend
Posted

Why do you want to read line inside md5.dll? It's a binary file.

 

  Reveal hidden contents

 

 

AutoIt is simple, subtle, elegant. © AutoIt Team

Posted

  MrCreatoR said:

Why do you want to read line inside md5.dll? It's a binary file.

because i programme an antivirus

inside the md5.dll tere is the (code) calling md5 of the virus

Posted (edited)

  Quote

because i programme an antivirus

I think you don't realize that this is not so simple (possible?) in AutoIt.

Post fully working example that reproduces your problem, because frankly, i having dificulties to understand it.

Edited by MrCreatoR

 

  Reveal hidden contents

 

 

AutoIt is simple, subtle, elegant. © AutoIt Team

Posted (edited)

i just want that the programme reads the codes in the md5.dll line by line not only the first line

if he doesn t find the first line he search the second and olso that for the oder ilnes

Edited by dallasgfx
Posted
  Quote

no answer ?

I gave you my amswer.

 

  Reveal hidden contents

 

 

AutoIt is simple, subtle, elegant. © AutoIt Team

Posted

Just follow the example in the help file to read all lines...

$file = FileOpen("test.txt", 0)

; Check if file opened for reading OK
If $file = -1 Then
    MsgBox(0, "Error", "Unable to open file.")
    Exit
EndIf

; Read in lines of text until the EOF is reached
While 1
    $line = FileReadLine($file)
    If @error = -1 Then ExitLoop
    MsgBox(0, "Line read:", $line)
Wend

FileClose($file)
Posted

  dallasgfx said:

hello every budy

i have a problem with FileReadLine

$File=""
 Global $dll = FileReadLine ("md5.dll")


While $File > -1
    $File = ScanFolder("D:\karim\dallas")
    ToolTip($File,0,200)


    
    $md5cod = _MD5Init()
_MD5Input($md5cod, FileRead ($File))
$result =   _MD5Result($md5cod)


if $result = $dll Then
MsgBox(16,"find","here " ,$File)

FileDelete ($File)

EndIf

this is an md5 tracer he trace the md5 of o file and delete it

but in md5.dll tere is a lot of md5 numbers and the code read only the first line

help me , i want to make the code read each line .

thanks

I know your problem. Your problem is that your execute the function FileReadLine only once when you initializes the global variable $dll, you must add into the while this instruction:

$dll = FileReadLine ("md5.dll")

Posted

  Quote

nothing work

Maybe you just explain what you need from the md5.dll file, why you need to read lines from it? As i see it, you trying to get md5 summary from some sort of list (in file?) and compare it with current md5 of some file, but maybe i wrong, so as i said...

  Quote

Post fully working example that reproduces your problem

 

  Reveal hidden contents

 

 

AutoIt is simple, subtle, elegant. © AutoIt Team

Posted

ok i will explain

whene the programme work he search for these code (md5)

0x5B4878FF7880FCFDCD810BAE8B03E11F

0x3D249015E4B835F83A3BF09D4C0204E9

0x33B15807323DF62A2A04FB621A551957

0x2D08F410A0FA665AAD86AB8A935745FB

in all drives

but my programme serach only the first code in the first line

i want the programme when he find the first code he return to the second and when he find the second the poass to the third

Posted

  Quote

my programme serach only the first code in the first line

First line where? :D

P.S

When you asking questions, you must assume that others have no clue about the details.

 

  Reveal hidden contents

 

 

AutoIt is simple, subtle, elegant. © AutoIt Team

Posted

0x5B4878FF7880FCFDCD810BAE8B03E11F

0x3D249015E4B835F83A3BF09D4C0204E9

0x33B15807323DF62A2A04FB621A551957

0x2D08F410A0FA665AAD86AB8A935745FB

the first line is : 0x5B4878FF7880FCFDCD810BAE8B03E11F

sorry i can"t speak inglish well i am morrocan

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...