‘Honey Encryption’ bamboozles hackers with fake data

A new form of encryption called “Honey Encryption” protects data with an added deceptive security mechanism. Fake data that looks like valid information is presented to cybercriminals upon each failed password attempt.

The encryption software, developed by independent researcher and former RSA chief scientist Ari Juels and University of Wisconsin researcher Thomas Ristenpart, generates a piece of fake data resembling the user’s real information each time a hacker fails to access an account, as is common in brute-force hacking. The idea behind “Honey Encryption” is that if the intruder does ultimately enter the correct password and breach the account, the real data will be indistinguishable from the fake data.

“Decoys and deception are really underexploited tools in fundamental computer security,” Juels told MIT Technology Review. “Each decryption is going to look plausible. The attacker has no way to distinguish which is correct.”

Traditional encryption methods obfuscate the data, or make it look unintelligible, so hackers need to make sense of the garbled data after accessing it. At RSA, Juels previously worked on a precursor to “Honey Encryption” called “Honeywords,” which added additional fake passwords to the already encrypted password in a given account.

Juels and Ristenpart will present their paper, “Honey Encryption: Security Beyond the Brute-Force Bound,” at the 2014 Eurocrypt Conference, which takes place on May 11-15 in Copenhagen, Denmark.

CSS selector for all the textboxes

Usual way of applying styles for all the textboxes is like below

input[type=”text”] {
/*CSS here*/
}

Problem with the above is, it will not include the textboxes which get renders when you simply put a <input> tag. Note that when you do not specify the type attribute in input elements, it will render as the default input element, textbox. The above CSS selector won’t work in such cases. In such cases, you can use the below

input:not([type]), input[type=”text”]
{
/*CSS here*/
}

It will select all the input control without a type attribute as well as which are marked as type=”text”

Can’t Upload Your Ebook ‘Cause It’s ‘Encrypted’? Here’s Why.

Have you ever came across a situation where you or your friend are not able to upload your ebooks to Amazon, or one of the other online stores because the ebook site tells them the files are encrypted.

This is a classic problem that folks run into with InDesign conversion — Adobe’s a font foundry as well as a software company, and so when you embed fonts while converting from InDesign, the page-layout app automatically obfuscates them. Essentially, it encrypts them so that only a person with the license to use that font on that machine can open the ebook. So most ebook sites won’t allow you to upload a file with obfuscated fonts. (They just don’t tell you that. They say the file’s “encrypted.” That’s helpful!)

The problem is that many professional designers are used to laying out books in ID. And its ePub-exporting function has gotten good enough in the last few iterations of the software that it actually can be useful in creating ebooks — especially if the ebooks have complicated formats or lots of internal hyperlinking (i.e., footnotes or cross-references). However, if you aren’t paying attention, font obfuscation can kill the whole process.

There are ways to turn obfuscation off in the ePub file after it’s been generated — but that’s not necessarily the best answer.

The thing to remember about embedded fonts is that unless you’ve created a fixed-format ebook, the users’ preferences will usually trump whatever typographic adjustments you’ve made. Base font size, typeface — all of those are settable by the reader. Some ereaders and ereader apps have a setting to “Use Publisher’s Fonts” — Kindle for iOS does, for example — but even then, if the user has set their typeface preference to Palatino, say, or Comic Sans (:shudder:), the whole book will display in that. At that point, the fonts are adding size your file for no reason. In the case of Amazon, that means that the publisher is paying a few pennies more “transport fee” for each download, and buyers have to wait another few milliseconds for the book to download, and all for nothing.

So except in special cases — basically decorative drop-caps or headers, or in fixed-format books — I’ve generally stopped embedding. I use CSS instead to suggest fonts, always ending with the option “serif,” “san-serif,” “monotype,” or “handwriting.” Here for example is the body text style for an ebook that I did recently:

Normal {
font-family: 'Adobe Caslon Pro',Caslon,'Adobe Garamond Pro',Garamond,Palatino,'Times New Roman',Times,Cochin, serif;
font-size: 12pt;
line-height: 1.2;
font-weight: normal;
font-style: normal;
text-align: justify;
text-indent: 2em;
}

That way the ereader will use the first option that I give it that it has available — unless the user has stated a different preference, in which case there’s nothing to be done.

You can turn off font embedding in the dialogue box when you export from InDesign. Go to the “advanced” tab. You’ll see a collection of check boxes labeled “CSS Options”:

