// archives

windows

This tag is associated with 7 posts

Python: Simple Socket Server

The simplest socket server, don’t know why but I always forget how bind is used in python. import socket   sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) sock.bind(("127.0.0.1", 1024 + 666)) sock.listen(5)     client, details = sock.accept() while 1: data = client.recv(1024) print "data : %s" % repr(data)

Python: POST XML over HTTP

Short post to remind myself how to do HTTP requests using python, really easy stuff that I quickly forget. Straight forward example using httplib and urllib from python. In the example I just perform some kind of login request retrieve the session id and then other request sending XML data using POST. Code! Feel free [...]

Twitter Internal Fragmentation: Python + Twitter

As a toy project to play a little bit more with Python and accessing Twitter, I came out with the idea of calculating the Internal Fragmentation of user’s tweet. To interface with Twitter services I used the Twitter extension located at http://code.google.com/p/python-twitter/, which has a pretty straightforward API. The script shown below gives you back [...]

SQUID + Active Directory

A few post ago I wrote about integrating SQUID and Active Directory in order to allow/deny users to access specific webpages depeding on the groups a user belongs. The windows package of Squid comes with several external programs which can be used as external ACLs which allow you to query the local Active Directory in [...]

Creating an Installer Using NSIS (III)

In this last post about NSIS I am going to describe how to use some of the most useful plugins which will allow you create a pretty decent and featurefull installer for windows. Checking for adminstrator privileges: userInfo::getAccountType Pop $0 StrCmp $0 “Admin” +3 MessageBox MB_OK “Debe tener privilegios de administrador para correr este programa [...]

Creating an Installer Using NSIS (II)

After playing for a few days with NSIS I have manage to create a full features installer which perform all the actions I needed. These are the following: Download files Unzip Files to a specific folder Execute external installers Modify Environment Variables Since NSIS supports plug-ins there are quite a few available which provide extra [...]

Creating an Installer Using NSIS (I)

Last week I faced a new problem, I had to program a installer for Windows in order to deploy some software we have produced at work. After a quick googling I found NSIS an installer generator, open source and with a simple scripting language. NSIS comes with a compiler which parses the sentences writting in [...]