• Earn real money by being active: Hello Guest, earn real money by simply being active on the forum — post quality content, get reactions, and help the community. Once you reach the minimum credit amount, you’ll be able to withdraw your balance directly. Learn how it works.

AutoIT Funcion Get_EOF Sin Estructuras "End of File"

Status
Not open for further replies.

Expermicid

Leech
User
Joined
Oct 23, 2011
Messages
285
Reputation
0
Reaction score
255
Points
63
Credits
0
‎13 Years of Service‎
95%
[lenguaje=autoit]#cs -------------------------------------------------------

AutoIt Version: 3.3.8.1

Author..........: Pink

Script Function...: Get_EOF

Uso..............: Get_EOF(Runta Archuivo)

Retorna : "Posicion EOF"

#ce ------------------------------------

;Ejemplo

local $myfile="C:\Users\Usuario\Desktop\Anotador.exe"

msgbox(0,"",Get_EOF($myfile))

Func Get_EOF($file)

Const $l_fanew=60

Const $PEsize=4

Const $I_F_H=20

const $SizeS =40

local $LFvalue ;offset Entrada IMAGE_NT_HEADERS firma PE

local $Size_O_H ;izeOfOptionalHeader

local $NofS ;NumberOfSections

local $fin_I_S_H ;IMAGE_SECTION_HEADER

;leyendo archivo y cargando buffer

$hfile=fileopen($file)

$binary=fileread($hfile,1000)

;offset Entrada IMAGE_NT_HEADERS firma PE

$LFvalue=binarymid($binary,$l_fanew+1,4)

$LFvalue=Dec(OLE(Stringreplace($LFvalue,"0x","",1,0)))

;NumberOfSections

$NofS=$LFvalue+$PEsize+2

$NofS=BinaryMid($binary,($NofS+1),2)

$NofS=Dec(OLE(Stringreplace($NofS,"0x","",1,0)))

;Tamaño SizeOfOptionalHeader

$Size_O_H=$LFvalue+$PEsize+16

$Size_O_H=BinaryMid($binary,($Size_O_H+1),2)

$Size_O_H=dec(OLE(StringReplace($Size_O_H,"0x","",1,0)))

$fin_I_S_H=($LFvalue+$PEsize+$I_F_H+$Size_O_H)+($NofS*$SizeS)

$RawSize=binarymid($binary,$fin_I_S_H-24,4)

$RawSize=dec(StringReplace($RawSize,"0x","",1,0))

$RawOffset=binarymid($binary,$fin_I_S_H-20,4)

$RawOffset=dec(StringReplace($RawOffset,"0x","",1,0))

fileclose($hfile)

return $RawSize+$RawOffset

EndFunc

;Funcion OLE "Orden Little Endian"

Func OLE($Var)

Local $len=stringlen($Var)/2

local $Array[$len+1]

local $Char

local $A=1

local $Result

for $i= 1 to $len

$Char=stringmid($Var,$A,2)

$A+=2

$Array[$i]=$Char

next

for $x = $len to 1 Step -1

$Result&=$Array[$x]

Next

Return $Result

EndFunc [/lenguaje]

Autor: Pink

Saludos

 
Last edited by a moderator:
Please note, if you want to make a deal with this user, that it is blocked.
Re: Funcion Get_EOF Sin Estructuras "End of File"

expermicid amigo pa que sirve ese?

 
Status
Not open for further replies.
Back
Top