Solution of blackhole or malicious attacks

134 views
Skip to first unread message

Mohammad Jeelani

unread,
Aug 15, 2020, 6:06:06 AM8/15/20
to Network Simulator 2 (NS2)
Dear all user,

Hope all of you will be fine. I am using Ubuntu 18.04 and i have been doing simulation for WSN with blackhole and malicious attack. I am getting error, please anyone help me. And I have also modified aodv.cc and aodv.h file but still error is comming. Kindly please help me.
zac@zac-HP-Notebook:~/NS2/replicate$ ns AODV.tcl 
num_nodes is set 17
INITIALIZE THE LIST xListHead
ns: _o132 blackhole: 
    (_o132 cmd line 1)
    invoked from within
"_o132 cmd blackhole"
    invoked from within
"catch "$self cmd $args" ret"
    invoked from within
"if [catch "$self cmd $args" ret] {
set cls [$self info class]
global errorInfo
set savedInfo $errorInfo
error "error when calling class $cls: $args" $..."
    (procedure "_o132" line 2)
    (SplitObject unknown line 2)
    invoked from within
"_o132 blackhole"
zac@zac-HP-Notebook:~/NS2/replicate$

Mohammad Jeelani

unread,
Aug 15, 2020, 6:10:12 AM8/15/20
to ns-u...@googlegroups.com
Please check these files.

--
You received this message because you are subscribed to the Google Groups "Network Simulator 2 (NS2)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ns-users+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ns-users/e42632ed-2d84-43e2-b8c9-0f72f93a52ddn%40googlegroups.com.
aodv.h
aodv.cc
AODV.tcl

knudfl

unread,
Aug 15, 2020, 7:09:27 AM8/15/20
to Network Simulator 2 (NS2)

Ashagrie Mosu

unread,
Aug 18, 2020, 11:15:31 AM8/18/20
to Network Simulator 2 (NS2)
Dear all user,
My questions the same to my guys for before uploaded error.
Hope all of you will be fine. I am using Ubuntu 18.04 and i have been doing simulation for MANET with blackhole and malicious attack. I am getting error even, please anyone help me. And I have also modified aodv.cc and aodv.h file but still error is comming. Kindly please help me.
ashu@ubuntu-Virtualbox:~/malicious_node$ ns AODV.tcl 
num_nodes is set 17
INITIALIZE THE LIST xListHead
ns: _o132 blackhole: 
    (_o132 cmd line 1)
    invoked from within
"_o132 cmd blackhole"
    invoked from within
"catch "$self cmd $args" ret"
    invoked from within
"if [catch "$self cmd $args" ret] {
set cls [$self info class]
global errorInfo
set savedInfo $errorInfo
error "error when calling class $cls: $args" $..."
    (procedure "_o132" line 2)
    (SplitObject unknown line 2)
    invoked from within
"_o132 blackhole"
ashu@ubuntu-Virtualbox:~/malicious_node$

Kiran Kumar v

unread,
Aug 18, 2020, 11:28:12 AM8/18/20
to ns-u...@googlegroups.com
I think black_hole will make any sense...or clear the error wherever u have declared... Give a try by chance if it works. 
Right now I am little bz to code on...and check... When I find time will surely do check and reply.

knudfl

unread,
Aug 18, 2020, 1:45:49 PM8/18/20
to Network Simulator 2 (NS2)
@kiran ,  Hi.

Same as post #1 by @jeela :  Looks like you are using a copy of the executable 'ns' with no "blackholeaodv" included.
Your setup with {aodv.cc, aodv.h} only is a primitive flavor of blackholeaodv. Also known as "malicious".

Build example ....
tar xvf ns-allinone-2.35_gcc5.tar.gz
https://drive.google.com/file/d/0B7S255p3kFXNVVlxR0ZNRGVORjQ/view?usp=sharing
cd ns-allinone-2.35/
patch -p0 < blackhole-MohitTahiliani__ns235.patch
https://drive.google.com/file/d/0B7S255p3kFXNcEdWSThNVTkzUkk/view?usp=sharing
export CC=gcc-4.8 CXX=g++-4.8 && ./install
cd ns-2.35/
cp ns ns-black-M
sudo cp ns-black-M /usr/local/bin/

-------------- Simulation -------------
ns-black-M blackhole.tcl

Please note that it is a good idea to use an executable "ns.[name]" different from plain 'ns'.
------------

The advanced `blackholeaodv´ is described here https://groups.google.com/g/ns-users/c/Viptkrf7d4E/m/u1p_L9h8DgAJ
Reply all
Reply to author
Forward
0 new messages