Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles
(untagged)

IP Address & URL Encoder

0.00/5 (No votes)
19 Jan 2015 1  
Non Printing Characters are invalid when placing it in URL field. These characters may include &, ^, % signs, etc. most Web Platforms somehow have ways to encode and decode this escaped format. This program is design to develop a Logic for Encoding and Decoding the URL, IP Address and HTML Attribute

Introduction

URL (Uniform Resource Locator) encoding is normally performed to convert data passed via HTML forms, Different links, addresses that have been received via Email Attachments, MMS Messages, Instant Messages, Blogs, Forums can be used to trick users in order to compromise their systems. This program is deliberately made for identifying forge URL addresses, Encoded IP Addresses.

Background

Some Common Special Characters
Here's a table of some often used characters and their URL encodings:

Character

URL Encoded

; %3B
? %3F
/ %2F
: %3A
# %23
& %26
= %3D
+ %2B
$ %24
, %2C
<space> %20 or +
% %25
< %3C
> %3E
~ %7E
% %25

Using the Code

double firstans1  = firstoct * 16777216;
double secondans2 =    secct * 65536;
double thridans   = thridoct * 256;
double forthans   = ourthoct;

double answer = firstans1 + secondans2 + thridans + forthans;

Example : (first octet * 256³) + (second octet * 256²) + (third octet * 256) + (fourth octet)

Points of Interest

There are thousands of spammers that used encoded URL and IP address in order to redirect user to another malicious Web Page. This Encoding Program will help user to check, verify the link, Path of the URL. Some examples are shown below:

http%3A%2F%2Fwww%2Eubaidjafri%2Ecom

directed as:

http://www.ubaidjafri.com

Another example:

http%3A%2F%2Fwww%2Eubaidjafri%2Ecom%2Fimages%2Fflag.png

directed as:

http://www.ubaidjafri.com/images/flag.png

User could be able to see the clear picture as shown in the above example, If user receives any malicious encoded link, they would be able to decode that link and check what the original link is.

History

Electronic spamming is the use of electronic messaging systems to send unsolicited messages (spam), especially advertising. As well as sending messages repeatedly on the same site.Spamming remains economically viable because advertisers have no operating costs beyond the management of their mailing lists, and it is difficult to hold senders accountable for their mass mailings.

Email spam, also known as unsolicited bulk Email (UBE), junk mail, or unsolicited commercial email (UCE), is the practice of sending unwanted email messages, frequently with commercial content, in large quantities to an indiscriminate set of recipients. Spam in email started to become a problem when the Internet was opened up to the general public in the mid-1990s. It grew exponentially over the following years, and today composes some 80 to 85% of all the email in the world, by a "conservative estimate".

Increasingly, Email spam today is sent via "zombie networks", networks of virus- or worm-infected personal computers in homes and offices around the globe. Many modern worms install a backdoor which allows the spammer to access the computer and use it for malicious purposes. This complicates attempts to control the spread of spam, as in many cases the spam does not obviously originate from the spammer. In November 2008, an ISP, McColo, which was providing service to botnet operators, was depeered and spam dropped 50%-75% Internet-wide.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here