โปรแกรม Sandboxie หรือ โปรแกรม จำลองระบบระดับซอฟท์แวร์ (VM)

Written on 10:35 AM by ปั้มเงิน Cookie Run

บทความดีๆ จาก เว็บพันทิพ

Sandboxie คืออะไร
ลองนึกภาพ ว่าคอมพิวเตอร์ ก็เหมือนกระดาษเปล่าแผ่นหนึ่ง เวลาเปิดโปรแกรมต่าง ๆ มันจะเขียนข้อมูลลงบนกระดาษ เมื่อเราเปิดโปรแกรมเบราเซอร์ มันก็จะเขียนข้อมูลต่าง ๆ ลงไปทุกครั้งที่เราเข้าเว็บ เช่นเดียวกันกับมัลแวร์ ก็พยายามเขียนตัวเองบนกระดาษแผ่นนั้นเช่นเดียวกัน

นัย หนึ่ง Sandboxie ทำหน้าที่เป็นชั้นที่โปร่งแสงวางไว้บนกระดาษ โปรแกรมต่าง ๆ รวมถึงสิ่งแปลกปลอมอื่น ก็จะเขียนตัวเอง ลงบนชั้นโปร่งแสงนี้ ซึ่งดูเหมือนว่าเขียนลงบนกระดาษจริง ๆ เมื่อเราลบข้อมูลบน Sandboxie ก็เหมือนกับการดึงเอาชั้นโปร่งแสงนี้ออก กระดาษแผ่นจริงที่ไม่มีการเปลี่ยนแปลงใด ๆ ก็ยังคงอยู่

เกี่ยวกับโปรแกรม:
Sandboxie จะรันหรือติดตั้งโปรแกรมเสมือนจริง (Virtual Installation) ภายใต้พื้นที่ที่แยกต่างหาก หรือเรียกว่า Sandbox โปรแกรมต่าง ๆ ที่รันหรือติดตั้งอยู่ในสภาวะ Sandboxie จะไม่เปลี่ยนแปลงหรือทำความเสียหายใด ๆ ต่อระบบจริง เราสามารถใช้ Sandboxie ทดสอบการติดตั้งหรือรันโปรแกรมที่ไม่น่าไว้วางใจได้ตามต้องการ

ประโยชน์ที่ได้รับ (จากเว็บผู้ผลิต) :
1. ความปลอดภัยจากการติดตั้งหรือรันโปรแกรมที่เสี่ยงต่อไวรัสหรือความความล้มเหลวของระบบ
2. การใช้เว็บอย่างปลอดภัย - การใช้เว็บบราวเซอร์ภายใต้ Sandboxie จะทำให้โปรแกรมประเภท malicious ที่ถูกดาวน์โหลดโดยเบราเซอร์ถูกจับไว้และโยนทิ้งไป
3. ความเป็นส่วนตัว - ข้อมูลประวัติการใช้เว็บ, คุกกี้, และแคชไฟล์ชั่วคราวจะถูกเก็บไว้ใน Sandboxie ทำให้ไม่รั่วไหลออกมาสู่ระบบจริง
4. ใช้อีเมลล์อย่างปลอดภัย - ไวรัสและโปรแกรมประเภท malicious ที่อาจซ่อนอยู่ในอีเมลล์จะไม่สามารถทะลุออกมาจาก Sandboxie และจะไม่แพร่กระจายสู่ระบบจริง

ตัวอย่างการใช้งานจริง
- ต้องการติดตั้งโปรแกรมแปลกใหม่ แต่ไม่แน่ใจว่าจะเข้ากันได้ หรือจะทำให้ระบบมีปัญหาหรือไม่
- ดาวน์โหลดไฟล์ .EXE มา แต่ไม่แน่ใจว่าจะมีไวรัสแถมมาด้วยหรือไม่
- Anti-Virus มองเห็นไฟล์ที่โหลดมาเป็นไวรัส และไม่ยอมให้ทำงาน
- ในเครื่องมี Office 2007 อยู่ แต่อยากลองกลับไปใช้ Office 97 - XP - 2003
- ยังพอใจ Firefox v.3 อยู่ อยากลอง v.4 แต่ไม่อยากเอา v.3 ออก
- ติดตั้งโปรแกรมประเภท Trial แล้วหมดอายุ อยากใช้ต่อ พอ Remove แล้ว ติดตั้งใหม่ ก็ไม่ได้ผล
- จำเป็นต้องใช้ IE เข้าเว็บที่เสี่ยงต่อไวรัส
- ไม่อยากให้เครื่องจำข้อมูลที่เคยเข้าไป
- อยากลองติดตั้งโปรแกรมบางอย่าง แต่ระบบป้องกันการติดตั้ง
- ต้องการซ่อนโปรแกรมที่ติดตั้งไว้ไม่ให้ใครเห็น
- ฯลฯ


