Re: python guru.. for a short conversation regarding bittorrent..

2005-10-02 Thread billie
If it can helps you "ABC" is a (good) bittorent client written in py. -- http://mail.python.org/mailman/listinfo/python-list

Mantain IDE colors and paste them in an HTML page

2005-10-04 Thread billie
Hi all. I need to insert a Python source in an HTML page mantaining to coloration gives by the IDE. I tried the export function of scite but it does not generate a proper HTML code that permit me to copy and paste it into another HTML page. Does anyone got any suggestion? Regards -- http://ma

Build spoofed IP packets

2005-10-04 Thread billie
Hi all. I'd need to build spoofed IP packets. Do you know something about a python implementation? For low level packet building I already used Impacket module but if I specify a spoofed src address during IP packet creation, module returns an error. Suggestions? Regards. -- http://mail.pyt

Re: Build spoofed IP packets

2005-10-05 Thread billie
> Yes, give us the error. And know that you can't build raw IP packets > unless you're root. > > Sybren Sorry. I forgot to paste the error: Traceback (most recent call last): File "C:\test\client.py", line 156, in ? send_pkt() File "C:\test\client.py", line 96, in send_pkt s.sendto(i

Re: Build spoofed IP packets

2005-10-06 Thread billie
> It's SP2. Microsoft decided allowing raw socket access is a security > threat and disabled it in SP2. Uhm.. I heard about that. Damn it. :-\ -- http://mail.python.org/mailman/listinfo/python-list

how to capture key pressing

2005-10-10 Thread billie
Hi all. I'm searching for a module that permit me to costantly log every key pressed on the keyboard and eventually assign it a function (e.g. when "esc" is pressed: exit program"). -- http://mail.python.org/mailman/listinfo/python-list

Re: how to capture key pressing

2005-10-10 Thread billie
> Look at curses. I was searching for something portable on multiple platforms. Curses doesn't work on Windows. -- http://mail.python.org/mailman/listinfo/python-list

Re: how to(can we ?) pass argument to .py script ?

2005-10-12 Thread billie
It's quite simple. If this usage example can helps you... ### parser try: opts, args = getopt.getopt(sys.argv[1:], "h, e, p:", ["help"]) mode = 'reply' # default mode pwd = ' ' # default pass (blank) for o, a in opts: if o == '--help' or o == '-h': print helper(

Re: Looking for a Python mentor

2005-10-14 Thread billie
"Nir Aides" wrote > Hello Len, > > You should try the #python IRC room. > It is always very active and helpful. > > Nir Do you mean efnet #Python chan? It's not too much active... -- http://mail.python.org/mailman/listinfo/python-list

popen4

2005-10-16 Thread billie
Hi all. I'm trying to execute system commands and capture the output by using popen4: stdout example: >>>exec_cmd = popen2.popen4("echo hello!") >>>output = exec_cmd[0].read() hello stderr example: >>>exec_cmd = popen2.popen4("echobv hello!") >>>output = exec_cmd[0].read() Unrecognized command

Re: popen4

2005-10-18 Thread billie
Piet van Oostrum wrote: > I think you need something like pyexpect for this. PyExpect seems to be no more mantained. -- http://mail.python.org/mailman/listinfo/python-list

Using multiple threads with pcapy

2005-09-14 Thread billie
Hi all. Because of pcapy sniffng library doesn't permit to listen on multiple interfaces I'm trying to use threads to avoid this problem. In the source below I tried to start a thread for every NIC installed on my system (I got 2 NICs) but once I started the first thread the program can't go fur

Re: how to lock a file in ftp site

2005-12-19 Thread billie
No, I think you have to manually set this policy directly on the ftp server. -- http://mail.python.org/mailman/listinfo/python-list

Determine the IP address of an eth interface

2006-01-18 Thread billie
Hi all. I'm searching for a module that permits me to low-level interact with ethernet interfaces of my system. I would like to determine at least the first of the followings values: 1 - IP address assigned to the interface 2 - subnet mask 3 - default gateway 4 - primary and secondary dns 5 - defa

Re: How to run in background?

2006-10-06 Thread billie
I'm sorry. I tried with "windows=myscript.py" but it doesn't seem to work. I really don't know where find this information that's extremely important for me. I googled a lot but I didn't found a solution for my problem. :-\ -- http://mail.python.org/mailman/listinfo/python-list

Tkinter & systray

2006-10-09 Thread billie
Hi all. I'd like to develop a GUI-based application the most portable as possible, able to run in systray. I think that, for portability reasons, Tkinter could be the best choice, so I tried to google a little bit about it. According to this : http://mail.python.org/pipermail/python-list/2002-Septe

RAW network programming under Windows

2006-11-05 Thread billie
RAW network programming under Windows it's not always possible because of the security limitations that microsoft introduced in the latest Windows versions and that affects WinSocket API. On UNIX systems I'm able to freely send raw packets (for example I'm able to compile IP packets with a src addr

Re: RAW network programming under Windows

2006-11-10 Thread billie
sturlamolden wrote: > You can try to install "Windows Services for Unix 3.5" (aka SFU 3.5). > It transforms your Windows into a certified UNIX (not just a Unix > clone). SFU 3.5 has a full BSD socket API (derived from OpenBSD), not > just Winsock. As the POSIX subsystem in SFU 3.5 is not layered o

Limitate speed of a socket-based data transferring

2006-09-14 Thread billie
Hi all. I'm writing a TCP-based application that I will use to trasfer binary files through the network. This piece of code represents how do I get a file from a remote peer and save it on my local hard drive: file_obj = open('downloaded.ext', 'wb') while 1: buf = sock.recv(2048) if len(bu

Re: Outbound port on sockets

2006-09-14 Thread billie
bmearns wrote > Is it possible to specify which port to use as the outbound port on a > connection? I have the IP address and port number for the computer I'm > trying to connect to (not listening for), but it's expecting my > connection on a certain port. > > Specifically, I'm trying to write an

Re: Outbound port on sockets

2006-09-14 Thread billie
> The right format of a FTP PORT command is: > > PORT x,x,x,x,y,z > > ...where x(s) represents your IP address in dotted form and (x * y) the > TCP port you bind. Sorry, I wanted to say: (y * z) -- http://mail.python.org/mailman/listinfo/python-list

Interact with system command prompt

2006-09-18 Thread billie
Hi all. I would like to know if there's some python framework able to interact with system command prompt (cmd.exe or /bin/sh, depending on the system) from python. I need something that supports key/path auto completion by pressing TAB button and the possibility to use interactive programs like ft

Re: Interact with system command prompt

2006-09-18 Thread billie
Diez B. Roggisch ha scritto: > billie wrote: > > > Hi all. I would like to know if there's some python framework able to > > interact with system command prompt (cmd.exe or /bin/sh, depending on > > the system) from python. > > I need something that supports k

Re: Interact with system command prompt

2006-09-18 Thread billie
Uhm... It seems that IPython got some problems: http://ipython.scipy.org/doc/manual/node12.html In details: >Note that this does not make IPython a full-fledged system shell. In >particular, it has >no job control, so if you type Ctrl-Z (under Unix), you'll >suspend pysh itself, not the >proces

Re: why a main() function?

2006-09-19 Thread billie
Another advantage is that you can catch all the unhandled exceptions of the entire program (it they occurs) by doing something like this: def another_call(): raise SomeUnexpectedException # it will be catched in '__main__' def call(): another_call() def run(): call() in __name__ =

Re: get process id...

2006-09-21 Thread billie
[EMAIL PROTECTED] ha scritto: > SpreadTooThin wrote: > > How does one get the process id? > > Is there a method for windows and unix (mac os x etc...) > > under linux, do: > import os > os.getpid() Under Windows: import ctypes ctypes.windll.kernel32.GetCurrentProcessId() -- http://mail.pyt

Re: get process id...

2006-09-21 Thread billie
Fredrik Lundh ha scritto: > billie wrote: > > >> under linux, do: > > > >> import os > >> os.getpid() > > > > Under Windows: > > > > import ctypes > > ctypes.windll.kernel32.GetCurrentProcessId(

How to run in background?

2006-09-25 Thread billie
Hi all. I know that it's possible to automatically run a Python program in background by giving it the "pyw" extension. This is useful when I release a source ditribution of my program. How could it be possible to do the same thing with an .exe file compiled with py2exe extension? Do I have to writ

Re: One module per class, bad idea?

2006-12-12 Thread billie
> would it be a bad idea to have a guideline > in your project that promotes a one class per file structure (assuming most > of the programmers a background similar to mine)? Yes, it would be a bad idea. =) -- http://mail.python.org/mailman/listinfo/python-list

Re: One module per class, bad idea?

2006-12-13 Thread billie
Isaac Rodriguez wrote: > > Yes, it would be a bad idea. =) > > Saying it is a bad idea and not explaining why will not help anyone. I > would like you to elaborate on why it is a bad idea to have one file > per class. > > Thanks, > > - Isaac. Because it's just a useless limitation. Python lets y

How to manage two (different) sockets without using threads?

2006-12-13 Thread billie
Hi all. I'm (re)writing an FTP server application by using asyncore/asynchat modules. FTP tipically got two different channels: command and data. I'm succesfully managing command channel through asynchat framework, but I'm not sure about how to manage data channel without using a thread/subprocess.

Re: General Question About Python

2007-01-09 Thread billie
Torabisu wrote: > Its quite weird, we're looking for Python skills but are battling to > find at the moment... Normally Python on its own will probably not > land you a job, but the last two companies I've worked for are doing > indepth Python development, so hopefully the tables are turning a bi

Re: Best way to capture output of another command-line program in Win32?

2006-02-06 Thread billie
Another way: >>> import popen2 >>> exec_cmd = popen2.popen4('dir') >>> output = exec_cmd[0].read() >>> print output [...] 04/02/2006 21.44 106 setup.py 06/02/2006 23.25 656 time_synch.py 07/02/2006 00.5216.885 knockd.log 07/02/2006 00.35 6.37

Using RAW_SOCKETS on win XP SP2

2006-02-07 Thread billie
Hi all. I'd need to send a TCP SYN packet having a certain string as payload. I'm using Python and an high level packet building library called "Impacket" to build TCP and IP datagrams. I wrote this simple code that works on Linux but not on Windows XP SP2, probably because of SP2 security limita

Re: Using RAW_SOCKETS on win XP SP2

2006-02-07 Thread billie
"Up" :-) -- http://mail.python.org/mailman/listinfo/python-list

