Added script for offsets
This commit is contained in:
parent
758d24ff55
commit
cc77b3be08
9 changed files with 10026 additions and 0 deletions
1
endCodeAddr
Normal file
1
endCodeAddr
Normal file
|
@ -0,0 +1 @@
|
||||||
|
5598ef39a000
|
1
endStackAddr
Normal file
1
endStackAddr
Normal file
|
@ -0,0 +1 @@
|
||||||
|
7ffc973d6000
|
9991
output.csv
Normal file
9991
output.csv
Normal file
File diff suppressed because it is too large
Load diff
3
pid
Normal file
3
pid
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
61552
|
||||||
|
61665
|
||||||
|
61922
|
0
serveur_data.txt
Normal file
0
serveur_data.txt
Normal file
1
startCodeAddr
Normal file
1
startCodeAddr
Normal file
|
@ -0,0 +1 @@
|
||||||
|
5598ef399000
|
1
startLibcAddr
Normal file
1
startLibcAddr
Normal file
|
@ -0,0 +1 @@
|
||||||
|
7f05357f2000
|
1
startStackAddr
Normal file
1
startStackAddr
Normal file
|
@ -0,0 +1 @@
|
||||||
|
7ffc973b5000
|
27
stats.sh
Executable file
27
stats.sh
Executable file
|
@ -0,0 +1,27 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
numPort=$1;
|
||||||
|
rm output.csv;
|
||||||
|
touch output.csv;
|
||||||
|
echo 'startCodeAddr,endCodeAddr,startLibAddr,endLibAddr,startStackAddr,endStackAddr' >> output.csv;
|
||||||
|
|
||||||
|
for ((nbIte=1; nbIte<=10000; nbIte++))
|
||||||
|
do
|
||||||
|
./serveur $numPort & > serveur_data.txt;
|
||||||
|
sleep 0.01;
|
||||||
|
pid=`ps -ef | grep serveur | grep -v grep | awk '{print $2}'`;
|
||||||
|
#echo "Ité $nbIte, pid = $pid";
|
||||||
|
if [ -n "$pid" ]
|
||||||
|
then
|
||||||
|
startCodeAddr=`cat /proc/$pid/maps | grep /home/elies/Cours/4A/PIRDir/PIR/serveur | grep r-xp | awk '{print $1}' | awk -F "-" '{print $1}'`;
|
||||||
|
endCodeAddr=`cat /proc/$pid/maps | grep /home/elies/Cours/4A/PIRDir/PIR/serveur | grep r-xp | awk '{print $1}' | awk -F "-" '{print $2}'`;
|
||||||
|
startStackAddr=`cat /proc/$pid/maps | grep stack | awk '{print $1}' | awk -F "-" '{print $1}'`;
|
||||||
|
endStackAddr=`cat /proc/$pid/maps | grep stack | awk '{print $1}' | awk -F "-" '{print $2}'`;
|
||||||
|
startLibcAddr=`cat /proc/$pid/maps | grep /lib/x86_64-linux-gnu/libc-2.31.so | grep r-xp | awk '{print $1}' | awk -F "-" '{print $1}'`;
|
||||||
|
endLibcAddr=`cat /proc/$pid/maps | grep /lib/x86_64-linux-gnu/libc-2.31.so | grep r-xp | awk '{print $1}' | awk -F "-" '{print $2}'`;
|
||||||
|
echo "$startCodeAddr,$endCodeAddr,$startLibcAddr,$endLibcAddr,$startStackAddr,$endStackAddr" >> output.csv;
|
||||||
|
fi
|
||||||
|
kill -9 $pid &> /dev/null;
|
||||||
|
done
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue