Category Archives: Programming

SDP, SDN?

Today, I find that CSA(Cloud Security Alliance) have started the SDP(Software Defined Perimeter). The SDP is a framework of security controls to mitigates netowkr-based attacks on Internet-accessible applications by easing conectivities to those until devices/users are authenticated and authorized. The … Continue reading

Posted in Programming, Security, 資訊安全 | Leave a comment

AngularJS: The framework of JS based on MVC

在許多Javascript MVC的framework中,除了ExtJS、Backbone.js、YUI、EmberJS以外,AngularJS 也是目前最被熱烈討論的Javascript MVC framework之一。他除了有Google大神的支持以外,也使用MIT授權協議,逐漸成為商業產品的熱門選擇。 如果各位有興趣的話,可以先看以下Slides介紹,再搭配Will保哥的介紹文服用。 相關連結: AngularJS: Overview 前端工程的極致精品: AngularJS 開發框架介紹 AngularJS中文電子書 (推薦)

Posted in Programming, 程式設計, 網頁撰寫, 資工 | Leave a comment

Interesting Experiments in SHA3

I’ve tried MD5, SHA256, SHA3-512 algorithms with 1, 10, and 100 million bytes. In general, SHA3-512 is lower than SHA256 for 3 ~ 10 times. In these cases, MD5 is the fastest algorithm which is faster than SHA256 for 3 … Continue reading

Posted in C, Programming, 學術, 科技, 程式設計 | Leave a comment

[Linux] Autoconf, Automake

[筆記一下自己學Autoconf, Automake這一類的GNU Build Tool。][2013/07/14 更新:把linker 引用libraries的順序寫得更清楚一些。] 身為常常用Linux的程式設計師兼MIS人員來說,在Linux系統上面要編譯程式是很家常便飯的事情。最常用的指令是./configure; make; make install ,筆者稱之為「大三元」。只是如果今天角色互換,變成我們來開發程式,並且把程式以開放原始碼的方式發送出去,該怎麼做呢?其實上述說的大三元指令,是由GNU Build System提供的aclocal, autoconf, automake幫你產生configure script file以及對應的Makefile。由於筆者做專案需要引用curl這個library。石頭閒言閒語部落格提供教學雖然基本,但是又不太夠用。以下便筆記一下自己在做該專案的方式,稱不上專業,若有謬誤,敬請多多包涵。 以下分為四個步驟來解說。 一、 先前準備工作1. 今假設你的專案名稱為project。程式碼資料夾為src。    而且我們寫了一份程式碼,放在src/add.cpp底下。2. 先準備四個文件:AUTHORS、ChangeLog、NEWS、README    (1) AUTHORS:寫明作者資訊。    (2) ChangeLog:程式碼異動記錄。    (3) NEWS:最新消息    (4) README:軟體說明與介紹其它像是INSTALL(軟體安裝文件)以及COPYING(版權聲明),automake時,便會幫我們自動產生。注意!如果你用的是舊版的Linux系統(例如筆者的CentOS 5),COPYING是用GPL v2,如果是新的Linux系統,COPYING是用GPL v3。3. 建立doc資料夾。 … Continue reading

Posted in C/C++, Linux, Programming, 程式設計 | 1 Comment

[ASP.NET] ASP.NET撰寫時應注意的觀念

有撰寫過PHP/JSP/ASP網頁程式設計的人員請注意! ASP.NET 使用Window Form的設計模式與一般我們在使用GET/POST表單傳遞方式不一樣。 請謹記以下6個基本要點,以免到時候撰寫程式時卡東卡西的。 1. ASP.NET 採用的Window Form,預設會塞一個Form表單在裡面,請勿另外自己撰寫<form>… </form>標籤。 2. ASP.NET 控制項所有的操作,都是自動作用在自己這張頁面中(自己傳給自己)。採用的方式即是所有的動作都使用表單傳回給自己。例如,在ASP.NET專案的Default.aspx 加入以下: <asp:button id=”button1″ click=”button1_click(xxx…)”></button> 它的button1_click事件,是自動傳參數給本身的頁面(Default.aspx),頁面在接收到傳遞的資訊後,再執行click事件所委派的方法。 3. 按照ASP.NET執行流程,會先執行Page_Load方法,再依序初始化控制項,並執行其他方法。 4. 承3,由於每個動作都會引發Page_Load方法,所以要判定是否第一次存取頁面,請善用if ( this.IsPostBack … )這個判斷式,如果回傳false,代表第一次讀取頁面。若回傳true,代表第二次之後的頁面讀取。 5. 學習ASP.NET時,會使用ViewState[]、Session[] 與 Application[] 這幾個變數。差別如下:    (1) ViewState[] 是將變數內嵌在html程式碼中,以<input type=’hidden’ … >的方式存在。因此,不能跨頁面存取。這類變數只能在自己本身的頁面內做存取。   (2) … Continue reading

