How to Remove Leading Zeros in Excel

I had the occasion to download a blacklist of IPs. The problem was that this machine generated list padded zeros in front of it. For example, instead of it was listed as I didnt relish having to manually edit all 10,000 IP addresses. So I did research.

This post gave a formula to do it:
=INT(MID(A1,1,3)) & “.” &
INT(MID(A1,5,3)) & “.” &
INT(MID(A1,9,3)) & “.” &


Splunk Notes: Main Index growing

My splunk enterprise shows that the main index is growing much faster than the squid access logs i sent to squid-access-log index.
Upon review, it seems that during setup of the splunkforwarder service, i added the entire c:\squid\var\logs folder as a directory to be ‘monitored’
This directive was stored in the default splunk directory/etc/app/splunk_TA_Windows/local/input.conf

All i had to do was to remove the entries there then go to the splunk server and enter:
./splunk clean eventdata

(Warning all data in the indexes will be lost)

Using Squid to block WordPress XMLRPC attacks

Have you been hit with a lot of xmlrpc based attacks on your wordpress installation?
Are attackers planning to insert malware into your wordpress installation (soak-soak)?

I have a simple solution to share with you.

Since this website uses BNShosting web mirror service, i thought of using the squid service to block the tons of WordPress attacks using XMLRPC from ever getting to the origin server.

On your squid proxy configuration (squid.conf) add the following entries:

# for Identifying WordPress xmlrpc attacks in URL
acl wordpressAttackers url_regex xmlrpc
acl wordpressAttackers1 url_regex wp-includes/template-loader.php

# Block WordPress Xmlrpc Attackers
http_access deny wordpressAttackers
http_access deny wordpressAttackers1

Save the file, then restart the squid service.
The next time a hacker attempts to brute force your password or insert malware via the xmlrpc or /template-loader.php, the squid service will deny the attempt and filter these attacks before it even gets to the source server.

How to Work on Large Log files in Windows

I had to search through a 400++ gb squid proxy log file. The problem here is that you can’t use Notepad or Wordpad on such a large file. It wont open due to the large size.
Quick idea: use GREP command to filter out the large file into a smaller workable file. The problem is that there is NO GREP command on the windows server. Thankfully, WINDOWS does have an equivalent though — Findstr command to the rescue.

So i opened a command prompt and entered:

findstr “string-to-be-search” filename.ext > result.txt

This gave me a smaller file that i could work with. Other ideas to try is to find the UNIX date string and use it to filter the log file into the date range you want to work with.

Hope this helps others.

How the Internet Affects Anna’s Future

How the Internet Affects Anna’s Future
A hypothetical World

First, let us create a hypothetical world where Senator Bam Aquino’s recent inquiry into the Philippines’ slowest and most expensive Internet in Asia (Youtube Video) has all the stakeholders coming together and miraculously agreeing to a solution. They implement 10 and 100gbps peering immediately. This solution makes near universal internet access fast and affordable — 1gbps at a monthly rate of 100 pesos only. It is available on desktops, mobile phones, and tablets.

Then, in this hypothetical world, imagine how this fast Internet affects a child named Anna who is growing up in a remote village in Pangasinan. Her village is among the 7101 islands that are now interconnected with the rest of the world through this high speed, low cost internet.
Let us see how her world has been changed by fast internet.

Family Incomes rise.
Anna’s world revolves around her family. Her life is now financially better. The chains of poverty are unshackled in their rural community. Unlike in the past, his father, like most farmers in the country, is now freed from the chains of penurious interests charged by local financiers. Their crop is now crowd funded over the internet.
Crowd funding is a relatively new phenomena where groups of people on the internet decide on whether they want to give you money based on your project and what you offer them in return. Several popular sites include KickStarter, Indiegogo and TheSparkProject (PH).
This ‘crowd’ not only provides a source of cheaper funds for Anna’s father to buy farm inputs, but also provide a ready market for his organically grown rice. In addition, they also provide a quick and dirty sort of market research. If no one wants organically grown rice, then no one will fund your crowd-funding campaign for organically grown rice. Anna’s father becomes an “Plant-on-order basis” farmer who can now plant ‘prepaid rice’.