จากภาพ เปรียบเทียบระบบปกติ กับ ระบบ Sandboxie จะเห็นว่า เมื่อเราติดตั้งหรือรันโปรแกรม ถ้ามีการเปลี่ยนแปลงข้อมูลใด ๆ หากเป็นระบบปกติ ข้อมูลใหม่จะถูกเขียนไปยังพื้นที่ฮาร์ดดิสก์และรีจิสทรีจริง ส่วนระบบ Sandboxie ข้อมูลจะถูกเขียนไปยังพื้นที่สงวนไว้โดยเฉพาะ (ในกรอบสีเหลือง) โปรแกรมที่ติดตั้งในพื้นที่ส่วนนี้สามารถลบออกและติดตั้งซ้ำได้หลายครั้ง

นี่เป็นหน้าตาของ Windows Explorer แบบ Sandboxie เราสามารถลบ คัด แก้ไข ทุกอย่าง โดยไม่ยุ่งกับ Windows Explorer ของจริง

หรือจะมีไฟล์ autorun.inf ใน Flash Drive หรือไม่ ก็ไม่ใส่ใจ เพราะยังไง มันก็ไม่ออกมารบกวนระบบจริง
ข้อมูลสำคัญ (XXX) เก็บไว้ใน Sandboxie ก็ไม่มีใครมองเห็น

แล้วเราจะรู้ได้ยังไง ว่าขณะนี้ เราอยู่ในสภาวะ Sandboxie หรือ สภาวะจริง...ให้ดูที่เครื่องหมาย [#] ...... [#] แสดงว่าอยู่ในสภาวะ Sandboxie

Tips: เปิดโปรแกรมแบบ Sandboxie โดยการคลิกขวาเลือก Run Sandboxed นะครับ

สิ่งที่เพิ่ม ถ้าเป็นเวอร์ชั่น Register
- ใช้โปรแกรมเกินกว่า 30 วัน โดยไม่มีหน้าจอ Nag Screen ขึ้นมารบกวน
- บังคับให้โปรแกรม ทุกครั้งให้เปิดแบบ Sandbox โดยอัตโนมัติ (ดูรูปข้างล่าง)
- บังคับให้ Drive / Folder ทำงานแบบ Sandbox โดยอัตโนมัติ
- สามารถสร้างหลาย Sandbox

Digg It button for blogger

Written on 1:49 AM by ปั้มเงิน Cookie Run

Are you a digger ? If so then you might want to embed a simple and nice looking digg it button next to your post.

First of all you have to login to your blogger blog admin panel, then select template / edit html, mark Expand Widget Templates and copy paste the whole html code in a plain text editor like notepad. You might consider to make a template backup if something goes terrible wrong :).

Now find the following line of code

<p><data:post.body/></p>
and place this on the next line :
<p>

<!-- DIGG -->
<div style='float:right; margin-left:10px;'>
<script type='text/javascript'>
digg_url = '<data:post.url/>';
</script>
<script src='http://digg.com/tools/diggthis.js' type='text/javascript'/>
</div>
<data:post.body/>
</p>


Thats all folks, copy and paste the html back to your html view and save

Credit Link Blogger Templates


Add a "Save as PDF" Button to your Blog

Written on 2:47 PM by ปั้มเงิน Cookie Run

Want site visitors to print or download your blog posts as PDF documents ?

PDF Online, the free PDF conversion service that helps you create PDF files of your Microsoft Office documents, has released a new online tool for converting HTML web pages to PDFs.

Here's how the new service works - bloggers add a small Javascript snippet in the blog templates, visitors can click the "Save Page as PDF" button and the current web page will be rendered as a PDF document.

Real Example - Print Google.com as PDF

When the SavePageAsPDF service goes live officially, you will be able to track all the PDF conversion activities on your website helping you visualize the most popular content on your blog.

More on the service at pdfonline.com/ and pdfonline.blogspot.com/.