Just uncheck the “Include Embeddable Fonts” box, and InDesign won’t add the fonts to the ebook file. (You can always add them later if you want.)

The other point to consider is that font licenses don’t usually allow distribution through ebooks — not even free fonts. So by sending the fonts out un-obfuscated, you’re breaking your license agreement and, essentially, pirating the fonts.

<source: http://www.huffingtonpost.com/david-kudler/cant-upload-your-ebook-ca_b_4338399.html?utm_hp_ref=technology&ir=Technology>

5 Open Source Tools for Web Developers

There’s always something new in open source software. New projects are being born every day, and Datamation recently put the  spotlight on 50 open source projects that seem particularly promising. One trend noted was the sheer volume of projects surrounding JavaScript and Web development.

Courtesy of Datamation here’s five open source development tools for Web developers.

1. Bootstrap

First released by Twitter in 2011, Bootstrap is a front-end framework for Web development that aims to speed the development process. It takes a mobile-first approach and compiles code to pure CSS. Operating System: OS Independent

2. Brackets

This Adobe project is currently one of the most popular on GitHub, though it’s still a preview release. Brackets is a code editor built with Web technologies for developers who are working in Web technologies. Operating System: OS Independent

3. CodeMirror

CodeMirror is a browser-based text editor. Basically, it allows Website developers to embed a code editor in their sites, which is useful if you’re creating a site that offers programming tutorials. In addition to desktop browsers, it also works with many mobile browsers. Operating System: OS Independent

4. Ember.js

There are a lot of JavaScript Web development frameworks out there—Ember calls itself “a framework for creating ambitious Web applications. It aims to make developers more productive immediately. Operating System: OS Independent

5. ZURB Foundation

ZURB Foundation

One of the most popular projects on GitHub, Foundation humbly proclaims itself “The most advanced responsive front-end framework in the world.” With it, web developers can quickly create sites that automatically adjust for the size and type of device being used for access. Operating System: OS Independent

Super Mario Song using Console.Beep()

Most of us might be well aware of what Console.Beep() in Console Application does…

YES, U R RIGHT, it Plays the sound of a beep through the console speaker.

Of course I was looking for ways to do fun stuff with this, guess what I found on reddit? Someone had done the Super Mario theme using Console.Beep() because Console.Beep() takes a frequency and a length for how long it should play. This is possibly one of the coolest things I’ve seen so far in my short time of learning C#!

Copy Paste below Code in Console Application, Run it and Get Amazed:

