Jump to content

DEE - Dll Exports Viewer


monoceres
 Share

Recommended Posts

Hi!

I have in the last couple of days read about the windows portable executable format (PE format) and this is the result.

It's a program that lists all the exported functions in a dll and gives you the option to google search the function or if it's a windows function, go directly to the msdn page.

I'm very happy about the function that gets the exported functions, only one DllCall and the rest is DllStructs and Pointers :)

Here's a screenshot:

Posted Image

Download link:

http://monoceres.se/Uploads/DEE.zip

Enjoy! >_<

Edited by monoceres

Broken link? PM me and I'll send you the file!

Link to comment
Share on other sites

Hi

:) it's amazing..

I really like it and will use it!

Thx monoceres

go on and don't stop:)

one question:

what do you think if you can change the height of the form in order to see much more items in the list?

dworldI'm new in autoit, but I like it. My mind is open to the new things.

Link to comment
Share on other sites

Thanks everyone >_<

I don't about the resource dll, but it may crash if there isn't an export data directory in the file.

I guess I could make the GUI resizeable, but the GUI really come in second here, really don't like working with GUI programming :)

Broken link? PM me and I'll send you the file!

Link to comment
Share on other sites

  • Moderators

Nice work monoceres... I could have sword someone else just did this not to long ago... maybe that was for constants.

Now get to work on creating the call to those functions found on MSDN (Creating the structs, proper DllCall() setup ... etc ) >_< :)

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.

Link to comment
Share on other sites

Very good monoceres. The structures look quite painful!

Is it possible to show whether each function is an export function or not? That would be useful for checking your own dlls.

If you could say whether a function should be called with cdecl or if it's a stdcall it would be great. Is that possible?

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Link to comment
Share on other sites

Nice work monoceres... I could have sword someone else just did this not to long ago... maybe that was for constants.

Now get to work on creating the call to those functions found on MSDN (Creating the structs, proper DllCall() setup ... etc ) o:) >_<

Hope not, it's always cool to be the first :)

Actually I have thought of that, actually everytime I'm creating a struct that contains a lot of members I'm thinking about creating a script that would translate the c++ definition into autoit. Maybe one day...

Very good monoceres. The structures look quite painful!

Is it possible to show whether each function is an export function or not? That would be useful for checking your own dlls.

If you could say whether a function should be called with cdecl or if it's a stdcall it would be great. Is that possible?

Actually it wasn't too bad, I wrote the entire thing in c++ first and then just translated the whole thing :idiot:

All functions listed are exports, exported functions are the only one you can get from a dll. And I don't think the calling convention is retrievable, never seen it in any other export viewer anyway.

:P

Edited by monoceres

Broken link? PM me and I'll send you the file!

Link to comment
Share on other sites

Great work again. I was just playing with it for a few minutes and it seems to work fine adding *.ocx into the file types as well. More testing may be required to verify that though.

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Link to comment
Share on other sites

Great work again. I was just playing with it for a few minutes and it seems to work fine adding *.ocx into the file types as well. More testing may be required to verify that though.

Great, it seems to work, at least with the two .ocx files I could find on my computer :)

Can we find the parameters needed for each function ?

It is not possible to get this information from the dll, your best shot is to do a google search.

Broken link? PM me and I'll send you the file!

Link to comment
Share on other sites

it's good, very nice one...

Website: www.cerescode.comForum: www.forum.cerescode.comIRC: irc.freenode.net , Channel: #Ceres--------------------Autoit Wrappers, Great additions to your script (Must See) (By: Valuater)Read It Befor Asking Question Click Here...--------------------Join Monoceres's Forums http://www.monoceres.se--------------------There are three kinds of people: Those who make things happen, those who watch things happen, and those who ask, ‘What happened?’” –Casey Stengel
Link to comment
Share on other sites

Updated the script.

Changes:

  • Added Commandline tool
  • Added resizeable height
  • More checks to avoid crashes
  • .ocx is now available to open

:)

Looking good.

I'v been playing with commandline version and made some changes that makes it more user friendy (lol). This is only about user - program relation (communication) and has nothing to do with real program.

I'v added interactive mode that makes it unnotlikeable (actually heard this word once).

