Posts

Showing posts from November, 2013

Adding Splash Screen in Roku Channel

Image
Roku Splash screen is the screen that appears in the screen before a channel's home screen is loaded. To add splash screen to your Roku application first off you need to create two images to be used as Splash Screen. One of the image will be used for SD  and the other for HD. Let Splash_SD43.jpg is the image for SD view and Splash_HD.jpg be for HD. The size of SD splash screen must be 720 x 480 and for HD splash screen must be 1280 x 720. Put both the images in images folder and add the following lines to manifest file. splash_screen_hd=pkg:/images/Splash_HD.jpg splash_screen_sd=pkg:/images/Splash_SD43.jpg splash_color=#000000 splash_min_time=5000 splash_screen_hd specifies the HD image, splash_screen_sd specifies the SD image, splash_color specifies the color of the splash background and splash_min_time is used for the splash time.

Parsing JSON in BrightScript Language for Roku

Image
This is an example application for Roku box which parses JSON response from a url e.g. http://example.com/index.php. For this application, the output is seen only on debugger console of Roku box. So to open debugger console telnet to your Roku box at port  8085 i.e. telnet ip_of_your_roku 8085. Sample JSON response from the url used in this example is as follows: [  {      "ch_id": "1",      "ch_title": "CHANNEL 1",      "ch_logo": "channel1.png",      "stream": "channel1.stream",      "server": "54.234.181.51" },  {      "ch_id": "2",      "ch_title": "CHANNEL 2",     "ch_logo": "channel2.png",     "stream": "channel2.stream",      "server": "54.234.181.51" },  {      "ch_id": "3",      "ch_title": "CHANNEL 3",      "ch_logo":

Getting the type of a variable

Here in this post I am going to show you some example of getting the type of the variable: From the following tests I have done you will definitely get the way how we can get the type of the variable. The common way is to use type(variable_name) which result in <type 'type_of_variable'> now if you want to get the 'type_of_variable' only then you would have to use type(variable_name).__name__. >>> a=3.42 >>> type(a) <type 'float'> >>> type(a).__name__ 'float' >>> class Book: ...     name='' ...     author='' ... >>> b=Book() >>> type(b) <type 'instance'> >>> b <__main__.Book instance at 0xb767d58c> >>> type(b) <type 'instance'> >>> type(Book) <type 'classobj'> >>> type(Book()) <type 'instance'> >>> type(Book).__name__ 'classobj' >>> type(Book()).__name_

Brute-forcing ftp accounts

Image
If you have read my previous post " Bruteforce a router to hack admin password using Hydra  " then you might have learned how to brute-force attack on http authentication. Now if you just tweak the command a little then you can use the same for brute-forcing ftp too. An example is as follows: hydra -l username -P password.lst ftp://example.com Your password.lst must have the matching password. So you need to create a file that has most possible combinations. If you are unsure about the username too then you can use -L switch as follows: hydra -L user.txt -P password.list ftp://example.com You can create a user.txt file by writing the possible usernames in a single line as follows: admin administrator sysadmin webmaster root test

Using HLS urls in playlist with jwplayer6

JW Player is has been a great online video player. It has both Flash and HTML5 implementation supporting most of the streams like rtmp, HLS. Here in this post, I am going to show you how you can use jwplayer with a playlist which will have hls streams. My playlist for the player is hls playlist.rss which is as follows: <rss version='2.0' xmlns:jwplayer='http://rss.jwpcdn.com/'> <channel> <item> <title></title> <description></description> <jwplayer:image>http://dvtvonline.com/uploads/video_thumbs/1384483889_Episode7TheStickySituation.mp4.mp4.jpg</jwplayer:image> <jwplayer:source file='http://barakyah.videocdn.scaleengine.net/barakyah-vod/play/sestore1/barakyah/dvtv/1384483889_Episode7TheStickySituation.mp4.mp4/playlist.m3u8' /> </item> <item>

Playing HLS Stream videos in ipad

The easiest way to play HLS stream video in ipad using html element is using the embed tag. An example of a player using the embed tag is as follows:  <embed style="width:100%, height:'auto';" src="http://server:port/path/file.m3u8"                        type="application/vnd.apple.mpegurl" postdomevents="true" /> For the code to work please replace the source with actual hls stream.

500 Internal Server Error Part 1

Image
500 Internal Error Can be caused by many reasons some of which I am going to list here that might help you figure out your problem and remove your headache. File Permissions Some hosting providers like hostagator they need a specific permission set for the files and folders.  You can follow this rule for most of the hosting solutions. File permissions should be  644 and directory permissions should be 755. .htaccess Rule error use of php_flag in .htaccess file can result in 500 Internal Server Error, its a good practice to set values in php.ini rather than to use .htaccess for php configuration. php_flag can be used only with php_ini_all and php_ini_perdir directory types and is used to set boolean values only. You can check in apache error log too for this which might be logged as : [Mon Nov 11 04:15:01 2013] [alert] [client 120.89.118.206] /public_html/.htaccess: Invalid command 'php_flag', perhaps misspelled or defined by a module not included in the server configuration

Bruteforce a router to hack admin password using Hydra

Image
Hydra can be used for bruteforce attack on a router to retrieve admin's password. For this, a password list needs to be created for my case it is password.lst. The username I am using in the bruteforce attack is admin and the router's password is 192.168.1.19 which might differ for your case. The command is as follows that I used: hydra -l admin -P password.lst 192.168.1.19 http-get -m / The above image shows a screenshot of my attack used on my TP-LINK router. The found password is underlined by red underline.

Listen to Nepali Radio Stations Live

Image
Here in this post, I am sharing a list of Nepali Radio live streams that I have collected from various websites. These streams were collected and tested using VLC 2.0.6 in Fedora 17. Some of the radio stations might not have live streams listed below yet, I have tried to put a link to their website. With VLC you can open the respective streams of the FM stations. You need to have a proper internet connection to play these streams. Make sure you are using the first url in the list of each FM Station. Bhaktapur FM 105.4 MHz : http://49.236.212.220:88/broadwave.asx?src=1&kbps=56 Bulbule FM 103.MHz :  http://shoutcast.itechnepal.net:8450/;stream.nsv&amp;type=mp3&amp;volume=100&amp;autostart=true or http://bulbulefm.com.np/radio/playlist/playlist.asx or http://bulbulefm.com.np/radio/playlist/playlist.qtl or http://bulbulefm.com.np/radio/playlist/playlist.ram Capital FM : http://streaming.softnep.net:8037 Classic FM : http://shoutcast.itechnepal.n

Live Channel Application for Roku using BrightScript Language

Image
Here is an example application for Roku device using the only language for Roku 'BrightScript Language'. The following example needs the HLS stream url : " http://server:port/application/path.m3u8 "  to be replaced with your actual HLS streaming url. The following script should be in a file with .brs extension. Create a folder, inside which a 'source' folder should be created and put the .brs file inside the source folder. Now create 'manifest' file with the following contents: title=Channel Title subtitle= Channel Subtitle mm_icon_side_hd=pkg:/images/mm-icon-side-hd.jpg mm_icon_side_sd=pkg:/images/mm-icon-side-sd.jpg mm_icon_focus_hd=pkg:/images/mm-icon-focus-hd.jpg mm_icon_focus_sd=pkg:/images/mm-icon-focus-sd.jpg splash_screen_hd=pkg:/images/Splash_HD.jpg splash_screen_sd=pkg:/images/Splash_SD43.jpg major_version=1 minor_version=0 build_version=00000 Here in the above manifest file I have 'images' folder inside the fo