July 25, 2005

Domain name searching

I have to say, the Name Spinner at Whois Source is quite useful.

Posted by torque at 5:08 PM | Comments (0) | TrackBack

January 31, 2005

Google now a registered ICANN registrar!

Looking to register that cool new domain name? As noted by Bret Fausett, you'll soon be able to do it through Google. Scroll to #895. A bit frightening isn't it? Interestingly, ICANN has left 891-894 and 896-900 unassigned. Google gets 10 slots?

Posted by torque at 3:04 PM | Comments (3) | TrackBack

August 16, 2004

Securing websites at Stanford using SSL

This probably will apply to other servers, but here what needs to be done to make sure that content is secure. First of all, transfer needs to be restricted to https so that no one can get to them unencrypted (via http). To do this, in .htaccess, place the following line
SSLRequireSSL on
Next set permissions so that no one else on the server can access the files except for the www server
% fs setacl dir system:www-servers read
% fs setacl dir system:anyuser none
% fs setacl dir system:authuser none
For more details, visit ITSS.

Posted by torque at 11:34 PM | Comments (1) | TrackBack

July 23, 2004

Changing poll to ALL in phpBB

I've been experimenting with phpBB polls, and noticed something very annoying. Despite repeated setting poll voting to ALL (from REG - for registered), the system reports no error and yet sets the poll voting back to REG. Basically, 40-some people have visited my laminate flooring survey with no way to vote. Arrrr.... Fortunately, there is a MOD called guestvote_mod that will fix this problem. Remember that this is beta software, so use at your own risk. Also, you will have to get your hands dirty to install this, so have some paper towels handy.

Let's do it.
  1. Download the latest version of guestvote_mod.zip. In the archive you will find two php files and a txt file containing the instructions, which I will outline below.
  2. Copy guestvote.php and guestvote_config.php into your phpBB directory.
  3. In the same directory, make backup copies of posting.php, viewtopic.php and viewforum.php. As you can see below, the next steps are a lot of work. If you trust me and have a fresh copy of phpBB, just replace the files with the ones found here, otherwise...
  4. Open up posting.php with your favorite editor, e.g., XEmacs, and make the following changes:


    include($phpbb_root_path . 'includes/functions_post.'.$phpEx);
    // begin guestvote mod
    include($phpbb_root_path . 'guestvote.'.$phpEx);
    include($phpbb_root_path . 'guestvote_config.'.$phpEx);
    // end guestvote mod
    This will give posting.php access to the guestvote functions.

    Comment out

                    $is_auth_type = 'auth_vote';
    (line 160) and replace it with
    // begin guestvote mod
                    $is_auth_type = guestvote_auth_type();
    // end guestvote mod

    Comment out

                            $sql = "SELECT *
                                    FROM " . VOTE_USERS_TABLE . "
                                    WHERE vote_id = $vote_id
                                            AND vote_user_id = " . $userdata['user_id'];
    (line 482) and replace it with

    Comment out

    			if ( !($row = $db->sql_fetchrow($result2)) )
    (line 494) and replace it with
    // begin guestvote mod
                            if ( !($row = $db->sql_fetchrow($result2)) && !(guestvote_already_voted_by_cookie()) )
    // end guestvote mod

    Comment out

                                    $sql = "INSERT INTO " . VOTE_USERS_TABLE . " (vote_id, vote_user_id, vote_user_ip)
                                            VALUES ($vote_id, " . $userdata['user_id'] . ", '$user_ip')";
                                    if ( !$db->sql_query($sql, END_TRANSACTION) )
                                            message_die(GENERAL_ERROR, "Could not insert user_id for poll", "", __LINE__, __FILE__,$sql);
    (line 508) and replace it with
    // begin guestvote mod
                                    if ($guestvote_logging == 1 || $guestvote_logging == 3)
                                            $sql = "INSERT INTO " . VOTE_USERS_TABLE . " (vote_id, vote_user_id, vote_user_ip)
                                                    VALUES ($vote_id, " . $userdata['user_id'] . ", '$user_ip')";
                                            if ( !$db->sql_query($sql, END_TRANSACTION) )
                                                    message_die(GENERAL_ERROR, "Could not insert user_id for poll", "", __LINE__, __FILE__, $sql);
    // end guestvote mod
  5. Open up viewtopic.php and make the following changes:


    include($phpbb_root_path . 'includes/bbcode.'.$phpEx);
    // begin guestvote mod
    include($phpbb_root_path . 'guestvote.'.$phpEx);
    include($phpbb_root_path . 'guestvote_config.'.$phpEx);
    // end guestvote mod


    // User authorisation levels output
    (line 581) append
    // begin guestvote mod
    if ($userdata['user_id'] == ANONYMOUS && guestvote_allowed())
    	$is_auth['auth_vote'] = TRUE;
    // end guestvote mod

    Comment out

                    $sql = "SELECT vote_id
                            FROM " . VOTE_USERS_TABLE . "
                            WHERE vote_id = $vote_id
                                    AND vote_user_id = " . intval($userdata['user_id']);
    (line 708) and replace it with
    // begin guestvote mod
                    $is_auth_type = guestvote_auth_type();
    // end guestvote mod

    Comment out

                    $user_voted = ( $row = $db->sql_fetchrow($result) ) ? TRUE : 0;
    (line 720) and replace it with
    // begin guestvote mod
                    $user_voted = $user_voted || guestvote_already_voted_by_cookie();
    // end guestvote mod
  6. Open up viewforum.php and make the following changes:


    include($phpbb_root_path . 'common.'.$phpEx);
    // begin guestvote mod
    include($phpbb_root_path . 'guestvote.'.$phpEx);
    include($phpbb_root_path . 'guestvote_config.'.$phpEx);
    // end guestvote mod


    // User authorisation levels output
    (line 367) append
    // begin guestvote mod
    if ($userdata['user_id'] == ANONYMOUS && guestvote_allowed())
    	$is_auth['auth_vote'] = TRUE;
    // end guestvote mod
