[python-win32] WinAppDbg 1.4 is out!

2010-08-24 Thread Mario Vilas
What is WinAppDbg?
==

The WinAppDbg python module allows developers to quickly code instrumentation
scripts in Python under a Windows environment.

It uses ctypes to wrap many Win32 API calls related to debugging, and provides
an object-oriented abstraction layer to manipulate threads, libraries and
processes, attach your script as a debugger, trace execution, hook API calls,
handle events in your debugee and set breakpoints of different kinds (code,
hardware and memory). Additionally it has no native code at all, making it
easier to maintain or modify than other debuggers on Windows.

The intended audience are QA engineers and software security auditors wishing to
test / fuzz Windows applications with quickly coded Python scripts. Several
ready to use utilities are shipped and can be used for this purposes.

Current features also include disassembling x86 native code (using the open
source diStorm project, see http://ragestorm.net/distorm/), debugging multiple
processes simultaneously and produce a detailed log of application crashes,
useful for fuzzing and automated testing.


What's new in this version?
===

In a nutshell...

 * fully supports Python 2.4 through 2.7
 * fully supports Windows XP through Windows 7, 32 and 64 bit editions
 * crash report tool now supports MSSQL (requires pyodbc)
 * now supports downloading debugging symbols from Microsoft (thanks Neitsa!)
 * new tool: sehtest.py (Windows SEH buffer overflow jump address bruteforcer,
   inspired by the same tool by Nicolas Economou)
 * the tutorial is now available in chm and pdf formats
 * now with only one MSI installer for all supported Python versions
 * added support for diStorm 3 (falls back to the old version if not found)
 * now using cerealizer instead of pickle whenever possible
 * added new command to the command line debugger to show the SEH chain
 * a few more anti-anti-debug tricks were added, still more to go!
 * several improvements to the Window instrumentation classes
 * more code examples
 * more Win32 API wrappers
 * lots of miscellaneous improvements, more documentation and bugfixes as usual!

Entire changelog for all versions (slow!):

  http://p.sf.net/winappdbg/changelog


Where can I find WinAppDbg?
===

Project homepage:
-

http://tinyurl.com/winappdbg

Download links:
---

  Windows installer (32 bits)

http://sourceforge.net/projects/winappdbg/files/WinAppDbg/1.4/winappdbg-1.4.win32.exe/download

http://sourceforge.net/projects/winappdbg/files/WinAppDbg/1.4/winappdbg-1.4.win32.msi/download

  Windows installer (64 bits)

http://sourceforge.net/projects/winappdbg/files/WinAppDbg/1.4/winappdbg-1.4.win-amd64.exe/download

http://sourceforge.net/projects/winappdbg/files/WinAppDbg/1.4/winappdbg-1.4.win-amd64.msi/download

  Source code

http://sourceforge.net/projects/winappdbg/files/WinAppDbg/1.4/winappdbg-1.4.zip/download

http://sourceforge.net/projects/winappdbg/files/WinAppDbg/1.4/winappdbg-1.4.tar.bz2/download

Documentation:
--

  Online
http://winappdbg.sourceforge.net/doc/v1.4/tutorial
http://winappdbg.sourceforge.net/doc/v1.4/reference

  For download

http://sourceforge.net/projects/winappdbg/files/WinAppDbg/1.4/winappdbg-tutorial-1.4.chm/download

http://sourceforge.net/projects/winappdbg/files/WinAppDbg/1.4/winappdbg-reference-1.4.chm/download

http://sourceforge.net/projects/winappdbg/files/WinAppDbg/1.4/winappdbg-tutorial-1.4.pdf/download

http://sourceforge.net/projects/winappdbg/files/WinAppDbg/1.4/winappdbg-reference-1.4.pdf/download
___
python-win32 mailing list
python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32


[python-win32] Client side COM problems with ByRef parameters

2010-08-24 Thread mark ferguson
I'm trying to drive an application via it's COM interface but I am having
trouble with ByRef parameters.

The method I'm having trouble with, in VB, is:
Public Function GetVuserTypeLicenseLimit( ByVal strVuserType As String,
ByRef pRetLimit As Long ) As Long

translating this into python as:
a = o.GetVuserTypeLicenseLimit(userType)

gives me:

com_error: (-2147352561, 'Parameter not optional.', None, None)

Now, I played about with the .py file generated by makepy to see if I could
persuade it to play nicely but nothing affected the result. Eventually I
changed the .py file so that the interface was:

def xxGetVuserTypeLicenseLimit(self, strVuserType=defaultNamedNotOptArg,
pRetLimit=defaultNamedNotOptArg):
Get the License limit for the Vuser Type 
return self._oleobj_.InvokeTypes(8, LCID, 1, (3, 0), ((8, 1),
(16387, 0)),strVuserType
, pRetLimit)

and it still didn't change anything! I'd have expected an 'Attribute Error'
or something like that as I've changed the method name. As a last resort I
deleted the contents of the gen_py directory, still with no effect. So, I'm
left thinking that this type lib can't or won't use the win32com magic
Dispatch support and it's falling back to dynamic support. Can anyone
suggest what's actually happening here, and any way forward?

For completeness, the entire script is:

import win32com.client
lr = win32com.client.Dispatch(wlrun.LrEngine)
lr.ShowMainWindow(True) # - works fine, application pops up ok.
webVusers = lr.GetVuserTypeLicenseLimit(QTWeb) # :-(
print webVusers


Thanks,

Mark.
___
python-win32 mailing list
python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32


Re: [python-win32] WinAppDbg 1.4 is out!

2010-08-24 Thread Aleksandr Yampolskiy
How is it different from pydbg?
Sent from my Blackberry handheld.

- Original Message -
From: Mario Vilas mvi...@gmail.com
To: bugt...@securityfocus.com bugt...@securityfocus.com; 
full-disclos...@lists.grok.org.uk full-disclos...@lists.grok.org.uk; 
Python-Win32 List python-win32@python.org
Sent: Tue Aug 24 09:00:59 2010
Subject: WinAppDbg 1.4 is out!

What is WinAppDbg?
==

The WinAppDbg python module allows developers to quickly code instrumentation
scripts in Python under a Windows environment.

It uses ctypes to wrap many Win32 API calls related to debugging, and provides
an object-oriented abstraction layer to manipulate threads, libraries and
processes, attach your script as a debugger, trace execution, hook API calls,
handle events in your debugee and set breakpoints of different kinds (code,
hardware and memory). Additionally it has no native code at all, making it
easier to maintain or modify than other debuggers on Windows.

The intended audience are QA engineers and software security auditors wishing to
test / fuzz Windows applications with quickly coded Python scripts. Several
ready to use utilities are shipped and can be used for this purposes.

Current features also include disassembling x86 native code (using the open
source diStorm project, see http://ragestorm.net/distorm/), debugging multiple
processes simultaneously and produce a detailed log of application crashes,
useful for fuzzing and automated testing.


What's new in this version?
===

In a nutshell...

 * fully supports Python 2.4 through 2.7
 * fully supports Windows XP through Windows 7, 32 and 64 bit editions
 * crash report tool now supports MSSQL (requires pyodbc)
 * now supports downloading debugging symbols from Microsoft (thanks Neitsa!)
 * new tool: sehtest.py (Windows SEH buffer overflow jump address bruteforcer,
   inspired by the same tool by Nicolas Economou)
 * the tutorial is now available in chm and pdf formats
 * now with only one MSI installer for all supported Python versions
 * added support for diStorm 3 (falls back to the old version if not found)
 * now using cerealizer instead of pickle whenever possible
 * added new command to the command line debugger to show the SEH chain
 * a few more anti-anti-debug tricks were added, still more to go!
 * several improvements to the Window instrumentation classes
 * more code examples
 * more Win32 API wrappers
 * lots of miscellaneous improvements, more documentation and bugfixes as usual!

Entire changelog for all versions (slow!):

  http://p.sf.net/winappdbg/changelog


Where can I find WinAppDbg?
===

Project homepage:
-

http://tinyurl.com/winappdbg

Download links:
---

  Windows installer (32 bits)

http://sourceforge.net/projects/winappdbg/files/WinAppDbg/1.4/winappdbg-1.4.win32.exe/download

http://sourceforge.net/projects/winappdbg/files/WinAppDbg/1.4/winappdbg-1.4.win32.msi/download

  Windows installer (64 bits)

http://sourceforge.net/projects/winappdbg/files/WinAppDbg/1.4/winappdbg-1.4.win-amd64.exe/download

http://sourceforge.net/projects/winappdbg/files/WinAppDbg/1.4/winappdbg-1.4.win-amd64.msi/download

  Source code

http://sourceforge.net/projects/winappdbg/files/WinAppDbg/1.4/winappdbg-1.4.zip/download

http://sourceforge.net/projects/winappdbg/files/WinAppDbg/1.4/winappdbg-1.4.tar.bz2/download

Documentation:
--

  Online
http://winappdbg.sourceforge.net/doc/v1.4/tutorial
http://winappdbg.sourceforge.net/doc/v1.4/reference

  For download

http://sourceforge.net/projects/winappdbg/files/WinAppDbg/1.4/winappdbg-tutorial-1.4.chm/download

http://sourceforge.net/projects/winappdbg/files/WinAppDbg/1.4/winappdbg-reference-1.4.chm/download

http://sourceforge.net/projects/winappdbg/files/WinAppDbg/1.4/winappdbg-tutorial-1.4.pdf/download

http://sourceforge.net/projects/winappdbg/files/WinAppDbg/1.4/winappdbg-reference-1.4.pdf/download
___
python-win32 mailing list
python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32


[python-win32] Detecting when a system has multiple monitors (desktops)

2010-08-24 Thread Tony Cappellini
Does anyone know how to detect if a system has multiple monitors
(desktops) through Python?

I've written a program which allows the user to open multiple
stand-alone windows.
When I run this program I usually drag these windows to my secondary monitor.

I was to save the screen coordinates of the window locations so they
can be restored.

First, the program must detect the multiple desktops and then
understand if the screen coordinates of those
windows are related to the primary or secondary desktop.
___
python-win32 mailing list
python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32


Re: [python-win32] Detecting when a system has multiple monitors (desktops)

2010-08-24 Thread Tim Roberts
 Tony Cappellini wrote:
 Does anyone know how to detect if a system has multiple monitors
 (desktops) through Python?

 I've written a program which allows the user to open multiple
 stand-alone windows.
 When I run this program I usually drag these windows to my secondary monitor.

 I was to save the screen coordinates of the window locations so they
 can be restored.

 First, the program must detect the multiple desktops and then
 understand if the screen coordinates of those
 windows are related to the primary or secondary desktop.

For the task you have described, that's not necessary at all.  On a
multi-monitor system, an application that is not multi-monitor aware
will simply see one large desktop.  If you save the coordinates and
restore them later, it will pop up on the same monitor as when you saved.

For example, I run two 1280x1024 monitors side by side, with the primary
monitor on the right.  If I move a window to the left monitor and then
fetch the screen coordinates, the X coordinate is negative (because
(0,0) is the upper left of the primary monitor).  If I kill the app,
bring it back up, and position it to (-900, 100), it is placed on the
left-hand monitor.

-- 
Tim Roberts, t...@probo.com
Providenza  Boekelheide, Inc.

___
python-win32 mailing list
python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32


Re: [python-win32] Detecting when a system has multiple monitors (desktops)

2010-08-24 Thread reckoner

Tony:

All of this is handled in the dragonfly package:

http://code.google.com/p/dragonfly/

Note that you do not need speech recognition in order to use it. In 
particular, look at


   from dragonfly import Window, monitors


and the

window.py file in the distribution.

Good luck!



On 8/24/2010 4:33 PM, Tony Cappellini wrote:

Does anyone know how to detect if a system has multiple monitors
(desktops) through Python?

I've written a program which allows the user to open multiple
stand-alone windows.
When I run this program I usually drag these windows to my secondary monitor.

I was to save the screen coordinates of the window locations so they
can be restored.

First, the program must detect the multiple desktops and then
understand if the screen coordinates of those
windows are related to the primary or secondary desktop.
___
python-win32 mailing list
python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32

___
python-win32 mailing list
python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32


Re: [python-win32] Detecting when a system has multiple monitors (desktops)

2010-08-24 Thread Tony Cappellini
Thanks-

but I think Tim's solution is more native and has the added benefit of
not requiring any additional software..
I was thinking too much into the problem.

However, I will keep your reply for future reference. There may be a
time when I need the monitors package.

On Tue, Aug 24, 2010 at 5:21 PM, reckoner recko...@gmail.com wrote:
 Tony:

 All of this is handled in the dragonfly package:

 http://code.google.com/p/dragonfly/

 Note that you do not need speech recognition in order to use it. In
 particular, look at

   from dragonfly import Window, monitors


 and the

 window.py file in the distribution.

 Good luck!



 On 8/24/2010 4:33 PM, Tony Cappellini wrote:

 Does anyone know how to detect if a system has multiple monitors
 (desktops) through Python?

 I've written a program which allows the user to open multiple
 stand-alone windows.
 When I run this program I usually drag these windows to my secondary
 monitor.

 I was to save the screen coordinates of the window locations so they
 can be restored.

 First, the program must detect the multiple desktops and then
 understand if the screen coordinates of those
 windows are related to the primary or secondary desktop.
 ___
 python-win32 mailing list
 python-win32@python.org
 http://mail.python.org/mailman/listinfo/python-win32

___
python-win32 mailing list
python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32