Posted in ASP.NET, Programming, Web Design, 程式設計 | Leave a comment

[Program] The Framework for Auto Updating Programs

I’ve made up of some frameworks for auto updating program. If you want to make your program with fashion of auto-updating, you can refer to the following table. Table of Auto Update Program Framework Name Tutorials Platform License Dev. Lang. … Continue reading

Posted in C, C/C++, Java, Programming, 程式設計, 軟體(Software) | Leave a comment

[Javascript] JSONP: some useful tutorials

If you want to know the detail process of JSONP(JSON with Padding).There are some useful web pages: [JSONP] Use jQuery + JSONP + ASP.Net to get data via  the cross-domain way. ( in Chinese) Cross-Domain Ajax (JSONP) (in Chinese)

Posted in ajax, jQuery, Programming, Web Design | Leave a comment

Trend Message Exchange(TME)

Trend Micro System has released its Trend Message Exchange(TME) source code with “Apache License”.  If you are interested in this system, you can see the slidesfor introduction or go to the official web site. As you see in the architecture, … Continue reading

Posted in Programming, 軟體(Software) | Leave a comment

[.NET] 防止反組譯工具

由於.NET程式為了跨平台,導入CLR(Common Language Run-time),讓所有.NET程式編成MSIL(Microsoft Intermediate Language)程式碼,使其在CLR上運作(簡單來說,就是MS版的JVM)。也正因如此,其編譯出來的程式碼,都有一定的規則可以做逆向工程,進行反組譯。 知名的反組譯工具有:.NET Reflector(要錢), ILSpy (筆者測試過,若程式碼不加以防護的話,用這套很容易把程式碼完全還原回來…) 以及Telerik的JustDecompiler 但是,在販賣軟體產品的開發人員,應該不想要讓自己的程式碼被輕易地破解吧? 就目前讀到的參考資料,可將防止反組譯方法分為以下:1. 混淆保護(Obfuscating) :將程式碼變數命名或是方法做混淆,或是加入無意義的文字,使其無法輕易破解。    此類工具較為知名的有微軟合作夥伴PreEmptive推出的Dotfuscastor (Community版本內建於Visual Studio,這個版本不用錢;但是Professional版要錢,此二版本功能差異請見此文章)    若想要使用此工具進行軟體保護的話,可見以下兩篇教學:    (1) Dotfucscator 使用者入門    (2) Obfuscation with Dotfuscator with Visual Studio 20102. Kernel等級的加密保護:使其無法用MSIL去讀取。代表工具:MaxToCode3. 硬體鎖:採用硬體鎖的方式,避免程式盜用。(貌似跟反組譯無關) 參考資料1. .NET反組譯工具:ILSpy, Telerik JustDecompile2. 使用SuppressIldasmAttribute防止MSIL反組譯工具對組件進行反組譯3. [.NET Concept][Security].NET程式保護機制概述 (Recommended)4. MaxToCode

Posted in C, Programming, visual studio, 程式設計, 資訊安全, 軟體(Software) | Leave a comment

[Web] How to force browsers not to cache your website?

I’ve found the useful meta tag information, and you just add the information inside “head” tag. <meta http-equiv=”no-cache”><meta http-equiv=”Expires” content=”-1″><meta http-equiv=”Cache-Control” content=”no-cache”><meta http-equiv=”Pragma” content=”no cache”> Cheers.

Posted in Programming, Web Design, 網頁撰寫 | Leave a comment