Netstat in python. Does it's possible?

2006-02-11 Thread billie
Hi all. I don't know if Python is good for this kind of jobs but I'm wondering if it's possible emulate the "netstat" command in Python. I'd need to know if a certain executable opened a socket and, in that case, I'd like to know what kind of socket it uses (TCP or UDP), its src/dst PORT, and th

Re: Netstat in python. Does it's possible?

2006-02-13 Thread billie
Thank you all for your helping. -- http://mail.python.org/mailman/listinfo/python-list

Re: editor for Python on Linux

2006-02-20 Thread billie
I really think that IDLE is one of the best around in Python source editing. The only great lacks are tabs. Does somebody know if is there some IDLE modified version including tabbed browsing, out there? -- http://mail.python.org/mailman/listinfo/python-list

sleep in asyncore

2007-01-11 Thread billie
Hi all. I'm writing an authentication server by using asyncore / asynchat modules. I'd like to implement a basic brute-force protection by "freezing / sleeping" the current client session for a period of time (e.g. 2 seconds) when the user sends a wrong password. Does someone knows a "trick" to do

Re: Projects anyone?

2007-01-17 Thread billie
placid wrote: > Hi all, > > I'm looking for anyone who is working on a project at the moment that > needs help (volunteer). The last project i worked on personally was > screen-scraping MySpace profiles (read more at the following link) > > http://placid.programming.projects.googlepages.com/screen

