Can you surf the web anonymously?

Since I am into computer security and hacking, I am really concerned about anonymity on the internet. There is so much information you are giving away when browsing to a web site.
I personally do not think that you can surf the web anonymously. There are too many factors which you have to account for before being able to browse safely. But I am working on reducing these factors. I am thinking of creating a Firefox extension which helps you protect your privacy and anonymity. And I know there are already a lot of them out there but I do not think that they do a good job at protecting you, at least most of them.

So what do you think? Do you think it is possible to surf anonymously?

Python – Finding Broken Links In An HTML File

I recently wanted to be able to check broken links in an html file and did not want to buy any commercial programs. So I wrote a program in python which shows you the broken links in an html file. Here is the code:

#!/usr/bin/env python

import os, sys

def usage():

    print “usage: %s <html file>” % sys.argv[0]
    print “checks the html file for broken links”

def fileExists(file):

    • inf = os.stat(file)
      return True
      return False
  • try:except OSError:

def extractLink(line, tag):

    index = line.find(tag)+len(tag)+1
    end = line.find(“\””, index+1)
    link = line[index:end]
    return link

def getDirectory(file):

    • index = file.find(“/”, index+1)
  • index = 0
    while file.find(“/”, index+1) > index:directory = file[:index]
    return directory

######################
# the main program starts here #
######################
if len(sys.argv) < 2:

    usage()
    sys.exit()

file = sys.argv[1]
text = open(file, “r”).readlines()
linklist = []
tag = “href=”
#extract the links from the text
for line in text:

      • linklist.append(link)
    • link = extractLink(line, tag)
      if not “\”” in link and not “‘” in link:

  • if tag in line:

if file.startswith(“/”):

    directory = os.path.abspath(getDirectory(file))

else:

    directory = os.path.abspath(getDirectory(os.getcwd()+”/”+file))

if not directory.endswith(“/”):

    directory = directory+”/”

print “-“*30
print “missing file(s): ”
print “-“*30
for link in linklist:

      • print link
    • fl = link
      val = fileExists(fl)
      if not val:

      • print link
    • fl = directory+link
      val = fileExists(fl)
      if not val:

  • if link.startswith(“/”):

    elif not link.startswith(“http://&#8221;):

print “-“*30

There are a lot of possibilities to improve this program, e.g. you could provide the line on which the broken link is etc. Feel free to post any improvements or comments, I hope this is helpful.

Learning How To Hack – Part 2

It is good that you are eager to learn more because that is how you actually become a good hacker. As it says on Darknet “Don’t learn to hack – hack to learn”, that is the key to becoming a hacker.
Read books
Since you are serious about becoming a hacker is suggest you read a lot of books, it is essential. If your budget is tight consider going on free ebook sites like Wowio. You should also be able to find a whole lot of articles on the security sites mentioned below.
Read news
Read news on computer security since you need to be up to date. Here are some useful sites:

  • SecurityFocus security site with an exploit archive
  • Darknet great computer security news site
  • PacketStorm news site with a huge collection of security papers
  • Astalavista security news site
  • Irongeek site containing lots of videos about computer security

Legal training grounds for hacker
To complete the list from the first part I provided some additional training sites which might help you.
One of them is Starfleet Academy which was made to improve your knowledge on internet security. There are 16 levels all of which are ,more or less, basic web challenges. One important thing to note is that you can not jump to higher levels, you have to complete the levels one by one.
Another training ground for hacker is Hackerslab where you need to register before being able to complete the missions.

These two are very helpful site but if you really want to learn hacking I suggest you go to the sites which I provided in the first part since these are hacker communities where people will also be happy to help you out if you are having problems.

I am soon going to post some more information about hacking, reverse engineering etc.

Related Articles:



Bookmark and Share

Bash/Python – Extracting Links From An HTML File

I recently came across the need to extract links from an html file. Of course I wanted to automate the whole procedure. There is an easy way of doing this using the bash shell.

cat file | grep "=href" | cut -d"/" -f3

This gives you some ugly links so you can improve it by grepping the domain name.

cat file | grep "=href" | cut -d"/" -f3 | grep domain

Of course domain is the domain name which should be included in the links.

Since I still wasn’t satisfied I wrote a little program in python which does exactly the same thing as the commands mentioned above. Here is the code:

#!/usr/bin/env python

import sys

def usage():

print “usage: %s <file> ” % sys.argv[0]
print “prints all the links contained in that file”

def extractLink(line, tag):

index = line.find(tag)+len(tag)+1
end = line.find(“\””, index+1)
link = line[index:end]
return link

if len(sys.argv) < 2:

usage()
sys.exit()

file = sys.argv[1]
text = open(file, “r”).readlines()
linklist = []
tag = “href=”
for line in text:

if tag in line:

link = extractLink(line, tag)
if not “\”” in link and not “‘” in link:

print link

This seems to be a lot of code but it actually isn’t considering that it was written in a higher level language. If you want to use this code you have to align it properly.

Feel free to post some improvements.

Learning How To Hack – Part 1

This article is written for people who want to learn how to hack but don’t know where to start. In generell it takes a lot of time and knowledge to become a good hacker. For this reason I’m going to show you how you can speed up the process of becoming a hacker by providing you with different legal training grounds for hackers as a starting point.

There are several good web sites where you can learn to hack. These will provide you with a wealth of information on computer security and give you hands-on experience since hacking, as with everything, is really about experience.

Where can I learn about hacking?!

Hackthissite is a great web site to get started with. But before you can take a look at the missions, you need to register. After having registered try out the different challenges. If you are having difficulties with the missions visit the forum or HTS’ irc channel, both were created to help beginners. Otherwise post your problems here and I’ll try to help you out.

Another great web site is Hellboundhackers. It also requires you to register but offers a lot more challenges. It has a forum in which you can post questions about the missions, if you are having trouble. HBH has also several articles about computer security which you might find interesting.

To sum it up, Hackthissite and Hellboundhackers are both good sites where you can learn about hacking, even though HTS is probably the better one for beginners. I find that HBH’s challenges are often quite frustrating because there is usually only one way of solving it.

This is it for now, later I’m going to add some other sites and provide you with more information about them.

Related Articles:



Bookmark and Share