Mohd Haizad H asked: Here I attach bash coding that done for send text using vNote format to handphone and PDA. Can you tell me wish part that I must change in this code that I can send image jpeg format to laptop and desktop pc and where I should place the jpeg image? I need your h.elp. Thank you.
init.bash
#!/bin/bash
#include
#include
hciconfig hci0 up
mkdir -p /dev/bluetooth/rfcomm
mknod -m 666 /dev/bluetooth/rfcomm/0 c 216 0
./one.bash
one.bash
#!/bin/bash
#include
#include
hcitool scan hci0 > raw.txt
declare -a ARRAY
declare -a ARRY
exec 99
let count=0
while read LINE <&99; do
ARRAY[$count]=$LINE
((count++))
done
echo ${ARRAY[*]} | awk '{print $1 ;}' raw.txt > edit.txt
exec 99>&-
sed -e ‘1d’ edit.txt > sel.txt
sleep 5;
./two.bash
two.bash
#!/bin/bash
#include
#include
declare -a ARRY
exec 80
let c=0
while read LINE <&80; do
ARRY[$c]=$LINE
((c++))
done
exec 80>&-
echo ${ARRY[*]} > try.txt
echo “******”" LOG AND BACKUP DATA BTFRIEND “”******” > store.txt
date ‘+%B %d %H:%I:%S’ >>store.txt
echo “***************************************************************” >> store.txt
for c in 0 1 2 3 4 5 6 7 8 9 10
do
{
MAC=${ARRY[c]}
OCHAN=$(sdptool search –bdaddr $MAC OPUSH | grep Channel:)
if test “$OCHAN” != “”
then
OCHAN=$(echo $OCHAN | awk ‘/Channel:/ { print $2 }’)
fi
echo “$MAC” “$OCHAN” >> mess.txt
case “$MAC”
in
00:0A:D9*)
echo “$MAC” “High Risk” >> store.txt
cd /UNIONFS/usr/local/apps/bluetooth/obexpush-dos
echo “Your phone is not secure and having HIGH risk to be ATTACK.Please turn OFF your Bluetooth” > note_high.txt
./ussp-push $MAC@$OCHAN note_high.txt note_high.txt
;;
00:12:37*)
echo “$MAC” “Medium Risk” >> store.txt
cd /UNIONFS/usr/local/apps/bluetooth/obexpush-dos
echo “Your phone is not secure and having MEDIUM risk to be ATTACK.Please turn OFF ypur Bluetooth” > note_med.txt
./ussp-push $MAC@$OCHAN note_med.txt note_med.txt
;;
*)
echo “$MAC” “Low Risk” >> store.txt
cd /UNIONFS/usr/local/apps/bluetooth/obexpush-dos
echo “Your phone is not secure and having LOW risk to be ATTACK.Please turn OFF your Bluetooth” > note_low.txt
./ussp-push $MAC@$OCHAN note_low.txt note_low.txt
;;
esac
}
done
sleep 30;
./one.bash
Salvador Travel