Now that Anna’s father is no longer at the mercy of the intermediaries for funds and marketing, her family gets savings from reduced cost of both production and sales. Their family income increases by 10 fold. So does the rest of Anna’s neighbors in the village. Their village can now run 24 hours with solar lighting and CCTVs that are also monitored over the internet by the nearby police outpost. The local government collects higher taxes from the higher income. BIR commissioner Kim Henares becomes ecstatic.

Accessible rural Health care.
In Anna’s world, family incomes are decimated by health emergencies. To reduce this occurrence, the Ministry of Health uses the high speed Internet to deliver remote healthcare to the rural sites. MOH partners with DOST-ASTI (RxBox) and adopts some of the best practices of HealthPoint Services in India . Doctors now sit in urban areas and use the video feed from the internet to diagnose their patients remotely. If medical operations are required, the doctors can perform surgery using the same high speed links and remotely controlled robotic devices.
This is all possible because of the high internet bandwidth.
In Anna’s new world, medical devices like Clearbridge (SG) Cardio Leaf are being used to monitor her grandparent’s health. The health data is stored on the ‘cloud’ – a term to mean that it is stored in servers on the internet. Her grandparents are able to live with Anna instead of being taken care of in a nursing care, or even in a hospital setting. This allows the PH Government to save (massively) on healthcare costs to its citizens and improves the quality of life for Anna’s grandparents. Anna gets to learn from the years of wisdom of her grandparents.
Diagnosis, monitoring and treatment are now done cheaply and remotely. Never again will 6 out of 10 Filipinos die of sickness without ever seeing a doctor. And as the Bill and Melinda Gates Foundation discovered, the paradox of extending life expectancy, also produces a collateral benefit – lower reproduction rates. Anna’s parents, realizing that their children now have a higher life expectancy, would have no need for a larger brood. The result is that without any religiously-inappropriate family planning practice, conscious decisions based on higher life expectancy results in lower population growth.

Low cost, World Class Education
Anna goes to her school daily. But now instead of lugging along tons of books, she carries only a low cost tablet with internet connectivity via Wifi or LTE. Her tablet could most likely be the 7” e-Rizal tablet like those launched recently by the Laguna provincial government
Her textbook is now on e-readers. These electronic books allow the Ministry of Education to save at least PHP 5.1 Billion pesos a year from avoiding anomalies in printed text books. It also saves tons of trees and lowers our carbon footprint.

Her teacher selects lessons based on Khan Academy and asks Anna to download cool YouTube Videos to illustrate several points. Her video starts to play almost instantly. Learning is now both fun and interactive. She also gets to join a discussion forum with her peers and online friends from around the world. She gains an amazing new world view that was not available in the past. Her worldview makes her more tolerant of other cultures and enables her to gain insights into the power of diversity. Her exposure in working with remote peers gives her an advantage when the ASEAN integration plan goes into effect – as higher paying jobs in the future will involve working/managing remote teams.
Additionally, the Ministry of Education upon realizing the potential of the internet, further partners with MOOC (Massive Open Online Course) providers like what Coursera did with Trinidad and Tobego. This brings world class training and instruction to even the most remote parts of the country – for FREE. The Ministry of Education now produces highly educated citizens at a fraction of the costs it did before the advent of high speed internet.

Numerous Studies support this Scenario
Several studies highlight the huge economic impact of the Internet — “estimates the probable existing economic impact of the internet at between 5 and 9 percent of GDP based on global studies in developed economies. “

They theorize that: “the exponential growth in the number of potential connections or collaborators is supported by the falling cost of communicating information and ideas between those collaborators … The internet provides a huge opportunity for innovation”
This means that as fast internet becomes cheaper, the cost of communication goes down. As this goes down, there are more opportunities for collaboration. This in turn increases the chances for collaborative innovation. And in the digital/knowledge economy, innovation produces growth…and jobs.

One Mckinsey study shows the Internet’s powerful impact on economic growth and posterity where it shows that the Internet makes up to 3.4% of the GDP in developed countries.

Indeed it shows that companies that used Internet extensively have outgrown their less-internet-using competition by up to 2.1 times!

A similar study by the OECD shows that doubling broadband speed accounts for 0.3% of a country’s GDP growth rate . The Philippines’ 2013 Growth rate of 7.2% will now be 7.5% because of higher broadband speed.

In the Digital Economy, internet infrastructure will form the basis of new economic growth—much like basic infrastructure like roads, airports, dams did for the modern economy of a country.
You can’t live without it. Just ask any teenager if they can go one day without the Internet.