Showing posts with label Security. Show all posts
Showing posts with label Security. Show all posts

Sms Encryption - Decryption

A few years ago, i tried to do a mobile sms cryption applicatio with bouncycastle.


public byte[] smsEncodedMessage ( byte[] smsEncContent , byte[] smsEncPKey ) throws Exception {
        try {
            cipherEngine = new PaddedBufferedBlockCipher ( createEngine () );
            cipherEngine.init ( true , new KeyParameter ( smsEncPKey ) );
            cipherText = new byte[ cipherEngine.getOutputSize ( smsEncContent.length ) ];
            cipherTextLength = cipherEngine.processBytes ( smsEncContent , 0 , smsEncContent.length , cipherText , 0 );
            cipherEngine.doFinal ( cipherText , cipherTextLength );
            out = new ByteArrayOutputStream ();
            dout = new DataOutputStream ( out );
            dout.writeShort ( cipherText.length );
            out.write ( cipherText );
        } catch ( Exception e ) {
            main.errorMessage ( "<ERROR BLOCK - inLine < 1 > >: " + e.getMessage () );
        }

        return out.toByteArray ();
    }

    public String smsDecodedMessage ( byte smsDecContent[] , byte[] smsDecPKey ) throws Exception {
        try {
            in = new ByteArrayInputStream ( smsDecContent );
            din = new DataInputStream ( in );
            cipherTextLength = din.readShort ();
            cipherText = new byte[ cipherTextLength ];
            in.read ( cipherText , 0 , cipherTextLength );
            cipherEngine = new PaddedBufferedBlockCipher ( createEngine () );
            cipherEngine.init ( false , new KeyParameter ( smsDecPKey ) );
            plainText = new byte[ cipherEngine.getOutputSize ( cipherTextLength ) ];
            size = cipherEngine.processBytes ( cipherText , 0 , cipherTextLength , plainText , 0 );
            cipherEngine.doFinal ( plainText , size );
            resultText = ( new String ( plainText ) ).trim ();
        } catch ( Exception e ) {
            main.errorMessage ( "<ERROR BLOCK - inLine < 2 > >: " + e.getMessage () );
        }
        return resultText;
    }

Google ve Unknowns (Maybe, a few)

---------------------------------------
--Google Plex Wowww
http://www.google.com/plex/index.html
---------------------------------------
--Google CodeJum
http://www.google.com/codejam/index.html
---------------------------------------
--Google Happy Mothers Day
http://www.google.com/moms01/
http://www.google.com/moms/
---------------------------------------
--Google Valentine's Day
http://www.google.com/heart/
---------------------------------------
--Google Press Center
http://www.google.com/press/
---------------------------------------
--Google University Search
http://www.google.com/intl/en/universities.html
---------------------------------------
--Google Wml
http://www.google.com/wml/search
---------------------------------------
--Google Logos
(1,2......10)
http://www.google.com/doodle1.html
http://www.google.com/doodle10.html

http://www.google.com/dilbert.html
http://www.google.com/doodle.html
----------------------------------------
--Google BackLinks
http://services.google.com/marketing/links/trekfan2006/
----------------------------------------
--Google Custom Search
http://www.google.com/custom
----------------------------------------
--Google News Xml Output
http://www.google.com/news?output=xhtml
----------------------------------------
--Google IE
http://www.google.com/ie OR link
----------------------------------------
--Google Movies Search
http://www.google.com/movies
----------------------------------------
--Google Patent Search
http://www.google.com/ptshp?oe=UTF-8&hl=en&tab=ft
----------------------------------------
--Google Search Music
http://www.google.com/musicsearch?q=t&btnG=Search+Music
----------------------------------------
--Google Product Search
http://www.google.com/prdhp?ie=UTF-8&oe=UTF-8&hl=en&tab=if
----------------------------------------
--Different Login Page
https://www.google.com/accounts/ServiceLoginBoxAuth
link-2
----------------------------------------
--Google Adsense JavaScripts
https://www.google.com/adsense/signup-resources/3502596534-controllers.js
https://www.google.com/adsense/javascript/address/2069104706-addressjs.js
----------------------------------------
--Empty Page
http://www.google.com/ig/cache/
http://www.google.com/gen_204
----------------------------------------
--Google Reader
http://www.google.com/reader/clip-creator/
http://www.google.com/reader/clip-creator/user/-/state/com.google/broadcast
----------------------------------------
--Shakespeare
http://www.google.com/shakespeare
----------------------------------------
--Google Gapminder
http://www.google.com/tools/gapminder/
----------------------------------------
-- google wap
http://www.google.com.tr/m
http://www.google.com.tr/wapsearch
http://www.google.com/sprint_xhtml
----------------------------------------
--google government search
http://www.google.com.tr/unclesam
----------------------------------------
--google translate
http://www.google.com.tr/translate_t
----------------------------------------
--google univ
http://www.googlesyndicatedsearch.com/u/
http://www.google.com.tr/u/
----------------------------------------
-- i dont know!
http://www.google.com.tr/uds/
----------------------------------------
--sms
http://www.google.com.tr/sms/
http://www.google.com.tr/intl/en_us/mobile/sms/
----------------------------------------
--google web history
http://www.google.com.tr/reviews/search
----------------------------------------
--funny
http://www.google.com.tr/relpage/
----------------------------------------
--pda search
http://www.google.com.tr/pda/search
----------------------------------------
--jsky search
http://www.google.com.tr/jsky/search
----------------------------------------
--Google Base
http://www.google.com/base/
----------------------------------------

Google BlackList Database

http://sb.google.com/safebrowsing/update?version=goog-black-url:1:1
http://sb.google.com/safebrowsing/update?version=goog-black-url:1:7998
http://sb.google.com/safebrowsing/update?version=goog-white-domain:1:19,goog-white-url:1:371,goog-black-url:1:7693,goog-black-enchash:1:15282
http://sb.google.com/safebrowsing/update?version=goog-black-url:1:7753
http://sb.google.com/safebrowsing/update?versio=goog-black-url:1:0000