Wednesday, August 10, 2011

Run BPI Express Mobile on your android phone (or any Midlets/Jar/Jad apps).

*UPDATE: BPI Has released their android app on the android market last Aug. 18, 2011, BPI Express mobile Android app  
 

First off a very big Thanks to mohammadN of XDA
for creating JBED.

The tutorial is divided to 2 parts, 1st is installing Jbed and 2nd is setting up the BPI Express online mobile app.

but first these are what you need.
1. Rooted phone with Froyo or Gingerbread (haven't tested with other lower versions).
2. Rootexplorer from market or something similar
3. Jbed which you can find here (you may need to register with XDA to download the file)

Step 1. Open Jbed.zip and go to the System folder and you'll see two directories inside.
Step 2. Copy the jbed.apk file in the App folder on your /System/app/ folder (make sure to change permissions if it won't let you.

Step 3. copy libjbedvm.so inside the lib folder to /System/lib/ folder

Step 4. install the jbed.apk file.

Step 5. on your phone run java > menu >sd card and install your old jar/jad files.


Now for bpi mobile express.

Request for a new link from your bpi express mobile (take note this will invalidate older and probably working installations from other phones within your account).

once you receive the sms link (I'm assuming you sent it to your android phone).
open the link with your browser.

It will show a download link, click on the download link and it will open a JAD file, this jad file has the URL of the JAR file that you need to install on your phone.

copy the link found inside the JAD file and open it in your browser and this will download the JAR file.

now go back to the JAVA/JBED app and run it, hit your "menu" button
and click on SD Card, it should search your SD Card for any JAR/JAD files.

Select EOLMobile and install.

run the app and login and make sure you select "yes this session" when the warning for internet access is required by EOLMobile.


Enjoy BPI mobile banking on your android phone!

Sunday, June 19, 2011

How to setup Google voice on your android phone to make free calls to any mobile or land line in the U.S.

Disclaimer: this is used fr educational purposes only to research on google voice and SIP's in general.

*UPDATE: If you already have a google voice account and don't really care about SIP and DID in general, just use GrooveIP from the Android market. (use the proxy from here to register for google voice if you're from outside the U.S.



Things you need
  1. Google account - this will be used to call your recipient in the u.s., your gmail account will do.
  2. SIP account - This will connect your phone to the Internet to receive and send IP based calls
  3. u.s. based phone number (DID) - this will forward your call to your SIP address
  4. IP Proxy to mask your IP Address - used when registering to google voice (since anyone outside the u.s. registering will be blocked)
  5. android phone - should work on any android phone (tested with CM7.0.3 running GB 2.3.3)
Step 1. Manage your proxy (you can also use other IP masking proxies for this, we'll just need this for about 10 mins anyway).
1. Go to www.lowerping.com
2. sign up (this will get you a trial account)
lp1.jpg

3. download and install the lower ping software.
4. Reboot your pc when prompted.


Step 2 Get an SIP account
1. go to www.IPtel.org
2. Click on "SIP Service"
iptel1.jpg


3. Click on "Register a New Account"

iptel2.jpg
4. Fill up the details (what's important is your Username and password, the username will end up as your SIP address ex.: MyUsername@IPTEL.ORG
iptel3.jpg
5. Accept and register the account.
6. check your email (you should receive an email from IPtel.org with your account details)

Step 3. Get a U.S. number.
1. go to www.ipkall.com
2. Click on Sign up

ipkall1.jpg
3. Fill up the necessary details
  • Account type: SIP
  • Area Code: Select your preffered U.S. Area code for your number (any will do since this won't be your public number)
  • SIP Username: SIP Username you used in IPTel ex. MyUsername
  • Hostname or IP address: IPTel.org
  • Email Address: your email add
  • Password: your password
  • # of Seconds... : 120
ipkall2.jpg
4.Click on submit.
5. Check your email
6. you should receive your IPKall phone number after a few minutes.

Step 4 Test your SIP account
1. Now on your android phone, Go to market and download CSIPSimple
2. Install the app and follow the setup guide
3. use default settings and create an account(username:MyUsername, Server:Iptel.org, password: your IPTel Password)
4. you should end up with something like this on your account settings

csip1.jpg csip3.jpg csip2.jpg
5. If it says not registered then check your account settings on IPTel.org
Note: if you're running gingerbread (Amdroid 2.3.3), there's already a built in SIP client on your OS. Settings > Call Settings > Internet Call Settings
Step 5 run lowerping.exe
1. login using your trial username and password

lp2.jpg
2. click on "web surfing beta" - chrome / firefox / IE (depends on your browser)
3. close all instances of the browser you selected and open them again. lp3.jpg

4. go to www.speedtest.net

Speedtest1.jpg
5. your location should now be in the u.s.

Step 6 login to www.google/voice
If you are still getting this page, restart your pc. run lowerping first before opening any browsers
then do step 5 again

gvFail.jpg
If it still won't give you a proper proxy then try another Web Proxy client
open the browser you selected on step 5 and test.
If you are getting the following page then you're good.
gv1.jpg
  1. Click on I want a new number (select a number, or phrase.
  2. Click Continue
  3. Enter a 4 digit pin and accept the terms and conditions
  4. Click Continue
  5. Enter yoru IPKall number that was emailed to you. and select "work"
  6. Click Continue.
  7. once on this screen make sure your android phone is connected to the net (3g or WLAN)
gv2.jpg

8. click on call me now.
9. you should receive a call on your csip app
10. answer the call and open up the dial pad and enter the verification code.
11. Click Finish.

gv3.jpg

Great you're done registering your google voice!.

but we're not done yet, you could use the google voice software from google now however every time you make a call using that it'll charge you for long distance calls to google voice servers to connect your call.

quite expensive...
so what we'll do is go to market and search for an app called "Google voice callback"
Step 7 setting up google voice call back

1. Username and Password should be your Google account.

gvc1.jpg
2. Callback number is your IPKall Phone number.
gvc2.jpg

3. Save the account info and we should be done.

Step 8. Test everything
1. on your android phone Make sure you're connected to the internet (3g or wlan)
2. open up CSipSimple and make sure SIP is registered.

csip2.jpg csip3.jpg

3. open up phone dialer (the one you use to make normal calls on your phone not the CsipSimple dialer.)
4. enter a u.s. number (your intended recipient)
5. Dial it.
6 a pop up should appear asking to use Google voice call back or normal.
7. choose normal if you want to waste phone credits, otherwise select google voice callback.
8. wait for google voice callback to work.
9. you should receive a phone call from your google voice number.
10. answer it and it'll call your intended recipient.

And we're finally done!.
now there are times you'd make a call and you can't hear anything but the person you're calling can hear you fine.
I'm not sure yet what's causing this (most likely IPTel.org or your SIP client). you could also try using AGEPhone from market and see if it works out for you, another alternative is the built in Internet calling feature if you're running gingerbread 2.3.3
Also your google voice number is attached to your google account and you can use it's features like SMS, voice mail etc... you can use it without a proxy as well
(uninstall lowerping.com or keep it).



Enjoy!

Friday, May 6, 2011

Globe Wired DSL Vulnerability

I was fooling around with my modem from Globe DSL when I stumbled upon an annoying security hole in Globe's wired DSL service.
Here's how it works.
Normally, to access the web based config page of your modem you'll have to access it through 192.168.0.1
now, your modem once connected to Globe's network is also assigned an IP address. ex. 180.xxx.xxx.0
take note this is different from your Public IP which usually starts with 120.xxx.xxx.xxx

This got me a bit curious, that if I could access my own config page using the modem's IP address then maybe I could access the same config page of other subscribers.

So I created a multi threaded app that does an http web request to a specific IP range and this is what I got.




















from 1 - 64, 3 subscribers that gave an http response.

let's check subscriber #1















Here's #2















and here's #3



















and here's the app. (removing the ip address of course.) take note, this is a very crude implementation and would do 64 threads by default (would've gone higher but apparently there's an
undocumented limit to how WaitHandle.WaitAll could only handle 64 threads at a time and since this is just a testing app that I didn't bother to find a work around

now, what can you do that you can access other people's modems? change their settings, account info, lock them out of their internet service etc...
and why didn't globe fix this vulnerability to their subscribers? I'm guessing so they could easily access it when they are troubleshooting their modems. however it wouldn't hurt
to at least have a basic username / password challenge first :/


Monday, September 13, 2010

Hosting a website at home using IIS 7.5

I wanted to try out hosting a website through Windows 7 (IIS 7.5) (steps would be pretty much the same for windows 2003 and 2008.

The purpose of this is to host your web server at home, for me this is used for Demo purposes or debugging internet based apps that would later be hosted somewhere else.
(other things you could host would be TFS servers, FTP servers etc.)


First would be to register at a DDNS site like www.no-ip.com or www.dyndns.com (for the purpose of this tutorial I'll be using www.no-ip.com).

Now, login to the site and Click on "Manage Hosts",








"Add Host"




















Under Hostname would be your site name, this would become your URL like for this demo would be MySite.zapto.org

IP Address would be auto populated but if not it would be the IP Address your ISP provided you with. in my case having a dynamic IP based DSL Connection, my modem every time it restarts would change it's IP address. (no-ip has a downloadable tool to manage this automatically DDNS Update Client.

click on "Create Host" and we're done.


Second would be to installing IIS on Windows 7.

1. Click Start and then click Control Panel.
2. In Control Panel, click Programs and then click Turn Windows features on or off.
3. In the Windows Features dialog box, click Internet Information Services and then click OK.


Third would be Setting up your site.
1. Run IIS Manager in the start menu and type "IIS"
2. Add a new "Web Site"
3. Enter a Site name like "MySite" or your project name
4. Physical path is the location of the site on your hdd like in my case would be (D:\Sites\Demo\MySite)
5. Host name would be the URL you created at no-ip.com (ex. MySite.zapto.org)

Fourth would be to setup your Windows Firewall to accept Inbound and Outbound traffic for your site. (if you have other firewalls like Norton or Zone Alarm, you'll have to give access to your ports as well).

1. Click the Start Menu and run "firewall"
2. Click Windows Firewall with Advanced Settings.
3. Click Inbound Rules and make a new rule.
4. Start the "New Rule Wizard"
5. Click Port and enter "TCP" and port "80" then click Next
6. Allow the connection then click "Next"
7. Click the rules that apply, then 'Next' (everything is selected)
8. Name the New rule like "WebSite Inbound Rule" and click Finish.
9. Check if the rule has been created and active and then close the firewall.

Fifth would be to setting up your router to allow connections for port 80 to pass through, now depending on your router this can be a bit tricky but the rule of thumb is.

If your router has a firewall, give Inbound access to port 80.
and lastly make sure to port forward port 80 to your server.

If you have trouble port forwarding depending on your router model, this site has been very helpful to me in the past. (www.portforward.com)

Theoretically this should be finished however on my setup when I tried to access my site it went directly to my modem's Web based Config page.

my setup currently is Internet > Modem > Router > Desktops and Laptops.
now, this won't work properly with my modem blocking the connection, so the solution is to "Bridge" my modem to my router making my router as the PPPoe dialer instead of my modem. (again how to go about this depends on your ISP, model of your modem and router).


Enjoy!

Wednesday, July 7, 2010

On using NDepend

I was recently introduced to try out NDepend which is a Visual Studio add in and pretty much
a code metric and code quality tool to manage complex .net projects / solutions.

After a painless download and install I fired up visual studio 2008, loaded up my template project for a web application, did an analysis and was greeted with an html file with all kinds of reports.

at first it was a bit overwhelming but upon reading the report I was surprised at the information it had about my project.

One of the first things that got my attention was the "Assemblies Metrics", this pretty much tells me how abstract my assemblies are, lines of code, lines of comments, coupling and cohesion. just by having this and running it on every build or release would show how my project is growing and where it's headed.





Next is the Assemblies Abstractness Vs. Instability.
(explaining the chart is another topic altogether but for a primer this document explains it pretty well)

but the main point of the graph are

Abstraction where it would show how extendable your assembly or code is.

Stability where it would explain how dependent your code is to other assemblies or components, this doesn't mean that the

higher the instability the more unstable your code will be but rather how dependent your code is to other assemblies, (more dependent it is the harder it is to change your code.)

if the assembly is not that extensible the more it will go to the zone of pain (this would be pretty normal on end points like web services and wcf services, where it's usual that there would be no virtual methods or abstraction).

the zone of uselessness would show that if your class is too abstract and no other classes depends on it then it goes there.



Assemblies Dependencies Diagram I can't stress enough how many times this could have saved time on my previous projects where a visual diagram would show
class heirarchy and dependencies.








Running up Visual NDepend provides you with the CQL Queries (Code query language), this uses the same syntax as SQL but uses your code base as the database and right now the default code quality metrics NDepend has seems to cover everything I would need to be able to refactor my project properly.

things like Unused codes / dead codes, code quality, naming conventions and Encapsulation are queried, now other products also does this like resharper / FXCop but I like the extensibility NDepend offers. although I'm a bit half hearted on this one since I like how resharper presents the code errors and optimizations while I'm coding, NDepend seems to target more the team lead / architect level where code reviews are done and evaluated.


so far I've only been playing around with this tool for a couple of days and it is quite impressive, This is the kind of tool I would recommend to a company with large projects and solutions where managing source code becomes more and more "challenging" as it grows.

There's a Trial / Open Source / Academic Edition and you could buy the Professional Edition for about US$ 377, the more licenses the bigger the discount (although I'd assume you'd only need 1-2 licenses per project in a company.)

you could also check out their site for tutorials and videos about the product.

Saturday, July 3, 2010

Sharepoint 2010 problems for old MOSS developers?

My biggest problem with Sharepoint 2010 right now is it killed the standalone developer support that does not have a killer machine.

On MOSS 2007 I was used to running a VM network on my laptop (or dekstop server) with Moss 2007 on one VM, Domain server on another VM and my dev environment on a 3rd VM (sometimes this is reserved for an ISA server or Biztalk depending on the requirements).

This makes sure I could develop and debug my applications without being connected to a dev server, as well as making sure that if i ever screwed up my VM I could just plug in another one from my backups.

Sharepoint 2k10 now killed this concept with the requirements of having SQL Server 64bit and Windows 2008 Server r2 64bit.

since most mid range laptops are running on 32bit OS and VMWare / Virtual PC doesn't support CPU virtualization, I'll be stuck with SPS2k10 running on my dekstop and my dev environment running on my laptop for now.

you could also use this tool to check if your laptop could support 64 bit VM

for now... I'll postpone migrating my environments until I could properly backup my laptop and change it from Windows 7 32 bit to 64 bit (and download all the requirements which with the problems I'm getting from my ISP could probably take me 3 years to finish.)

I also wonder...how painful would it be to migrate my web parts, custom controls and Portal. Hope it's not as painful as migrating from 2003 to Moss :P

Tuesday, June 8, 2010

Tools I can't live without...

Every developer has his/her set of "making my day to day life easier" in the workplace.

Most in this list are free while the rest has 30 day trials you could download from their site.

I'll go in depth on how to use each one in the weeks to come, but for now a short description and links.

Resharper -
This for me makes coding a whole lot easier with real time compiler error notifications, Code refactorings, Safe Deletes, Safe Renames, a more robust "Find" function, Code Analysis and my favorite. Unit testing and integration with dotTrace Profiler.


Fiddler
-

I Can't remember how many times this small free app has saved me days of debugging hell, pretty much this app acts as a proxy capturing all http "REQUESTS" from your browser as well as capturing all "HTTP RESPONSE" that you will get from the web server you're requesting from.

it will provide various information that isn't normally seen like, file sizes, html raw formats, request hops, cookie information, XML.

if you're doing custom Requests to a web server or sending unusual POST messages. this is the tool that will make things a whole lot faster.


Notepad++
-
This is what the standard notepad of windows should have been, Text Compares, spell check, text compare, XML formatting, HTML cleanup, Tabbed interface.


SandCastle
-
Making inline comments, XML code comments into a generated help file or set of html files, code documentation just got easier. to top it off it's free!

Red-Gate SQL
-
Red-Gate's SQL Toolbelt is the one stop tool for database control, with tools like SQL Compare (table, Stored procs, views etc).

SQL data compare.

Data Generator (with customizable rules).

SQL Doc - ever had problems remembering who last modified that table or stored proc? or what it was a month ago?, fast and easy to use database documentation is the answer.

and my personal favorite SQL Prompt - integrates with your management studio and provides a much needed intellisense, auto complete and refactoring.


FireBug (firefox addon) - Simply the best javascript debugger out there, view your DOM, add breakpoints, notifies you of errors you never thought were there.

iMacros - Ever had one of those web apps where you have to go through steps 1 - 5 to be able to debug step 6? this firefox addon captures all your http requests and response to get you to step 6 with a click of a button.


Hope you enjoyed this post as much as I did writing it. I'll go in depth with these tools in the coming weeks to come.