This will be in direct competition with HP Print Widget that also allow printing blog posts and RSS feeds as PDF documents.

Related: CSS for Printer Friendly Web Pages

Update: You can directly embed the URLs in your blog posts without using any javascript. Use the following values for cURL instead of encodeURIComponent(document.location.href)

Classic Blogger - <$BlogItemPermalinkURL$>
Blogger XML Template - data:post.url

การทำ related posts

Written on 2:36 PM by ปั้มเงิน Cookie Run

This widget or hack call it how you like is often requested by fellow bloggers.

Here is the tutorial how to install related posts based on labels underneath your blog posts.

First of all you must know that it won`˙t work if your labels use any reserved url characters.

Go to templates edit html and click on expand widget templates and copy the whole code inside a plain text editor like notepad. You might consider backing up your template if something runs wrong.

Now paste the following in the page header :

<script type="text/javascript">
//<![CDATA[
var relatedTitles = new Array();
var relatedTitlesNum = 0;
var relatedUrls = new Array();
function related_results_labels(json) {
for (var i = 0; i < json.feed.entry.length; i++) {
var entry = json.feed.entry[i];
relatedTitles[relatedTitlesNum] = entry.title.$t;
for (var k = 0; k < entry.link.length; k++) {
if (entry.link[k].rel == 'alternate') {
relatedUrls[relatedTitlesNum] = entry.link[k].href;
relatedTitlesNum++;
break;
}
}
}
}
function removeRelatedDuplicates() {
var tmp = new Array(0);
var tmp2 = new Array(0);
for(var i = 0; i < relatedUrls.length; i++) {
if(!contains(tmp, relatedUrls[i])) {
tmp.length += 1;
tmp[tmp.length - 1] = relatedUrls[i];
tmp2.length += 1;
tmp2[tmp2.length - 1] = relatedTitles[i];
}
}
relatedTitles = tmp2;
relatedUrls = tmp;
}
function contains(a, e) {
for(var j = 0; j < a.length; j++) if (a[j]==e) return true;
return false;
}
function printRelatedLabels() {
var r = Math.floor((relatedTitles.length - 1) * Math.random());
var i = 0;
document.write('<ul>');
while (i < relatedTitles.length && i < 20) {
document.write('<li><a href="' + relatedUrls[r] + '">' + relatedTitles[r] + '</a></li>');
if (r < relatedTitles.length - 1) {
r++;
} else {
r = 0;
}
i++;
}
document.write('</ul>');
}
//]]>
</script>

Scroll down to the blog1 widget, and find the following:

<b:if cond='data:post.labels'>
<data:postLabelsLabel/>
<b:loop values='data:post.labels' var='label'>
<a expr:href='data:label.url' rel='tag'><data:label.name/></a><b:if cond='data:label.isLast != "true"'>,</b:if>
</b:loop>
</b:if>


and change it to :

<b:if cond='data:post.labels'>
<data:postLabelsLabel/>
<b:loop values='data:post.labels' var='label'>
<a expr:href='data:label.url' rel='tag'><data:label.name/></a><b:if cond='data:label.isLast != "true"'>,</b:if>
<b:if cond='data:blog.pageType == "item"'>
<script expr:src='"/feeds/posts/default/-/" + data:label.name + "?alt=json-in-script&amp;callback=related_results_labels&amp;max-results=10"' type='text/javascript'/>
</b:if>

</b:loop>
</b:if>

Save the code back to your template html and go to page elements and add a new HTML/Javascript widget underneath the main blog posts widget with this code :

<script type="text/javascript">
removeRelatedDuplicates();
printRelatedLabels();
</script>

Now go back to Template -> Edit HTML, check the check box to expand the template code, and find the HTML/Javascript widget you just added. It'll look something like the following. Add the lines in bold:

<b:widget id='HTML13' locked='false' title='Related Posts' type='HTML'>
<b:includable id='main'>
<b:if cond='data:blog.pageType == "item"'>
<!-- only display title if it's non-empty -->
<b:if cond='data:title != ""'>
<h2 class='title'><data:title/></h2>
</b:if>
<div class='widget-content'>
<data:content/>
</div>

<b:include name='quickedit'/>
</b:if>
</b:includable>
</b:widget>

There's a few numbers you can tweak to show more or less related posts. In the first code box there is a part that says i < results="10.">



Credit Link Blogger Templates

X Close