If you like Cryptography and you like to learn programming language, then i would suggest you to read Hacking Secret Ciphers with Python. It's available for free in PDF format or the online HTML version or you can buy it for $25 in Amazon.
What you will get is a fun tutorial with Python on Cryptography. This book is aimed at people who have no experience programming or with
cryptography. The book goes through writing Python programs that not
only implement several ciphers but also can hack these ciphers.
The book's website is available on http://inventwithpython.com/hacking
All about my activities, thoughts, inspiration, ideas, and everything that happened around me
Showing posts with label Programming. Show all posts
Showing posts with label Programming. Show all posts
Tuesday, April 16, 2013
Saturday, August 11, 2012
Expect Programming
Automated process can be easily done by using crontab, but a new problem arises when you need to provide some credentials, such as user/password in order to execute some task, such as pulling git automatically, uploading files to FTP server, and many others.
With some use of expect programming, it can be easily be solved. Expect has three main commands:
Next is expect. This command will try to compare what output does the process gave us and compare it with some strings that you have provided in the script. When it matches, you can do something with it, for example give your users/password when there's a login prompt.
Last command is send, which is obvious. It sends some strings to the process and it replaces our manual input. Don't forget to end the string with "\r" so that it emulates ENTER button being pressed.
See The Geek Stuff for more examples of expect programming.
With some use of expect programming, it can be easily be solved. Expect has three main commands:
- spawn
- expect
- send
Next is expect. This command will try to compare what output does the process gave us and compare it with some strings that you have provided in the script. When it matches, you can do something with it, for example give your users/password when there's a login prompt.
Last command is send, which is obvious. It sends some strings to the process and it replaces our manual input. Don't forget to end the string with "\r" so that it emulates ENTER button being pressed.
See The Geek Stuff for more examples of expect programming.
Saturday, April 21, 2012
Building Android/iOS Apps Using C#
If you came from Windows background and you wanted to try creating applications that will be used for Android and iOS but you don't have Macintosh machine, then you can try to use Mono from Xamarin.
They have been working closely with Microsoft in the past to provide open source platform which is compatible with Microsoft's .NET specifications and now, they want to improve it much further by adding support to iOS and Android SDKs.
For iOS, you might want to try Mono Touch and Mono for Android is for Android. Both projects are updated frequently and they are keeping up with the latest version of SDK available by both vendors (iOS 5 and Android 4 Ice Cream Sandwich).
Since it's .NET based, it's well integrated with Microsoft Visual Studio and since it's also available for Mac, you can also use XCode as your IDE and use .NET classes in your MonoTouch apps. You can also easily bind existing C and Objective-C libraries.
They have been working closely with Microsoft in the past to provide open source platform which is compatible with Microsoft's .NET specifications and now, they want to improve it much further by adding support to iOS and Android SDKs.
For iOS, you might want to try Mono Touch and Mono for Android is for Android. Both projects are updated frequently and they are keeping up with the latest version of SDK available by both vendors (iOS 5 and Android 4 Ice Cream Sandwich).
Since it's .NET based, it's well integrated with Microsoft Visual Studio and since it's also available for Mac, you can also use XCode as your IDE and use .NET classes in your MonoTouch apps. You can also easily bind existing C and Objective-C libraries.
Friday, March 02, 2012
PHP 5.4.0 Released
A new major release of PHP 5.4.0 has been released by the PHP team and it now replaces the PHP 5.3.0 as the old stable release. Some of the key new features include: traits, a shortened array syntax, a built-in webserver for testing purposes and more. PHP 5.4.0 significantly improves performance, memory footprint and fixes over 100 bugs.
The official announcement is ready and so does the ChangeLog, but unfortunately, the migration guide is not yet completed as there are still some content missing or no information at all.
The official announcement is ready and so does the ChangeLog, but unfortunately, the migration guide is not yet completed as there are still some content missing or no information at all.
Thursday, January 12, 2012
PHP 5.3.9 Released
PHP 5.3.9 is now released by PHP Team and it includes security fixes and other numerous changes to improve the overal quality of PHP. There are two security enhancements in PHP 5.3.9:
- Added max_input_vars directive to prevent attacks based on hash collisions. (CVE-2011-4885)
- Fixed bug #60150 (Integer overflow during the parsing of invalid exif header). (CVE-2011-4566)
Thursday, December 15, 2011
Qt 4.8 Released
Nokia has announced the next major release of Qt 4.8 libraries to all platform (Windows, Linux, and Mac). This release incorporated a lot of new improvements and also bringing it closer to Qt 5 which will be released next year.
Here are some highlights that you can expect from Qt 4.8:
Here are some highlights that you can expect from Qt 4.8:
- The Qt Platform Abstraction (the outcome of the lighthouse project) provides you with a clean abstraction layer that makes it easier to port QtGui to new windowing systems.
- Qt Quick improvements Qt 4.8 speeds up Qt Quick UI design and app development with ready-made components and features such as Right-To-Left support, Support for split-screen virtual keyboard as well as a pinch area to provide a declarative API for handling touch input.
- Qt WebKit 2.2.1. The Qt 4.8 release features an updated version of QtWebKit from the WebKit project, including a wide range of improvements to the HTML, CSS and JavaScript technologies.
- Threaded Open GL in Qt 4.8 makes it much easier, and more thread safe, to render OpenGL from more than one thread concurrently (and avoid the main thread being blocked while the GPU is doing its thing)
- Multithreaded HTTP HTTP requests are now handled in a separate thread by default. This should make application guis smoother, as networking will no longer use the main event loop.
- Optimized file system access. Better I/O performance, achieved by reducing the number of system calls performed for I/O and by better use of cached data, when available
So, what are you waiting for? Go Get Them
Sunday, May 15, 2011
Perl 5.14 Released
A new stable release for Perl has been released. It's not yet Perl 6, but the developer has added so many features that will also be available in the future Perl 6. Some new features that are highlight of this release are:
After this release, the developers aren't stopping. They have created a roadmap towards future Perl 5.16:
- Unicode 6.0 support, along with many, many improvements to our
Unicode-related features - Improved support for IPv6
- Significantly easier autoconfiguration of the CPAN client
- A new /r flag which makes s/// substitutions non-destructive
- New regular expression flags to control whether matched strings should be treated as ASCII or Unicode
- New "package Foo { }" syntax
- Uses less memory and CPU than previous releases
After this release, the developers aren't stopping. They have created a roadmap towards future Perl 5.16:
We will release Perl 5.14.1 in approximately one month. This
patch release will include corrections for any significant issues
discovered in this release but will not include new features or
any incompatible changes.
Perl 5.16 will be released in the spring of 2012. If you'd like to help
shape Perl 5's future, please join us on the perl5-porters mailing list.
Sunday, July 25, 2010
PHP 5.3.3 Released
After almost more than six months of development, finally the final PHP 5.3.3 and 5.2.14 has been released by PHP team. This release doesn't bring any security fixes, but there are bunch of new features and bug fixes which can be seen at the ChangeLog.
I'm now compiling it on my own desktop and soon my laptop will also follow
Saturday, July 03, 2010
PHP 5.3.3 is Coming
PHP 5.3.2 was released back in March 2010, so it was about four months ago and right now, the current development for the next PHP 5.3.3 has come to RC2. I believe that the final version should be released at worst next month if there aren't too much problem with the current development tree.
I wonder what big changes will they introduce in the next 5.3.3 release?
I wonder what big changes will they introduce in the next 5.3.3 release?
Wednesday, January 27, 2010
The Importance of Ruby on Rails Development
The following guest post was contributed by Wendy Graham who frequently writes about online college and college related topics for Online College Guru.
Ruby on Rails (RoR) is the Ruby programming language’s web application framework, and it includes certain tools that make common development steps less difficult and speed up the development process as well. For example, its scaffolding automatically constructs certain views and models that a basic website will need. To complete the task, Rake, a building system, and a simple web server are included.
RoR is divided into the following packages, which developers can use for extending existing pages with plug-ins:
● ActiveRecord, a mapping system used to access data bases,
● ActiveResource, which is used to provide web services,
● Action Pack,
● ActionMailer, and
● ActiveSupport.
The methodology behind RoR
RoR places emphasis on the developmental principle of Don’t Repeat Yourself (DRY) and Convention over Configuration (CoC). CoC signifies that developers only need to indicate the “unconventional” features of an application. For example, if a class called Employees is included in the model, the matching table found in the data base is automatically called “employees.” If there is a deviation from this convention, such as labeling the table “staff members,” the developer will have to produce coding related to those names. As a rule, CoC leads to less repetition and coding, while saving the developer time.
DRY signifies that information can be found in one, unambiguous location. For example when developers use RoR’s ActiveRecord, module, they do not have to indicate the data base column names in the class definition category because they are able to retrieve that information by simply using the class name, which also saves time.
Installing RoR
Often, RoR is installed using a package manager called RubyGems, and its installation is also supported by a number of Linux distributions through their own package management system. In general, it is integrated with a web server like Apache and a data base server like MySQL, and in lieu of manual installation, a TurnKey Rails appliance can be used for deploying a server that is ready for use. In addition, Rails hosting providers, including Heroku and Engine Yard, will support the deployment of RoR as a “cloud” service.
Ruby on Rails (RoR) is the Ruby programming language’s web application framework, and it includes certain tools that make common development steps less difficult and speed up the development process as well. For example, its scaffolding automatically constructs certain views and models that a basic website will need. To complete the task, Rake, a building system, and a simple web server are included.
RoR is divided into the following packages, which developers can use for extending existing pages with plug-ins:
● ActiveRecord, a mapping system used to access data bases,
● ActiveResource, which is used to provide web services,
● Action Pack,
● ActionMailer, and
● ActiveSupport.
The methodology behind RoR
RoR places emphasis on the developmental principle of Don’t Repeat Yourself (DRY) and Convention over Configuration (CoC). CoC signifies that developers only need to indicate the “unconventional” features of an application. For example, if a class called Employees is included in the model, the matching table found in the data base is automatically called “employees.” If there is a deviation from this convention, such as labeling the table “staff members,” the developer will have to produce coding related to those names. As a rule, CoC leads to less repetition and coding, while saving the developer time.
DRY signifies that information can be found in one, unambiguous location. For example when developers use RoR’s ActiveRecord, module, they do not have to indicate the data base column names in the class definition category because they are able to retrieve that information by simply using the class name, which also saves time.
Installing RoR
Often, RoR is installed using a package manager called RubyGems, and its installation is also supported by a number of Linux distributions through their own package management system. In general, it is integrated with a web server like Apache and a data base server like MySQL, and in lieu of manual installation, a TurnKey Rails appliance can be used for deploying a server that is ready for use. In addition, Rails hosting providers, including Heroku and Engine Yard, will support the deployment of RoR as a “cloud” service.
Friday, August 08, 2008
Last PHP 4.4.x Release
PHP Team has released their last PHP 4.4.x series which ended in 4.4.9. Changes in this release includes:
* Updated PCRE to version 7.7.
* Fixed overflow in memnstr().
* Fixed crash in imageloadfont when an invalid font is given.
* Fixed open_basedir handling issue in the curl extension.
* Fixed mbstring.func_overload set in .htaccess becomes global.
Read the full Changelog for detailed changes.
So long PHP 4 and say hello to the upcoming PHP 5.3
* Updated PCRE to version 7.7.
* Fixed overflow in memnstr().
* Fixed crash in imageloadfont when an invalid font is given.
* Fixed open_basedir handling issue in the curl extension.
* Fixed mbstring.func_overload set in .htaccess becomes global.
Read the full Changelog for detailed changes.
So long PHP 4 and say hello to the upcoming PHP 5.3
Monday, June 30, 2008
CodeFetch
Sometimes, we need to look on other's code to understand a concept. The easiest way is by looking at books that talks about programming languages. Unfortunately, people find it too hard to buy a book, mostly because it's written in English and it's quite expensive.
So here's one of the solution: codefetch. Just enter the topic you wanted to know, and it will display the code from several programming books. Beware as it might not show the whole code, but just a little portion of it (except when the function is small enough).
They also provide a link on each function to the manual page of each programming languages, suitable for learning what the function is there for. Here's an example of PHP code
So here's one of the solution: codefetch. Just enter the topic you wanted to know, and it will display the code from several programming books. Beware as it might not show the whole code, but just a little portion of it (except when the function is small enough).
They also provide a link on each function to the manual page of each programming languages, suitable for learning what the function is there for. Here's an example of PHP code
Thursday, June 19, 2008
How to be a Programmer
Ever dreamed about being a programmer? Well, here's a short and comprehensive tips on how to be a programmer by Robert L. Read. It has been classified to Beginner, Intermediate, and Advanced, depending on which level are you targeting.
Beginner are taught on basic skills (divided into personal and team skills) every programmers need. Intermediate works a little bit more by adding a judgement skills to the steps, and finally the advanced part added more management actions to the list.
Beginner are taught on basic skills (divided into personal and team skills) every programmers need. Intermediate works a little bit more by adding a judgement skills to the steps, and finally the advanced part added more management actions to the list.
Saturday, May 17, 2008
Virtual KeyBoard Using JavaScript
If you need a virtual keyboard on your website, than i guess you should see this page. It's being implemented using JavaScript and it supports lots of languages around the world. Very nice work
Thursday, March 20, 2008
Text + Image + CSS + PHP = WoW
Safari and Firefox has supported CSS3's ::selection pseudo-element, so by using that and combination with PHP, Erik Kastner has created a nice script to hide images using text. For some demo, check this URL
Saturday, February 09, 2008
Where and When to Use AJAX
AJAX is now dominating on how to make a nice website. Most big sites uses AJAX, but does AJAX should be used also on your website? Here's an article from IBM about Where and when to use AJAX. It should give you some brief explanation when to use and when NOT to use AJAX.
Tuesday, January 08, 2008
BBAntiSpam Effectiveness
After i installed BBAntiSpam, the amount of spammer in Indonesian Linux Forum has decreased a lot. This is a proof that BBAntiSpam is very effective for fighting spammers (at least for now).
The only thing you should consider is updating the questions regularly. Since it's based on random questions, there's a chance that spammer who had modified it's spam scripts could answer the questions provided by BBAntiSpam. Adding questions in BBAntiSpam is very easy, since it's array-based, so you can see the pattern on the configuration file.
I will see for the next few weeks and if there's no leakage, i'm considering to change the registration method again to email, so that users who has just registered can activate their account and directly use the forum without waiting for my approval.
The only thing you should consider is updating the questions regularly. Since it's based on random questions, there's a chance that spammer who had modified it's spam scripts could answer the questions provided by BBAntiSpam. Adding questions in BBAntiSpam is very easy, since it's array-based, so you can see the pattern on the configuration file.
I will see for the next few weeks and if there's no leakage, i'm considering to change the registration method again to email, so that users who has just registered can activate their account and directly use the forum without waiting for my approval.
Sunday, January 06, 2008
BBAntiSpam
I missed one spammer today on Indonesian Linux Forum and it posted porn messages across the forum and i was quite late noticing it, since i just came online tonight, but i managed to remove all of it's post and delete it's username to prevent further action.
Budi from Baliwae told me a nice Anti Spam tool which can be used for phpBB and other forums. It's called bbAntiSpam. It's very easy to use and customizable. The installation procedure is very easy. All you need is just upload the files to the server and add one line in one of the file to include those files and it will start working at that time. For phpBB, you can look on this forum, meanwhile, for WordPress, you can find it here. There are a lot more.
The script is free, but it's limited in it's feature. If you want further customization, you will have to buy the license.
Budi from Baliwae told me a nice Anti Spam tool which can be used for phpBB and other forums. It's called bbAntiSpam. It's very easy to use and customizable. The installation procedure is very easy. All you need is just upload the files to the server and add one line in one of the file to include those files and it will start working at that time. For phpBB, you can look on this forum, meanwhile, for WordPress, you can find it here. There are a lot more.
The script is free, but it's limited in it's feature. If you want further customization, you will have to buy the license.
PHP 4 Updated
PHP team has updated PHP 4 series with the latest update, PHP 4.4.8 that contains patches for PHP 4 series which still come even though PHP 5 has been around for some time. Here are the changelog for PHP 4.4.8:
* Improved fix for MOPB-02-2007.
* Fixed an integer overflow inside chunk_split(). Identified by Gerhard Wagner.
* Fixed integer overlow in str[c]spn().
* Fixed regression in glob when open_basedir is on introduced by #41655 fix.
* Fixed money_format() not to accept multiple %i or %n tokens.
* Addded "max_input_nesting_level" php.ini option to limit nesting level of input variables. Fix for MOPB-03-2007.
* Fixed INFILE LOCAL option handling with MySQL - now not allowed when open_basedir or safe_mode is active.
* Fixed session.save_path and error_log values to be checked against open_basedir and safe_mode (CVE-2007-3378).
* Fixed bug #43010 (Fixed regression in imagearc with two equivelent angles).
* Fixed bug #41765 (Recode crashes/does not work on amd64).
* Fixed bug #41630 (segfault when an invalid color index is present in the image data).
* Fixed bug #41628 (PHP settings leak between Virtual Hosts in Apache 1.3).
* Fixed bug #38798 (OpenSSL init corrected in php5 but not in php4).
* Improved fix for MOPB-02-2007.
* Fixed an integer overflow inside chunk_split(). Identified by Gerhard Wagner.
* Fixed integer overlow in str[c]spn().
* Fixed regression in glob when open_basedir is on introduced by #41655 fix.
* Fixed money_format() not to accept multiple %i or %n tokens.
* Addded "max_input_nesting_level" php.ini option to limit nesting level of input variables. Fix for MOPB-03-2007.
* Fixed INFILE LOCAL option handling with MySQL - now not allowed when open_basedir or safe_mode is active.
* Fixed session.save_path and error_log values to be checked against open_basedir and safe_mode (CVE-2007-3378).
* Fixed bug #43010 (Fixed regression in imagearc with two equivelent angles).
* Fixed bug #41765 (Recode crashes/does not work on amd64).
* Fixed bug #41630 (segfault when an invalid color index is present in the image data).
* Fixed bug #41628 (PHP settings leak between Virtual Hosts in Apache 1.3).
* Fixed bug #38798 (OpenSSL init corrected in php5 but not in php4).
Friday, December 07, 2007
Google Chart API
Google has made developer's life easier by releasing Google Chart API which can be used to create chart online. Just arrange your data, and point your browser to Goggle's site with the correct query string and voila... you will have your chart presented
If you want to embed it into your webpages, then you will have to use img tag to include it as an image and that's it. Nothing is simpler as that.
Of course the style here is not OOP like in JpGraph and also the parameter can be confusing, as you have to combine all of them in one single query string, but if you're used to it, you will be fine in just a few days.
Of course the style here is not OOP like in JpGraph and also the parameter can be confusing, as you have to combine all of them in one single query string, but if you're used to it, you will be fine in just a few days.
Subscribe to:
Posts (Atom)