Tuesday, November 25, 2025

Installing Dell’s SSL VPN client in Ubuntu - (SonicWall NetExtender)




SonicWALL's SSL VPN features provide secure remote access to the network using the NetExtender client. 


NetExtender is an SSL VPN client for Windows, Mac, or Linux users that is downloaded transparently and that allows you to run any application securely on the company's network. 


It uses Point-to-Point Protocol (PPP).



Steps for Installing SonicWall VPN Client.

You must have Oracle JDK installed before continuing.

Thursday, August 18, 2016

Python socket server with handling multiple client connections

In this post describes how to write socket server with handling multiple client connections in python.

Creation of socket server needs following steps:
  • bind socket to port
  • start listening
  • wait for client
  • receive and send data
Sample Code for Socket Server

import socket
import sys
from thread import *
import logging

host = ''
port = 8001

logging.basicConfig(level=logging.DEBUG)

#initiate socket creating
logging.info('# creating socket')
s = socket.socket(family=socket.AF_INET, type=socket.SOCK_STREAM)
logging.debug('# created socket : ' + str(s))

try:
    s.bind((host, port))
except socket.error as message:
    logging.error('# socket binding failed : ' + str(message))
    sys.exit()

logging.info('# socket binding success')

#start listning on socket
s.listen(5)
logging.info('# socket listning')

#handler for client threads
def client_thread_handler(conn):
    #sending msgs to connected clients
    conn.send('hi... u r now connected')

    #loop for not terminate or end thread
    while True:
        data = conn.recv(1024)
        print(data)

        if str(data) == 'exit':
            logging.info('# exiting from thread')
            break

        reply = 'reply... ' + data
        conn.sendall(reply)

    conn.close()


#waiting for data from client
while True:
    conn, addr = s.accept()
    logging.info('# connected to : ' + str(addr))
    start_new_thread(client_thread_handler, (conn,))

s.close()

After running the server will run on the localhost port 8001.
To test this you can create a socket client or telnet to port 8001.

Testing with telnet type following in shell:

telnet localhost 8001


Friday, July 29, 2016

Install Python in Ubuntu

"Python is a programming language that lets you work more quickly and integrate your systems more effectively. And it is powerful...fast...plays well with others and runs everywhere..Most of all python is open and easy to learn..... So give it a try with your back-end developments...." 

Here I'm going to discuss how to install python on Ubuntu. So here we go.......

First you have to install some dependencies before installing python..execute following commands in shell...
sudo apt-get install build-essential checkinstall
sudo apt-get install libreadline-gplv2-dev libncursesw5-dev libssl-dev 
libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev

Then download python latest version from Python Site  and extract it..
tar -xvf Python-3.5.2.tar.xz
cd Python-3.5.2

Execute following commands to configure and install python...
./configure
make
sudo make install
Execute command "python" to go to python console
To exit from python console use "exit()"
use CXX=g++ ./configure if ./configure issues a warning saying g++ was not found 

Tuesday, April 28, 2015

Android SMS receive programmatically


Sending and receiving SMS messages are fundamental features on mobile devices. Android provides API for both send and receive sms to your android application.
Here is an example for catch when your android device receive SMS to it. You need to register a broadcast receiver initially for this.

For further references use following links.
SmsManager
SmsIntents

Monday, April 27, 2015

Android send SMS programmatically



An example for sending SMS programmatically in android. This will cost operator charges of sending sms. And also need to request sms sending permission from user to do this.

It also contents receiver for capture message sent and delivery status.
Following is the source for send SMS and get the status.

Tuesday, January 13, 2015

Android create Secured Wi-Fi hotspot

Here I'm going to give you a sample for create wifi tethering hotspot programmatically using android WifiManager hotspot.

Following example can directly use for create a WPA_PSK secured wifi hotspot programmatically. But this won't create the hotspot that you set in this code if you have switch on the tethering hotspot in your device before executing this code.


---------------------------------------------------------<for more>-----------------------------------------------------------

Wednesday, November 12, 2014

Install JAVA manually in UBUNTU

Installing Oracle JDK

First download the tar file of java version u required. Follow I downloaded 1.7

You will need sudo privileges to perform this task:


        sudo su



Monday, November 10, 2014

Android Overlay Chat Head



Following source will give you a movable overlay. (Like Chat head service provided by Facebook).

But in here there's no any other activities append to this and if some one need to do something like that please comment I'll provide the source for that.

For beginning create a service and include following code. So this will run as a service in you application.


Wednesday, November 5, 2014

Android Listen to Network State Change


Instagram This will help you to detect network changing states in android phone. For get an idea abut the API use for this read Followings.

Following Steps will do it. After setup the code and run the app just change your network status to flight mode and then again revert.


First we need to add required permission to read the changes of network connectivity. Insert following line in you AndroidManifest.xml file to do that.



       <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
       <uses-permission android:name="android.permission.READ_PHONE_STATE"/>
Now you good to go with the creating of your service.
Following is the code for the service that will detect the changes of network. (You can start  this even as BroadcastReceiver) 

Get an idea about Services Vs BroadcastReceivers in android. 

Thursday, May 29, 2014

Javascript default browser alert overide


Instagram  Plugin for override javascript default browser alert. Add to any js and call the function with require arguments.

Code......\|/

Tuesday, May 27, 2014

CodeBlocks Installing and Troubleshooting in UBUNTU

Instagram
Code::Blocks is a cross-platform Integrated Development Environment. Most of its functionality is already provided by plugins.

For Installation use this link.  Or in terminal execute,
             sudo apt-get install codeblocks