Check it out (I did not see this feature with any AutoIt's CUI):

#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Version=beta
#AutoIt3Wrapper_Icon=icon.ico
#AutoIt3Wrapper_Outfile=DEEcmd_alt.exe
#AutoIt3Wrapper_UseUpx=n
#AutoIt3Wrapper_Change2CUI=y
#AutoIt3Wrapper_Res_Description=DEE - Dll Exports Viewer CommandLine version
#AutoIt3Wrapper_Res_Fileversion=1.0.0.0
#AutoIt3Wrapper_Res_Language=1033
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#include <array.au3>
#include "dllexports.au3"
#NoTrayIcon

If $CmdLine[0] = 0 Then
    InteractiveMode()
EndIf

If $CmdLine[1] = "-help" Or $CmdLine[1] = "?" Then
    ConsoleWrite(@CRLF & 'DEEcmd usage:           path [/a]' & @CRLF & @CRLF)
    ConsoleWrite("    path         fully qualified path to the dll or ocx file" & @CRLF & "    /a           prints the address of each exported function (optional)" & @CRLF)
    ConsoleWrite(@CRLF & @CRLF & 'Description:' & @CRLF)
    ConsoleWrite('    This command line tool enables you to list all exported functions' & @CRLF & '    for the specified dll or ocx file' & @CRLF)
    Exit
Else
    $printaddress = False
    If $CmdLine[0] > 1 And $CmdLine[2] = "/a" Then $printaddress = True
    
    If StringRight($CmdLine[1], 4) = '.dll' Or StringRight($CmdLine[1], 4) = '.ocx' Then
        $array = _GetExportedFunctions($CmdLine[1])
        If Not IsArray($array) Then
            ConsoleWrite(@CRLF & "Invalid file!" & @CRLF)
            Exit
        EndIf
    Else
        ConsoleWrite(@CRLF & "Invalid input. Type ? for help." & @CRLF)
        Exit
    EndIf
    For $i = 0 To UBound($array) - 1
        ConsoleWrite($array[$i][0])
        If $printaddress Then ConsoleWrite(" (" & $array[$i][1] & ")")
        ConsoleWrite(@CRLF)
    Next
    Exit
EndIf


Func InteractiveMode()
    
    ConsoleWrite(@CRLF & "Dll Exports Viewer >")

    $file = FileOpen("con", 4)

    While 1

        $line = BinaryToString(FileRead($file, 123))

        Switch $line
            
            Case "quit" & @CRLF, "exit" & @CRLF
                Exit
            Case "-help" & @CRLF, "?" & @CRLF
                ConsoleWrite(@CRLF & 'DEEcmd usage:           path [/a]' & @CRLF & @CRLF)
                ConsoleWrite("    path         fully qualified path to the dll or ocx file" & @CRLF & "    /a           prints the address of each exported function (optional)" & @CRLF)
                ConsoleWrite(@CRLF & @CRLF & 'Description:' & @CRLF)
                ConsoleWrite('    This command line tool enables you to list all exported functions' & @CRLF & '    for the specified dll or ocx file' & @CRLF)
            Case Else
                $printaddress = False
                $line = StringTrimRight($line, 2)
                $in = StringRegExpReplace($line, '(.*?) {1}/a\Z', '$1')
                If StringRight($line, 2) = '/a' Then $printaddress = True
                
                If StringRight($in, 4) = '.dll' Or StringRight($in, 4) = '.ocx' Then
                    $array = _GetExportedFunctions($in)
                    If Not IsArray($array) Then ConsoleWrite(@CRLF & "Invalid file!" & @CRLF)
                Else
                    $array = 0
                    ConsoleWrite(@CRLF & "Invalid input. Type ? for help." & @CRLF)
                EndIf
                
                For $i = 0 To UBound($array) - 1
                    ConsoleWrite($array[$i][0])
                    If $printaddress Then ConsoleWrite(" (" & $array[$i][1] & ")")
                    ConsoleWrite(@CRLF)
                Next
                
        EndSwitch

        ConsoleWrite(@CRLF & "Dll Exports Viewer >")

    WEnd

EndFunc

When compiled, it can be used like before or in this new mode (doubleclick it, or call it with no parameers from command prompt). Left AutoIt3Wrapper_GUI directives.

btw, still crashing when loaded with resource-only dll.

♡♡♡

.

eMyvnE

Link to comment
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
 Share

  • Recently Browsing   0 members

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