Posted by torque at 9:28 AM | Comments (2) | TrackBack

July 2, 2004


I noticed a very interesting visitor while reviewing my June logs. I think it is part of the Big Brother bot... it was looking at my blogs on Costco diapers. I did also notice a uspto one.

Posted by torque at 12:45 AM | Comments (115) | TrackBack

June 29, 2004

Google Site Stats

1071921978.gifI saw this funny little box on the Mill-Max webpage today. What is Google Site Stats? It shows up at the end of everything, after the </HTML>. Wrapped around is some javascript coming from http://www.googleadservices.com/pagead/conversion.js.

Posted by torque at 4:40 PM | Comments (2) | TrackBack

June 28, 2004

Pagerank and Alexa

I noticed several weeks ago, when my Page Rank went from 4 to 5, that my Alexa Traffic Rank went from 1,000,000+ to 950,937. My theory, these are one and the same. Page Rank according the Google Toolbar would then be given by 10-log10(Alexa Traffic Rank). You can test it out. The site 'patents.com' has a Page Rank of 7/10, they have a traffic rank of 263,218. Oh wait, that doesn't really work does it. Hmmm... Delphion has a Page Rank of 8/10, and a traffic rank of 43,119. Google has a traffic rank of 4, and a Page Rank of 10/10.

Suppose that a traffic rank of 1,000,000 corresponded to a Page Rank of 5, and that the measure is logarithmic. That would mean that we are looking at log base 15.8489 (approximately). So, to convert traffic rank to Page Rank you would take 10-log(Traffic Rank)/log(15.8489). Let's see if it works. For 'patents.com', I get a Page Rank of ~5.5. For Delphion, I get a Page rank of 6.1. Ok, maybe this doesn't really work. The best way is to plot and see. Maybe it was all just a coincidence. Why should page rank be linked to traffic rank anyway? What was I thinking...

Never mind, just forget about this whole post, there is no relation except for indirect reasons...

Posted by torque at 2:11 PM | Comments (2) | TrackBack

June 19, 2004

DBI bind_param_inout and MySQL

The short answer is that it doesn't work because bind_param_inout is not implemented for MySQL. For those of you that are curious, bind_param_inout allows you to pass a reference into an SQL statement instead of the actual block of data. It conserves memory since duplicate copies of the data do not have to exist. The error you might see if you try to do this is "Output parameters not implemented". That's too bad. I wonder why it isn't implemented.
 *  Name:    dbd_bind_ph
 *  Purpose: Binds a statement value to a parameter
 *  Input:   sth - statement handle
 *           imp_sth - drivers private statement handle data
 *           param - parameter number, counting starts with 1
 *           value - value being inserted for parameter "param"
 *           sql_type - SQL type of the value
 *           attribs - bind parameter attributes, currently this must be
 *               one of the values SQL_CHAR, ...
 *           inout - TRUE, if parameter is an output variable (currently
 *               this is not supported)
 *           maxlen - ???
 *  Returns: TRUE for success, FALSE otherwise