Re: 2.3-2.5 what improved?

2007-01-17 Thread billie
robert wrote > Robin Becker wrote: > > A large cgi based web Python-2.3 application needs to be speed improved. > > experiments show the following under reasonable testing (these are 2 > > second reportlab pdf productions) > > > > 1) 2.3 --> 2.5 improvement small 1-2% > > 2) cgi --> fcgi improvem

asyncore DoS vulnerability

2007-02-01 Thread billie
Hi all. I've just terminated a server application using asyncore / asynchat frameworks. I wrote a test script that performs a lot of connections to the server app and I discovered that asyncore (or better, select()) can manage only a limited number of file descriptors (aka simultaneous connections)

Re: asyncore DoS vulnerability

2007-02-02 Thread billie
> This is not a CRASH, It looks an exception with a "Traceback", this is > the normal way python report problems, nothing wrong with that. > You can handle it with a try: except: I think that such a thing should be handled by asyncore itself. > 512 is probably a fixed limit into XP, win2k3 or win

Re: asyncore DoS vulnerability

2007-02-03 Thread billie
On 2 Feb, 17:09, "Chris Mellon" <[EMAIL PROTECTED]> wrote: > Thats like asking why you should have to move your fingers to type or > why you should have to eat food in order to not starve. Windows is > placing a limit of 512 descriptors per process. Call Microsoft if you > want to go over that. ?

WindowsNT user authentication

2007-02-12 Thread billie
Hi there, I would like to submit a username/password pair to a Windows NT workstation and find out if it's valid. Moreover I would like to get the user's home directory given the username. Does it is possible to do that by using pywin32 extension? Could someone point me in the right direction? B

Re: WindowsNT user authentication

2007-02-12 Thread billie
On 12 Feb, 14:45, Tim Golden <[EMAIL PROTECTED]> wrote: > billie wrote: > > Hi there, > > I would like to submit a username/password pair to a Windows NT > > workstation and find out if it's valid. > > Moreover I would like to get the user's home direc

Re: WindowsNT user authentication

2007-02-13 Thread billie
On 12 Feb, 16:53, Tim Golden <[EMAIL PROTECTED]> wrote: > billie wrote: > > Do you got any idea about how getting user's home directory? > > The answer to that is unfortunately slightly complicated, > because Windows has no such thing as a "user's home

Re: WindowsNT user authentication

2007-02-14 Thread billie
Another question, I'm sorry. Do you got any idea about how to get permissions of a file/directory given the username? For example: I would like to know if C:\my_file.ext is readable/ writable by user 'x' or not. -- http://mail.python.org/mailman/listinfo/python-list

Re: WindowsNT user authentication

2007-02-14 Thread billie
On 14 Feb, 14:30, Tim Golden <[EMAIL PROTECTED]> wrote: > Tim Golden wrote: > > billie wrote: > >> Another question, I'm sorry. > >> Do you got any idea about how to get permissions of a file/directory > >> given the username? > >> For exa

distutils and paths

2007-02-19 Thread billie
Hi there. I played with distutils for some hours but I didn't figured out how to solve this problem so I would really be thankful if someone could help me out. My package is structured as follows: setup.py | mypkg | | | __init