Console.Beep(659, 125); Console.Beep(659, 125); Thread.Sleep(125); Console.Beep(659, 125); Thread.Sleep(167); Console.Beep(523, 125); Console.Beep(659, 125); Thread.Sleep(125); Console.Beep(784, 125); Thread.Sleep(375); Console.Beep(392, 125); Thread.Sleep(375); Console.Beep(523, 125); Thread.Sleep(250); Console.Beep(392, 125); Thread.Sleep(250); Console.Beep(330, 125); Thread.Sleep(250); Console.Beep(440, 125); Thread.Sleep(125); Console.Beep(494, 125); Thread.Sleep(125); Console.Beep(466, 125); Thread.Sleep(42); Console.Beep(440, 125); Thread.Sleep(125); Console.Beep(392, 125); Thread.Sleep(125); Console.Beep(659, 125); Thread.Sleep(125); Console.Beep(784, 125); Thread.Sleep(125); Console.Beep(880, 125); Thread.Sleep(125); Console.Beep(698, 125); Console.Beep(784, 125); Thread.Sleep(125); Console.Beep(659, 125); Thread.Sleep(125); Console.Beep(523, 125); Thread.Sleep(125); Console.Beep(587, 125); Console.Beep(494, 125); Thread.Sleep(125); Console.Beep(523, 125); Thread.Sleep(250); Console.Beep(392, 125); Thread.Sleep(250); Console.Beep(330, 125); Thread.Sleep(250); Console.Beep(440, 125); Thread.Sleep(125); Console.Beep(494, 125); Thread.Sleep(125); Console.Beep(466, 125); Thread.Sleep(42); Console.Beep(440, 125); Thread.Sleep(125); Console.Beep(392, 125); Thread.Sleep(125); Console.Beep(659, 125); Thread.Sleep(125); Console.Beep(784, 125); Thread.Sleep(125); Console.Beep(880, 125); Thread.Sleep(125); Console.Beep(698, 125); Console.Beep(784, 125); Thread.Sleep(125); Console.Beep(659, 125); Thread.Sleep(125); Console.Beep(523, 125); Thread.Sleep(125); Console.Beep(587, 125); Console.Beep(494, 125); Thread.Sleep(375); Console.Beep(784, 125); Console.Beep(740, 125); Console.Beep(698, 125); Thread.Sleep(42); Console.Beep(622, 125); Thread.Sleep(125); Console.Beep(659, 125); Thread.Sleep(167); Console.Beep(415, 125); Console.Beep(440, 125); Console.Beep(523, 125); Thread.Sleep(125); Console.Beep(440, 125); Console.Beep(523, 125); Console.Beep(587, 125); Thread.Sleep(250); Console.Beep(784, 125); Console.Beep(740, 125); Console.Beep(698, 125); Thread.Sleep(42); Console.Beep(622, 125); Thread.Sleep(125); Console.Beep(659, 125); Thread.Sleep(167); Console.Beep(698, 125); Thread.Sleep(125); Console.Beep(698, 125); Console.Beep(698, 125); Thread.Sleep(625); Console.Beep(784, 125); Console.Beep(740, 125); Console.Beep(698, 125); Thread.Sleep(42); Console.Beep(622, 125); Thread.Sleep(125); Console.Beep(659, 125); Thread.Sleep(167); Console.Beep(415, 125); Console.Beep(440, 125); Console.Beep(523, 125); Thread.Sleep(125); Console.Beep(440, 125); Console.Beep(523, 125); Console.Beep(587, 125); Thread.Sleep(250); Console.Beep(622, 125); Thread.Sleep(250); Console.Beep(587, 125); Thread.Sleep(250); Console.Beep(523, 125); Thread.Sleep(1125); Console.Beep(784, 125); Console.Beep(740, 125); Console.Beep(698, 125); Thread.Sleep(42); Console.Beep(622, 125); Thread.Sleep(125); Console.Beep(659, 125); Thread.Sleep(167); Console.Beep(415, 125); Console.Beep(440, 125); Console.Beep(523, 125); Thread.Sleep(125); Console.Beep(440, 125); Console.Beep(523, 125); Console.Beep(587, 125); Thread.Sleep(250); Console.Beep(784, 125); Console.Beep(740, 125); Console.Beep(698, 125); Thread.Sleep(42); Console.Beep(622, 125); Thread.Sleep(125); Console.Beep(659, 125); Thread.Sleep(167); Console.Beep(698, 125); Thread.Sleep(125); Console.Beep(698, 125); Console.Beep(698, 125); Thread.Sleep(625); Console.Beep(784, 125); Console.Beep(740, 125); Console.Beep(698, 125); Thread.Sleep(42); Console.Beep(622, 125); Thread.Sleep(125); Console.Beep(659, 125); Thread.Sleep(167); Console.Beep(415, 125); Console.Beep(440, 125); Console.Beep(523, 125); Thread.Sleep(125); Console.Beep(440, 125); Console.Beep(523, 125); Console.Beep(587, 125); Thread.Sleep(250); Console.Beep(622, 125); Thread.Sleep(250); Console.Beep(587, 125); Thread.Sleep(250); Console.Beep(523, 125);

Validation in MVC

Range Validation in MVC

The Range attribute specifies minimum and maximum constraints for a numerical value. If the Music Store only wanted to serve middle-aged customers, you could add an Age property to the Order class and use the Range attribute as in the following code:

[Range(35,44)]
public int Age { get; set; }

 The first parameter to the attribute is the minimum value, and the second parameter is the maximum value. The values are inclusive. The Range attribute can work with integers and doubles, and another overloaded version of the constructor will take a Type parameter and two strings (which can allow you to add a range to date and decimal properties, for example).

[Range(typeof(decimal), "0.00", "49.99")]
public decimal Price { get; set; }

RegularExpression Validation in MVC

Some properties of Order require more than a simple presence or length check. For example, you’d like to ensure the Email property of an Order contains a valid, working e-mail address. Unfortunately, it’s practically impossible to ensure an e-mail address is working without sending a mail message and waiting for a response. What you can do instead is ensure the value looks like a working e-mail address using a regular expression:

[RegularExpression(@"[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}")]
public string Email { get; set; }

Regular expressions are an effi cient and terse means to enforce the shape and contents of a string value. If the customer gives you an e-mail address and the regular expression doesn’t think the string looks like an e-mail address, the customer will see the error in Figure.
RegularExpression-Validation-in-MVC

StringLength Validation in MVC