int dbd_bind_ph (SV *sth, imp_sth_t *imp_sth, SV *param, SV *value,
		 IV sql_type, SV *attribs, int is_inout, IV maxlen) {
    int paramNum = SvIV(param);

    if (paramNum <= 0  ||  paramNum > DBIc_NUM_PARAMS(imp_sth)) {
        do_error(sth, JW_ERR_ILLEGAL_PARAM_NUM,
		       "Illegal parameter number");
	return FALSE;

    if (is_inout) {
        do_error(sth, JW_ERR_NOT_IMPLEMENTED,
		       "Output parameters not implemented");
	return FALSE;

    return BindParam(&imp_sth->params[paramNum - 1], value, sql_type);
Posted by torque at 8:38 AM | Comments (1) | TrackBack

June 2, 2004

NuSOAP not functioning

Dietrich Ayala's NuSOAP is a PHP-based library for communicating using SOAP. SOAP stands for Simple Object Access Protocol. It is a web services protocol - that is, it is a language for coordinating computing services over the web. For instance, I might have a web server which computes digits of π. To be SOAP compliant, I would have to have a document telling the user how to ask for digits of pi, e.g., send me how many digits you want, and how long you want me to work on it. All this is encased in XML (that's the "lingo"). Does that make sense? In the real world, it is used to get, for example, search results from Google or a listing of books from Amazon. It worked on my PC but not on my FreeBSD server. The problem turned out to be one I recognized a long time ago, my web host does not enable XML parsing with PHP by default, to do so, you need to add '@dl('xml.so');' before you call the library. So, there ya go.

Posted by torque at 10:15 AM | Comments (0) | TrackBack

June 1, 2004

Getting mod_rewrite at Globat

Alas, I got my site too early... but there is always a way. Notice how patient I was.

Please wait for a site operator to respond.
All operators are currently assisting others. Thanks for your patience. An operator will be with you shortly.
All operators are currently assisting others. Thanks for your patience. An operator will be with you shortly.
All operators are currently assisting others. Thanks for your patience. An operator will be with you shortly.
All operators are currently assisting others. Thanks for your patience. An operator will be with you shortly.
All operators are currently assisting others. Thanks for your patience. An operator will be with you shortly.
All operators are currently assisting others. Thanks for your patience. An operator will be with you shortly.
All operators are currently assisting others. Thanks for your patience. An operator will be with you shortly.
All operators are currently assisting others. Thanks for your patience. An operator will be with you shortly.
You are now chatting with 'Anne'
Anne: Welcome to Globat! How may I help you?
tim: Hi Anne, busy day?
Anne: Yes Tim, a bit, but how may I help you?
tim: I would like to get mod_rewrite enabled for my site.
Anne: I see. May I have your domain name please?
tim: oncloud8.com
Anne: Thank you Tim, please hold.
tim: thank you ann
tim: I mean, Anne
Anne: Tim, are you referring to the 777 permissions?
Anne: Unfortunately we dont support 777
tim: No, I would like to use mod_rewrite, i.e., RewriteEngine on
tim: I would like to be able to turn
tim: oncloud8.com/stuff
tim: into
tim: oncloud8.com/index.php?q=stuff
tim: Lunarpages supports this, I can't imagine that globat does not.
Anne: I see..
Anne: I'm sorry but I have just confirmed with our administrator
tim: Not 777 permissions
Anne: and it isnt available on all accounts
tim: Hmm, can you make it available on my account?
Anne: It is only available to Commerce packages
Anne: :( I'm afraid no
Anne: not
Anne: Upgrading is not even a solution. :(
tim: It would really make my day!
Anne: It's only available to commerce packages and to new accounts
tim: Wait, I'm confused, why is it only available to new accounts?
Anne: only to commerce package and to the newest accounts registered
tim: that doesn't sound quite right... so you are saying because I'm not a new account, I cannot even get mod_rewrite?
tim: Is it possible for you to reset my account?
Anne: No Tim, we cannot. I'm sorry.
tim: Let me see if understand. Because I have been with Globat for some time now, I am not eligible to even upgrade to get mod_rewrite.
tim: Much less get it on a non-Commerce package.
Anne: Tim, what I'm saying is even if you upgrade the package,
Anne: it wont still have the mod_rewrite enabled
tim: But if I sign up for a new _commerce_ package, it will have mod_rewrite enabled.
Anne: if you purchased a commerce package
Anne: or just purchased now
Anne: then it will be enabled
Anne: this is because domains on the commerce package
Anne: and the newest ones
Anne: are housed on a diff server, in which we could enable the mod_rewrite
tim: Ok, let me get this straight, if I get a new non-commerce domain from Globat it will have mod_rewrite
Anne: Yes
tim: That's good to know... so if there were some way of reseting my account as a new account it would work.
Anne: Yes, if there was some way

Posted by torque at 3:13 PM | Comments (2) | TrackBack

May 11, 2004

From tab-delimited to HTML table

Stephen Travis' tab-delimited file converter is inspirationally clean and useful. It allows you to take a tab-delimited string of text and convert it into an HTML table. The underlying code is quite straight-forward and nothing magical - but still, thumbs up for making a clean interface. Now what I really need is an MT-plugin that does this. Oh, and also missing is a preview, which can be done with Javascript and a CSS div rewrite.

Posted by torque at 2:35 PM | Comments (5) | TrackBack

December 2, 2003

A MathML test

lim x a+x
I had a hard time getting this to work because I forgot to disable "Convert Line Breaks" in MoveableType. If you want to do MathML you cannot have <br> line breaks.

Posted by torque at 2:45 PM | Comments (0) | TrackBack

September 11, 2003

Database optimization

I have 380250 rows, in those rows are, evenly distributed, 15 channels. A query for max value by channel prior to indexing the channels takes 21.5415 sec. - ugh 19 sec

Posted by torque at 1:17 PM | Comments (0) | TrackBack

September 9, 2003

Load data infile

I recently tried to load a csv file I generated using C++ via 'cout', commas, and 'endl' into MySQL. Man, I wasted so much time. Here's what was wrong. First, I needed to use LOAD DATA INFILE instead of LOAD DATA LOCAL INFILE. The default is DATA LOCAL. Second, because my file was very large (>15MB), I would click on send and it would put me back on the same page because my php.ini was set for a maximum upload of 2MB. It's hard to diagnose what the problem is if there is no error messaging. Finally the 'endl' corresponds to '\n', rather than '\r\n'.

Posted by torque at 12:11 PM | Comments (3) | TrackBack

August 28, 2003

Ebay search continued...

I gained some more insight this morning. I thought at first that it should not be the Javascript cookie, since deleting did not change the behavior. However, I noticed something interesting, at the highest security settings for IE, (1) the main eBay page does not drop a cookie, and (2) the dSI function never appears. So, it must have something to do with the myriad of Javascript functions the main page is running.

Posted by torque at 11:10 AM | Comments (1) | TrackBack

August 27, 2003

Automating eBay search

Try this. Open up a browser window and jump to http://www.ebay.com. Now, in the same browser window, paste in http://search.ebay.com/search/search.dll?MfcISAPICommand=GetResult&query=donuts. Select View->Source, and do a Find for "dSI". You'll see something interesting:

dSI(0,1,0,0,1,0,0,1,0,0,0,2,2341979206,"*L@@K*-100*Dog*CHEWS & RAWHIDE BONES *Donuts",20753,'','$2.99','','$12.98',1,"1m","0h 01m","in 1 min","Aug-27","16:29","Aug-20","16:29",{});
This is very interesting, because it gives information, in an easily parsable form, on each item on the page. You might think to yourself, what a great way to parse eBay searches. However, all is not so straight-forward. First of all, if you open a new window and just paste in http://search.ebay.com/search/search.dll?MfcISAPICommand=GetResult&query=donuts and do a search for "dSI" in the source, you won't find it. Something happens when you first enter the eBay home page. It isn't a header cookie, and I'm not sure it is the one put in by Javascript. It may have something to do with the eTag header. It is known that Java servlets use this field to run sessions. I tried cURL with cookies to no avail. Anyone have any ideas?

dSI is a function found in the included sale_search.js file. Kindly, eBay gives definitions to all the fields:

  • featured
  • galleryType
  • giftIconType
  • siteId
  • saleType
  • IsHighlightSearch
  • IsBoldSearch
  • IsPicturePackItem
  • IsNewItem
  • IsHomesDirect
  • IsSothebys
  • offerCount
  • ItemId
  • ItemTitle
  • CatId
  • ConvertedPriceMoneyStandard
  • CurrentPriceMoneyStandard
  • ConvertedBinPriceMoneyStandard
  • BinPriceMoneyStandard
  • IsTimeInMinutes
  • TimeLeftInMinutes
  • TimeLeft
  • TimeInMinutes
  • EndTimeDateMedium
  • EndTimeTimeLong
  • StartTimeDateMedium
  • StartTimeTimeLong
  • Attr
I became interested in this after puzzling over the now non-functioning ebayrss, which was developed to avoid the somewhat pricy eBay API fees.

Posted by torque at 4:39 PM | Comments (178) | TrackBack

August 2, 2003

UPC lookup

I was just thinking about this the other day, and my goodness, someone actually has done it! Imagine, a UPC based marketplace. The amazing thing is, you can actually download the database from sourceforge! Imagine that. Unbelieveable.

Posted by torque at 9:46 PM | Comments (0) | TrackBack

August 1, 2003

At it again

I bet you are thinking, boy, he's at it again. I installed PHP/Apache/MySQL on the laptop today. Some important things. First, after installing PHP, install Apache and make the following additions to the httpd.conf file:

LoadModule php4_module "C:/Program Files/php/sapi/php4apache2.dll"
AddType application/x-httpd-php .php

And then edit the line
DirectoryIndex index.php index.html index.html.var

Posted by torque at 2:48 PM | Comments (0) | TrackBack

July 24, 2003

Installing Apache on Linux

Typical problems:

  • The file index.php does not load on entry - make sure that DirectoryIndex has index.php in it
  • Cannot look at user directory - make sure to chmod 755 /home/user

Posted by torque at 1:06 PM | Comments (0) | TrackBack

July 23, 2003

Google Page Rank

If you are interested in Google PageRank, this is an interesting site. Apparently PageRank files can be requested in text directly from Google. Hmm, actually, it doesn't work. I get

Your client does not have permission to get URL /search?client=navclient-auto&ch=0123456789&features=Rank&q=info:http://www.stanford.edu/ from this server.(Client IP address:

Oh wait, I see, it's because I need to have a right ch=..... This is the checksum. Hmmm. Here's more info.

Posted by torque at 11:35 AM | Comments (0) | TrackBack

Speech Synthesis

I found an interesting page comparing speech synthesis packages this morning. I think the AT&T Natural Voices package sounds the best, but I don't think their API is publically available. Microsoft's is though.

Posted by torque at 10:02 AM | Comments (0) | TrackBack

July 15, 2003


I'm trying to get Linkpoint working. Having problems that I'm trying to figure out - getting closer. Big clue.

Update: It turned out to be a problem with PHP Curl, which for whatever reason was not supporting authentication based on SSL certificates. When I used the command line version of Curl everything went fine. The Linkpoint PHP module is available and is a good set of code to study if you are interested in how credit card authorization is done from a webmaster perspective. At the end, I simply chose the command line version, which is an option in the module.

Posted by torque at 12:46 AM | Comments (0) | TrackBack

July 12, 2003


Nasty... the other day I ran across a site that automatically sets your home page, without permissions! Naturally it piqued my interest, and after repeated telneting, I finally found the source of the problem... well, almost. It turns out that the source was an 'encoded' Javascript. Thanks to microsoft, there is a handy little command which 'encodes' (not encrypts) your ASP/VBScript/Javascript code. I found a good tutorial here on attempting to break the code. Here's what the code looked like:

[SCRIPT language=JScript.Encode]#@~^RwAAAA==@&9W^!:xYcVK^lDkGxct.n6'J4OYa)zJdn68FyR^Wh&^tG/Ddz1W;UDRw42Ql^m{qyJI@&0hcAAA==^#~@[/SCRIPT]
Nicely, mrbrownstone has done all the work. Behold, the Win32 command line executable: srcdec14.exe and source code (for Unix): srcdec14.c. Hmm, I tried it, but it keeps giving checksum errors. On mrbrownstone's page I found a link to Soya's Java version. Which also doesn't give intelligible answers. Here's another super html decoder page.
Posted by torque at 12:00 PM | Comments (8) | TrackBack

July 3, 2003

WMServer mod



Installing cryptopp-php
There are a few tips besides the ones in the documentation that will help. First of all, because you will be compiling a php library, you'll need to have the php source code headers. You can find the latest stable version here. First, compile the Crypto++ workspace according to the instructions above. Now, open up the cryptopp.dsw. Under Tools->Options->Directories->Include files, add the 'main' directory from the php source code. You need this to access php.h. In the same place, add the directory for Crypto++ containing hex.h. Finally, if you followed the directions above, you would have, under Tools->Options->Directories->Library files, added the Crypto++ RELEASE directory. I should write something to put this all together. Still after that, you need to have php4ts.lib. Fortunately, you don't have to recompile PHP, it can be found in the main directory of your PHP install. Add that to Tools->Options->Directories->Library. Once you do this, you will be able to compile... albeit with a lot of warnings. I got 2343!!

Posted by torque at 12:33 PM | Comments (0) | TrackBack

July 1, 2003


To install Curl with PHP you need to uncomment the curl line in php.ini, make sure the extensions directory is pointed correctly, and copy two files, libeay32.dll and sseay32.dll from the dlls directory in your php directory to the windows/system32 directory. Then it'll work.

Posted by torque at 3:56 PM | Comments (0) | TrackBack

June 27, 2003

Remote Desktop Shadowing

If this can be done in a well-structured manner, it will be of great use to salespeople who wish to demo products without allowing the client to have the product, or to run it unsupervised. The document I am attempting to decipher is HOW TO: Shadow a Remote Desktop Session in Windows XP Professional.

What do you need? You need 1 Windows 2003 Server, 1 XP Professional computer, and then two computers, one for the client and one for the sales person. The tricky thing here is that actually making it work involves giving the salesperson and the client access to the Windows Server. That may not be so good. I wonder if you can just host it on the Win2003 Server instead.

Here's what happens:
Computer 1. Grab a terminal session from the Windows 2003 Server. From this session, open a desktop session to the XP professional computer. The real desktop of the XP pro computer will now be locked.
Computer 2. Grab a terminal session from the Windows 2003 Server. Locate the original session ID using the Terminal Serviecs Manager utility under Administrative tools. Open a command prompt and use the shadow command - e.g., if the ID is 2, then you type shadow 2 in the command prompt.

Crazy huh? To disconnect the shadow (computer 2) press CTRL-* on the numeric keypad. Computer 1 just logs out in the normal way.

Posted by torque at 3:20 PM | Comments (3) | TrackBack

June 23, 2003


Typo3 is an interesting GPL CMS. Installation is a bit tricky. You have to remember to setup GD for PHP and to add in the appropriate things into localconf.php, in particular:
$TYPO3_CONF_VARS["GFX"]["gdlib"] = 1;
$TYPO3_CONF_VARS["GFX"]["gdlib_png"] = 1;
$TYPO3_CONF_VARS["GFX"]["gdlib_2"] = 1;	
Posted by torque at 4:32 PM | Comments (0) | TrackBack

June 11, 2003


What is UDP, and how do I use it? UDP stands for User Datagram Protocol, and it is also known as RFC678. What does RFC stand for? UDP is an alternative protocol to TCP, Transmission Control Protocol, which is used for serving webpages. It is used for a variety of things including networked games. I'm interested in understanding how to read the Endpoint Mapper found at port 135 in Window's machine.

  • Microsoft has a tool called PortQry, which enables one to do UDP queries in a straight-forward manner. Some documentation is available - in particular, it gives an example of how to query the Endpoint Mapper.
  • A list of port assignments. We want 135, DCE endpoint resolution.
  • Closer: rpcdump dumps the contents of the endpoint mapper database. Wow, it works, and comes with source.
Ok, it looks like the answer is in rpcdump.c, though it references and . In the code there is a lot of talk on binding and stringbindings. The action comes from RpcMgmtEpEltInqBegin, which kicks everything off, and RpcMgmtEpEltInqNext, which gets the next endpoint. This is done until rpcerr == RPC_X_NO_MORE_ENTRIES. Hmmm. I'd like to run something like this from PHP, how can we do it? We would need to call some sort of RPC library. We could develop our own using C++, but there may be tools out there already. RPC is an acronym for Remote Procedure Call. Essentially, over the network, one can call a function, send parameters, and get results. In this case we want to send a call to port 135 to a lookup function that will dump the endpoints.
  • XML-RPC is a spec and implemenation of RPC for PHP. Will it do the trick? No, I think this is something else. It allows you to use RPC but communicate using XML.
  • Aha, RpcMgmtEpEltInqBegin. Ugly.
Ok, here we go. The binding handle, I think, is what we generate by using fsockopen("udp://www.thesite.com",135,$errno,$errstr). And then, there's a bunch of options... wow, this might be undoable. Wait though, backing up, we recall that XML-RPC runs on all platforms, so there must be away to do it without using Microsoft's convention - though it may be very hard to sort it all out.
  • Still closer. Take a look at erlang.org. But can he do it without installing anything on the windows box? rpc:call looks very close to RpcMgmtEpEltInqBegin in arguments.
  • How does an RPC call work anyhow?
  • Oh yes, and then there is mynetwatchman.com's site, which gives information on how those net send spam artists work. I keep meaning to save this one. It makes a lot more sense now.
Update For those of you wishing to go a little more in depth, there are a number of books on Windows network security that will shed more light. You might also considering looking for an expert on something like Scriptlance:

Posted by torque at 4:15 PM | Comments (67) | TrackBack


In case you are ever doing regexp with Perl, a good thing to remember is the quotemeta command. This allows you to escape (addslashes) to everything that isn't a regular character or number. Otherwise your regexp can get hosed.

Posted by torque at 11:10 AM | Comments (0) | TrackBack

June 9, 2003

Plugin detection

One of the projects on scriptlance today was on plugin detection -- I found the answer here. The way to do it is using Javascript. Just in case the site goes down I've thrown it in this blog. Using this, I wrote a small script which allows you to download PDF's but makes sure you have Acrobat Reader before doing so.

Posted by torque at 11:03 AM | Comments (1) | TrackBack

June 1, 2003

Search Inventory

Very interesting, Overture has a place where you can enter in a search term and it will tell you how many times in the previous month that word has been searched for along with suggestions. The only thing I wonder is whether this is equivalent to Google's list - wouldn't you suppose that the audience is different? Anyone who is anyone uses Google.

Posted by torque at 9:14 PM | Comments (4) | TrackBack

April 3, 2003


I realized that I needed a good way of displaying equations. Rather than going the graphical route, I decided to try MathML. If you are using Internet Explorer, you will need either IBM Techexplorer ($27, 30-day trial) or Design Science MathPlayer (free... at the moment). Design Science are the same people who make MathType and Equation Editor in Microsoft Word - so I doubt it will remain free long. I've included a link to MathPlayer on the right hand column under "Tools". Incidentally, if you are using the latest version of Netscape, Amaya or Mozilla you don't have to download anything. For more details click here. Unfortunately, it's still not quite working perfectly on this blog, as it is designed to be in XML not XHTML. It does work for IE users with MathPlayer installed though.

MathPlayer. If you are willing to lock your users to using IE6 and MathPlayer, you can following the instructions at Design Science. This is obviously not ideal, but I had a hard time getting anything else to work though MovableType does use XHTML. The problem with this setup is that MoveableType inserts a "br" each time you press enter. This totally mixes up the MathML and messes up the equation. To get it to work, you must have no carriage returns anywhere between m:math and /m:math.

This is a MathPlayer test:
x 2 + 9 x + 9 = 0

Generalization. There must be a way to make it so that we don't have to lock ourselves into using MathPlayer, however, the way is not yet evident. I found some tips on parsing MathML at the w3.org website that don't work. I can write xml that will work but in xhtml we may well need to declare the MathPlayer object. If you are using Linux, this page probably even gave you an error!

Posted by torque at 2:09 PM | Comments (6)

March 28, 2003

Installed Moveable Type!

With some help from Brad Lauster, I was finally able to get Moveable Type working on my Leland account. I've been meaning to write software like this for years - so it is nice that it is available for free. There were some issues though...

I had problems after moving the docs and images directory to my WWW directory. The problem was that I unzipped and installed the files into my cgi-bin directory then moved the docs and images directory. Somehow the permissions were all messed up and I was unable to look at files in those directories from the web. I ended up having to make new directories. Then I copied the files into those directories. That worked!

Posted by torque at 2:53 PM | Comments (0)