Saturday 21 September 2013

ns working


Contd 2
1
Lol packets are moving like Bullet


So here is Question? How i did this :p. it’s really simple i made a small script in TCL language, which is basically design to stimulate UDP packet’s from node 0 to node 1 via one Link. Let me explain you..but Before check Below
Fundamental’s for writing tcl script for Network simulator-2
I have devided this codes into 6 parts with each explanation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
set ns [new Simulator]
set nf [open out.nam w]
$ns namtrace-all $nf
proc finish {} {
        global ns nf
        $ns flush-trace
        close $nf
        exec nam out.nam &
        exit 0
}
$ns at 3.0 "finish"
set n0 [$ns node]
set n1 [$ns node]
$ns duplex-link $n0 $n1 1Mb 10ms DropTail
$ns run
1. we need to create a simulator object something like this.
1
set ns [new Simulator]
2.Now we need to open a file for writing that is going to be used for the nam trace data.First line open a file ‘out.nam’ for writing and give it to file handle ‘nf’
1
set nf [open out.nam w]
In this code we are telling simulator object that we created above to write all simulation data that is going to be relevant for nam into this file
1
$ns namtrace-all $nf
3.This is to add a ‘finish’ procedure that closes the trace file and start nam
1
2
3
4
5
6
7
proc finish {} {
        global ns nf
        $ns flush-trace
        close $nf
        exec nam out.nam &
        exit 0
}
4.This one tell simulator object to execute the ‘finish’ procedure after 3.0 seconds of simulation time
1
$ns at 3.0 "finish"
5. This code tells the simulator object to connects the nodes n0 and n1 with duplex link with a bandwidth 1 Megabit,a delay of 10ms Drop tail (A simple queue management algorithm used by internet routers to decides when to drop packets :) )
1
$ns duplex-link $n0 $n1 1Mb 10ms DropTail
6.This is a last line finally starts the simulation
1
$ns run
Now save the above script with .tcl extansion, and Open a terminal type
1
ns filename.tcl
You will se something like this
NOW to send a data on two nodes via one link, we need to do certaine things
1.Create a UDP agent.
2.Create a CBR traffic source.
3.Create NULL agent which act as a traffic sink
4.Connect the two agent with each other.
5.Fixe the time when to send and stop a data.
1.Create a UDP agent and attach it to node n0
1
2
set udp0 [new Agent/UDP]
$ns attach-agent $n0 $udp0
2.Create a CBR traffic source and attach it to udp0
1
2
3
4
set cbr0 [new Application/Traffic/CBR]
$cbr0 set packetsize_ 500
$cbr0 set interval_ 0.005
$cbr0 attach-agent $udp0
3.The next lines creates a null agent which acts as traffic sink and attach it to node n1
1
2
set null0 [new Agent/null]
$ns attach-agent $n1 $null0
4. Now we are going to connect two agents with each other
1
$ns connect $udp0 $null0
5 NOw to fix a time by telling CBR agent when to send data and when to stop sending a data by following code
1
2
$ns at 0.5 "$cbr0 start"
$ns at 4.5 "$cbr0 stop"
So here is a complete code
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#Create a simulator object
set ns [new Simulator]
#Open the nam trace file
set nf [open out.nam w]
$ns namtrace-all $nf
#Define a 'finish' procedure
proc finish {} {
        global ns nf
        $ns flush-trace
    #Close the trace file
        close $nf
    #Execute nam on the trace file
        exec nam out.nam &
        exit 0
}
#Create two nodes
set n0 [$ns node]
set n1 [$ns node]
#Create a duplex link between the nodes
$ns duplex-link $n0 $n1 1Mb 10ms DropTail
#Create a UDP agent and attach it to node n0
set udp0 [new Agent/UDP]
$ns attach-agent $n0 $udp0
# Create a CBR traffic source and attach it to udp0
set cbr0 [new Application/Traffic/CBR]
$cbr0 set packetSize_ 500
$cbr0 set interval_ 0.05
$cbr0 attach-agent $udp0
#Create a Null agent (a traffic sink) and attach it to node n1
set null0 [new Agent/Null]
$ns attach-agent $n1 $null0
#Connect the traffic source with the traffic sink
$ns connect $udp0 $null0 
#Schedule events for the CBR agent
$ns at 0.5 "$cbr0 start"
$ns at 4.5 "$cbr0 stop"
#Call the finish procedure after 5 seconds of simulation time
$ns at 5.0 "finish"
#Run the simulation
$ns run
Now save it with some name with .tcl extension,and again Open a terminal Type
1
ns filename.tcl

