Archive for Code

How to Prevent Employees from writing or copying to a USB Drive

Working in Computer Security, one of the biggest threats we face today is the threat of an Insider, an Employee who might casually walk in with his 4 GB USB Flash drive, plug it in to their computer within the corporate network and walk away with valuable data. I have seen solutions ranging from expensive Intrusion Prevention Systems to disabling access to the USB drive all together.

In the first scenario, a company might not have enough financial resources for such an expensive IPS solution. The second scenario is impossible to implement in a corporation, think about the external USB keyboards, mouse or a LCD screen.

Prevent a user from writing to a USB drive

In this scenario, let us think that a corporation has migrated to Windows Vista from Windows XP. It does not wish to use an expensive solution but at the same time lock down users from having access to the WRITE capability with regard to a USB device.

1. Open Notepad and copy the following

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced]
“EncryptionContextMenu”=dword:00000001

2. Save the file as USBNoWrite_Vista.reg

Read the rest of this entry »

Comments (1)

Wordpress and Google Summer of Code

Looking for something fun to do this summer? All college and university students around the world are invited to apply to get paid $4,500 USD to work on your favorite open source project this summer.  This Blog is powered by WordPress and looks like it is only about to get even better.  WordPress is among the 131 accepted to Google Summer of Code, of more than 300 projects that applied.

It seems that Wordpress has eight committed volunteers who are enthusiastic to mentor, learn, and make WordPress a little better in the process.

Check out their ideas for projects, or propose your own. You must apply by March 24.

Good luck!

Comments (3)

Google Mature Adsense Policy workaround for a Wordpress Blog

I am also a Security Editor at a very popular student portal AskStudent. Like most other portals, our operations are supported by Advertising and we use Google Adsense to take care of advertising on AskStudent. At AskStudent, we cover a lot of topics such as Security, Health, Career, Jobs, Coding, Money matters, Shopping etc. We also cover Sexual Health and Love and Relationships at AskStudent.

Last week, out of the blue, our Senior Editor gets an email from the Google Adsense Team

Hello,

While reviewing your account, we noticed that you are currently displaying Google ads in a manner that is not compliant with our policies. For instance, we found violations of AdSense policies on pages such as http://www.askstudent.com/2006/12/02/maturecontentpostataskstudent/?preview=true.

As stated in our program policies, AdSense publishers are not permitted to place Google ads on pages with adult or mature content.

Please make any necessary changes to your web pages in the next 3 business days. We also suggest that you take the time to review our program policies (https://www.google.com/adsense/policies) to ensure that all of your other pages are in compliance.

Once you update your site, we will automatically detect the changes and ad serving will not be affected. If you choose not to make the changes to your account within the next three days, your account will remain active but you will no longer be able to display ads on the site. Please note, however, that we may disable your account if further violations are found in the future.

Thank you for your cooperation.

Sincerely,

The Google AdSense Team

Now, this was a problem. We did not know what Google treated as mature content. However, with respect to the post in question, it was justified. So the first step we did was remove all ads serving on AskStudent while we figured out a solution to this problem. At AskStudent, we use Adsense Deluxe plugin. If you don’t use this plugin and manually serve ads or hard coded the ads, then I would highly recommend using this plugin.

Now, There are two solutions to solving this problem of how to avoid serving ads on a mature content post but keep serving ads on the rest of the blog

Solution # 1: After disabling ads generation through Adsense Deluxe, you can manually copy and paste adsense code onto individual posts. However for a portal like AskStudent with hundreds of articles, this is almost a highly time consuming if not an impossible task.

Solution # 2: Perfect Solution: Code it up

Read the rest of this entry »

Comments

How to edit any Webpage on the fly using JavaScript

OurPicks have an interesting piece of code snippet on their forums. A simple JavaScript code that lets you edit any webpage, static or dynamic on the fly

Let us try this:

Step # 1: Go to any website. Let us go to Slashdot.org

Step # 2: Delete everything in the address bar

Step # 3: Paste the following JavaScript code in the address bar

javascript:document.body.contentEditable=’true’; document.designMode=’on’; void 0

Step # 4: Enjoy

Webpage edit of Slashdot on the fly

Comments