Thursday, May 22, 2014

Tips for JS

Instagram
Seacrh a value exists in string or array  (indexOf()
 
var str = "Hello world";
var n = str.indexOf("world")

This will return 2 for n. (Position of search key "world").
For not existing values this function will return -1.  ;)

* When delete an item in array always use splice instead of delete. Coz delete will replace the deleted item from undefined but splice not.

============================================================================
Disable Backspace and delete key

Insert following code in JS file

function disableBackspace(evt, obj) {
    var charCode = (evt.which) ? evt.which : evt.keyCode
    if ((charCode == 8 || charCode == 46) && clientMaskcurr.length >=   obj.selectionEnd ) return false;
    return true;
}


Insert following code in HTML related input

<input disableBackspace(event,this) .... >

Monday, April 28, 2014

Gedit For Erlang (Syntax Highlighting) And Edit Remote files from Gedit

        


Instagram
Download this language definition file for Erlang. (Written by Martin Ankerl) This will support to Gnome standard editor Gedit

As I'm a Ubuntu user this will explain how to configure the language highlighting component only to Gnome's Gedit tool..... :) :D [Btw there are many tools and tips for windows users always ;) ]


Wednesday, April 16, 2014

Turbo C compiling environment for windows 8

Instagram

You can download the all in one solution of C IDE for windows 7,8 32 and 64 bits from here.


After that set the environment variable if you wish to compile your source from anywhere then do the coding. ;)


If need any help about setting environment variable or any other matters just ask. I ll reply or put further more posts..... ;) Happy Hacking..... ;)

Friday, February 21, 2014

Ubuntu 12.04 proxy bypass

Instagram

In Ubuntu 12.04 there isn't a proxy bypassing (proxy ignoring) option in Network. If you go to your PC dash home and open Network, then you can see there is no any option for do that.






Friday, January 31, 2014

PHP development with google App Engine (Implementing and Troubleshooting)

Instagram
      Google App Engine lets you run web applications on Google's infrastructure. It is kind of a platform that you can build application from your preferred programming languages and run them on it.

   This post will discuss how to install App Engine in Linux environment and set it up to do PHP applications. Not much to do... But there will be some issues occur and here talk about how to troubleshoot them... 


[Following directory paths used as I preferred and you can use your own ;)]


Download Google App Engine  and put it in to a location where you preferred.
                [/opt/lib/google_appengine]

You can run your web applications with out doing any further things but it's easy adding this to your PATH variable in .bashrc ...
So insert following lines to .bashrc

# set GOOGLE_APP_ENGINE
export APPENGINE_SDK=/opt/lib/google_appengine  (Change this path to where downloaded app engine located)
export PATH=$PATH:$APPENGINE_SDK


After doing that change directory to where your .bashrc file locate. (home folder) Execute following command...
                   [root ~]~$: .bashrc       (This will reload new PATH you added)

Now execute command "dev_appserver.py", you can see usage parameters defined. If not some thing missing....So check what you have missed... :P

Now we ll create our HelloGoogle app from PHP and run it.

Create a directory in a workspace you preferred.
                  [root ~]~$: mkdir -p /home/zee/google/helloGoogle

Then create a PHP file helloGoogle.php and insert following code.
<?php
      echo 'Hello Google!!!';
?>

Another file you need to create app.yaml in your helloGoogle directory. Without this your application cannot run on App Engine server. (Not going to talk about it much as this is about implementing and troubleshooting) Insert Following code in to that file. 
application: helloGoogle
version: 1
runtime: php
api_version: 1
handlers:
- url: /.*
script: helloGoogle.php
Now you can continue..................


Execute following command in shell to up and run the server with your application...

         [root ~]~$: dev_appserver.py /home/zee/google/helloGoogle/

Go to your browser and load http://localhost:8080/ ... :)

Troubleshooting


Thursday, January 30, 2014

Web 2 development with Yii (Implementation and configuration)

Instagram
 

Yii.....High performance PHP framework that can use to create web applications easily. 

This topic will discuss how to install(implement) and configure Yii to use it more efficient way...
[As I'm an Ubuntu user I ll explain things only from linux ;) ]

I mentioned that this is an PHP based framework so again don't want to say, you must have PHP in your PC/Server to continue......  :P

Wednesday, January 29, 2014

Install Kannel(SMS Gateway) in Linux (SMPP to HTTP)

Instagram





 is an Open Source Gateway use to convert WAP and SMPP to HTTP. Here I'm not going to talk about Kannel but going to talk about how to do proper installation of Kannel in Linux.


You can download source of Kannel latest stable version 1.4.3 (though it released in 2009) from here.

Tuesday, July 9, 2013

Golang with Google Appengine

Golang

"Go is expressive, concise, clean, and efficient. Its concurrency mechanisms make it easy to write programs that get the most out of multicore and networked machines, while its novel type system enables flexible and modular program construction. Go compiles quickly to machine code yet has the convenience of garbage collection and the power of run-time reflection. It's a fast, statically typed, compiled language that feels like a dynamically typed, interpreted language."     

That's what they told about GO... :D

 

Installing Go in ubuntu

 For Ubuntu you can download Go from here. If you downloaded the tarball then extract it where you want to.In extracted folder you got a bin folder. (I did it on /opt/lib/go) That's what we want for further and now you are good to GO... :)

To check your download working properly just "cd" to the go/bin from shell and execute command ./go .. Then you ll see bunch of commands you can execute with go if not do the download again. 

Now download Google App Engine for GO. And extract it on a location you preferred. (/opt/lib/google/goAppEngine)



Will continue with further posts... ;)