You’ve forced the customer to enter his name, but what happens if he enters a name of enormous length? Wikipedia says the longest name ever used belonged to a German typesetter who lived in Philadelphia. His full name is more than 500 characters long. Although the .NET string type can store (in theory) gigabytes of Unicode characters, the MVC Music Store database schema sets the maximum length for a name at 160 characters. If you try to insert a larger name into the database, you’ll have an exception on your hands. The StringLength attribute can ensure the string value provided by the customer will fit in the database:

[Required]
[StringLength(160)]
public string FirstName { get; set; }
[Required]
[StringLength(160)]
public string LastName { get; set; }

Notice how you can stack multiple validation attributes on a single property. With the attribute in place, if a customer enters too many characters, he’ll see the default error message shown below the LastName field in Figure.

StringLength-Validation-in-MVC

MinimumLength is an optional, named parameter you can use to specify the minimum length for a string. The following code requires the FirstName property to contain a string with three or more characters (and less than or equal to 160 characters) to pass validation:

[Required]
[StringLength(160, MinimumLength=3)]
public string FirstName { get; set; }

Required Validation in MVC

Because you need the customer to give you his fi rst and last name, you can decorate the FirstName and LastName properties of the Order model with the Required attribute:

 [Required]
public string FirstName { get; set; }
[Required]
public string LastName { get; set; }
[Required(ErrorMessage = "Nick name is required")]
public string NickName { get; set; }

 The attribute raises a validation error if either property value is null or empty.

Like all the built-in validation attributes, the Required attribute delivers both server-side and client side validation logic (although internally, it is another, different component in the MVC framework that delivers the client-side validation logic for the attribute through a validation adapter design).

With the attribute in place, if the customer tries to submit the form without providing a last name, he’ll see the default error in Figure.

Required-Validation-in-MVC

However, even if the customer does not have JavaScript enabled in his browser, the validation logic will catch an empty name property on the server, too.

Difference between a URI and a URL?

According to RFC 3986:

 A URI can be further classified as a locator, a name, or both. The term “Uniform Resource Locator” (URL) refers to the subset of URIs that, in addition to identifying a resource, provide a means of locating the resource by describing its primary access mechanism (e.g., its network “location”). The term “Uniform Resource Name” (URN) has been used historically to refer to both URIs under the “urn” scheme [RFC2141], which are required to remain globally unique and persistent even when the resource ceases to exist or becomes unavailable, and to any other URI with the properties of a name.

In Simple Words…

URIs identify and URLs locate; however, locations are also identifications, so every URL is also a URI, but there are URIs which are not URLs.

Consider a specific edition of Shakespeare’s play Romeo and Juliet, of which you have a digital copy on your home network.

You could identify the text as urn: ISBN: 0-486-27557-4.
That would be a URI, but more specifically a URN because it names the text.

You could also identify the text as file://hostname/sharename/RomeoAndJuliet.pdf.
That would also be a URI, but more specifically a URL because it locates the text.

Another Example

  • Bruce Wayne

This is my name, which is identification. It is like a URI, but cannot be a URL, as it tells you nothing about his location or how to contact him. In this case it also happens to identify at least 5 other people in the USA alone.

  • 4914 Wayne Manor, Gotham City, USA

This is a location, which is identification for that physical location. It is like both a URL and URI (since all URLs are URIs), and also identifies me indirectly as “resident of…”.

What should be the maximum length of a URL?

If you keep URLs under 2000 characters, they’ll work in virtually any combination of client and server software.

Extremely long URLs are usually a mistake. URLs over 2,000 characters will not work in the most popular web browser. Don’t use them if you intend your site to work for the majority of Internet users.

IE8’s maximum URL length is 2083 chars, and it seems IE9 and IE10 also has a similar limit. You can click a URL which is longer than this, but the address bar will still only show 2083 characters of link.

There’s also some research from 2010 into the maximum URL length that search engines will crawl and index. They found the limit was 2047 chars, which appears allied to the sitemap protocol spec. However, they also found the Google SERP tool wouldn’t cope with URLs longer than 1855 chars.

Generate Test Data [Excel, JSON, SQL, XML, Etc] fatafat using GenerateData.Com !!!

Ever needed custom formatted sample / test data, like, bad? Well, that’s the idea of this script. GenerateData.Com is a free, open source tool written in JavaScript, PHP and MySQL that lets you quickly generate large volumes of custom data in a variety of formats for use in testing software, populating databases, and… So on and so forth.

Visit to try – http://www.generatedata.com/