How to find PUK code of your SIM Card (Phone Number)


Few people use PIN locking system to lock their phone to avoid un-authorised access. Though this is a good option, it pisses you off sometime. Three wrong entry of PIN code will result in SIM blocking. Once SIM gets blocked, phone starts asking PUK code to enter. If you again enter wrong code for three times, SIM gets completely blocked. You have to walk into your service provider outlet to get a replacement SIM card.
PUK code is a SIM specific code assigned by your service provider. No way you can guess & enter it. So, when it asks for the PUK code, don’t do anything, get the PUK code from your service provider. Airtel has a easier way of getting PUK code. For getting PUK code of a Airtel number, send PUK<space>PhoneNumberto toll free number 121. You can make use of any other Airtel number to send this message since your SIM might have been blocked already.
If the above method doesn’t works or your service provider is not Airtel, call to customer care using any other mobile phone which uses the same service provider. They will ask some details about you to make sure you are the owner of the SIM card. Questions might include your billing address, email ID, numbers you recently called or messaged etc. They might even ask you number printed on the SIM card, so be prepared with all details before calling them. Once you get the PUK code, enter it into the phone & your phone will return to normal.
Vodafone trick
Sometime you stuck with zero balance and wants to recharge ur phone using web methods which requesrs you to enter mobile number before you recharge. So this method will give you ur number with balance details.
FOR VODAFONE  DIAL *111*2# & Hit Call
Refer Cyberz Tab
To install Conky on Ubuntu First we need to know what is Conky ?
A Conky is a Programe which is free,and light-weight system monitor for X, that displays any information on your desktop like CPU, Ram, System up-time Disk usage with graph, Kernel version Network info(Up and Down Speed, Network signals, ip address)Time and Date with day + year. Conky is licensed under the GPL and runs on Linux and BSD Distribution. For example it is something like this in below pics.
7
But here i am taking my virtualBox OS (UBuntu),Now to install Conky in Ubuntu/Linux open terminal and copy the following commands in the Terminal.
1
sudo apt-get install conky conky-all
Then Download Startup script with following commands
1
2
wget -O .start-conky http://goo.gl/H8K9L
 chmod +x .start-conky
Now Hit Alt and F2, Type “Startup Applications” For example,
conkyStartupApplication
Then Click on ADD Typ in name “Conky” Click on Browse, Go to home Directory(Mine /home/bipul/) and Hit “Alt and H”.CLick on .start-conky(Note-First time you have choose this file .start-conky) then “Add” then “Close” For example.
Startupaddconky
Then finally Logout from present account and again Loged in

Microsoft SharePoint vulnerable to Exception Handling Web Vulnerability 

The Vulnerability Laboratory Research Team discovered a persistent web vulnerability in the official Microsoft Sharepoint Online (cloud-based) application. The vulnerability allows remote attackers to inject own malicious script code to a vulnerable module on application-side (persistent). The vulnerability is located in the `Sharepoint Online Cloud 2013 Service` section when processing to request the `Berechtigungen für den Metadatenspeicher festlegen` module with manipulated ms-descriptionText > ctl00_PlaceHolderDialogBodySection_ PlaceHolderDialogBodyMainSection_ValSummary parameters. The persistent injected script code execution occurs in the main `invalid BDC Ãœbereinstimmung` web application exception-handling The vulnerability can be exploited with a low (restricted) privileged application user account and low or medium required user interaction. Successful exploitation of the vulnerability result in persistent session hijacking, persistent phishing, stable external redirect, stable external malware loads and persistent vulnerable module context manipulation. 

The vulnerability is fixed