The agents entirely deleted my mnowatch repository from the github.com (which is now a microsoft dominated site).
So I am posting here my script, for anyone who is interested in revealing the way the mnos vote.
here you are
Code:
#!/bin/bash
curl -s https://www.dashcentral.org/api/v1/budget > centralproposals_json
cat centralproposals_json | awk -F"\"name" '{for(i=2;i<=NF;i++){{print $i}}}'|cut -f2 -d":"|cut -f1 -d","|sed -e s/\"//g > current_props
echo "" > expired_props
./dash-cli -datadir=/home/src/.dashcore-0.12.2.3 masternodelist addr > masternodelist_addr
./dash-cli -datadir=/home/src/.dashcore-0.12.2.3 masternodelist payee > masternodelist_payee
./dash-cli -datadir=/home/src/.dashcore-0.12.2.3 gobject list > gobject_list
cat gobject_list |grep "{"|grep -v "DataString"|cut -f2 -d"\""|grep -v "{" > proposals
for fn in `cat proposals`; do
./dash-cli -datadir=/home/src/.dashcore-0.12.2.3 gobject getcurrentvotes $fn > "gobject_getcurrentvotes_"$fn
numi=`grep -n "\"Hash\": \""$fn gobject_list|tail -1|cut -f1 -d":"`
numi=`expr $numi - 1`
numip=$numi"p"
prop=`sed -n $numip gobject_list|cut -f4 -d":"|cut -f2 -d"\""|cut -f1 -d"\\\"`
echo $prop
greprop=`grep $prop current_props |wc -c`
echo $greprop
if [ $greprop -gt 1 ]
then
propc=`echo $prop|wc -c`
if [ $propc -gt 1 -a $propc -lt 200 ]
then
cat "gobject_getcurrentvotes_"$fn|grep ABSTAIN:FUNDING|cut -f3 -d"("|cut -f1 -d")"|sed -e s/", "/-/g > "ABSTAIN_"$prop
touch "ABSTAIN_IP_"$prop
for gn in `cat "ABSTAIN_"$prop`; do
addr1=`cat masternodelist_addr|grep $gn\"|cut -f2 -d":"|cut -f2 -d"\""`
echo $addr1 >> "ABSTAIN_IP_"$prop
done
mv "ABSTAIN_IP_"$prop "TMP_ABSTAIN_IP_"$prop
sort "TMP_ABSTAIN_IP_"$prop > "ABSTAIN_IP_"$prop
rm "TMP_ABSTAIN_IP_"$prop
echo "ABS:"`wc -l "ABSTAIN_IP_"$prop|cut -f1 -d" "`
cat "gobject_getcurrentvotes_"$fn|grep NO:FUNDING|cut -f3 -d"("|cut -f1 -d")"|sed -e s/", "/-/g > "NO_"$prop
touch "NO_IP_"$prop
for gn in `cat "NO_"$prop`; do
addr1=`cat masternodelist_addr|grep $gn\"|cut -f2 -d":"|cut -f2 -d"\""`
echo $addr1 >> "NO_IP_"$prop
done
mv "NO_IP_"$prop "TMP_NO_IP_"$prop
sort "TMP_NO_IP_"$prop > "NO_IP_"$prop
rm "TMP_NO_IP_"$prop
echo "NO:"`wc -l "NO_IP_"$prop|cut -f1 -d" "`
cat "gobject_getcurrentvotes_"$fn|grep YES:FUNDING|cut -f3 -d"("|cut -f1 -d")"|sed -e s/", "/-/g > "YES_"$prop
touch "YES_IP_"$prop
for gn in `cat "YES_"$prop`; do
addr1=`cat masternodelist_addr|grep $gn\"|cut -f2 -d":"|cut -f2 -d"\""`
echo $addr1 >> "YES_IP_"$prop
done
mv "YES_IP_"$prop "TMP_YES_IP_"$prop
sort "TMP_YES_IP_"$prop > "YES_IP_"$prop
rm "TMP_YES_IP_"$prop
echo "YES:"`wc -l "YES_IP_"$prop|cut -f1 -d" "`
else
echo "PROPOSAL <"$prop"> not accepted"
fi
else
echo "PROPOSAL <"$prop"> is expired"
echo "PROPOSAL <"$prop"> is expired" >> expired_props
fi
done
echo "Please wait"
cat masternodelist_addr|sed -e s/\"//g|sed -e s/\ //g|grep -v "}"|grep -v "{"|sed -e s/,//g > masternodelist_hash_addr_clear
cat masternodelist_addr|cut -f2 -d":"|cut -f2 -d"\""|grep -v "{"|grep -v "}" > masternodelist_addr_only
sort masternodelist_addr_only > masternodelist_addr_only_sorted
mkdir upload
cp masternodelist_addr_only_sorted ./upload
cp masternodelist_hash_addr_clear ./upload
for fn in `ls *_IP_*`; do
if [ -s $fn ]
then
cp $fn ./upload
fi
done
cd upload
dateis=`date +"%d-%m-%Y"`
filenameis="../the_results_dashd_"$dateis".html"
cat ../jsall2.html|sed -e s/"thedateis"/"$dateis"/g > $filenameis
for gn in `cat masternodelist_hash_addr_clear`; do
MNhashis=`echo $gn|cut -f1 -d":"`
ipis=`echo $gn|cut -f2 -d":"`
yesvotes=`grep -l ^$ipis$ *YES_IP_*|cut -f3- -d"_"`
novotes=`grep -l ^$ipis$ *NO_IP_*|cut -f3- -d"_"`
absvotes=`grep -l ^$ipis$ *ABSTAIN_IP_*|cut -f3- -d"_"`
allvotes=$yesvotes" "$novotes" "$absvotes
hashis=`bc <<<ibase=16\;$(sha1sum <<<$allvotes|tr a-z A-Z)0`
echo "<tr><td class=\"container1\"><div><a target=\"_blank\" href=https://ipinfo.io/"$ipis">"$ipis"</a> "$MNhashis"</div></td><td class=\"container2\"><div>"$yesvotes"</div></td><td class=\"container3\"><div>"$novotes"</div></td><td class=\"container4\"><div>"$absvotes"</div></td><td class=\"container5\"><div>"$hashis"</div></td></tr>" >> $filenameis
echo -n "."
done
echo "
</tbody>
</table>
</body>
</html>
" >> $filenameis
cd ..
filetimeis="upload_"`date +"%m-%d-%Y"`".zip"
zip -r $filetimeis ./upload
filenameiszip="../the_results_dashd_"$dateis".html.zip"
zip $filenameiszip "the_results_dashd_"$dateis".html"
distrfileis="distr_"$dateis".txt"
echo "The first operator includes all people who abstain. All the rest are identified by the way they vote." > $distrfileis
cat the_results_dashd_*.html| cut -f22 -d"<"|cut -f2 -d">"|grep -v [a-z]|grep -v [A-Z]| grep ^[0-9]|grep -v "-"|sort|uniq -c|sed -e s/'^ '/000/g|sed -s s/'000 '/000000/g|sed -e s/'000 '/00000/g|sed -s s/'000 '/0000/g|sort -r|cut -f1 -d" "|uniq -c|sed -e s/" 0"/" operator(s) control(s) "/g|sed -e s/$/" masternode(s)"/g >> $distrfileis
echo "END! "
I ran the script in the current budget cycle, and here you are some statistics
Distribution of MNOs revealed at 30-6-2018
The first operator includes all people who abstain. All the rest are identified by the way they vote.
1 operator(s) control(s) 002456 masternode(s)
1 operator(s) control(s) 000111 masternode(s)
1 operator(s) control(s) 000073 masternode(s)
1 operator(s) control(s) 000072 masternode(s)
1 operator(s) control(s) 000062 masternode(s)
1 operator(s) control(s) 000049 masternode(s)
1 operator(s) control(s) 000047 masternode(s)
1 operator(s) control(s) 000046 masternode(s)
1 operator(s) control(s) 000045 masternode(s)
1 operator(s) control(s) 000044 masternode(s)
1 operator(s) control(s) 000042 masternode(s)
1 operator(s) control(s) 000041 masternode(s)
1 operator(s) control(s) 000039 masternode(s)
1 operator(s) control(s) 000037 masternode(s)
1 operator(s) control(s) 000032 masternode(s)
1 operator(s) control(s) 000031 masternode(s)
1 operator(s) control(s) 000030 masternode(s)
1 operator(s) control(s) 000028 masternode(s)
2 operator(s) control(s) 000025 masternode(s)
1 operator(s) control(s) 000021 masternode(s)
2 operator(s) control(s) 000020 masternode(s)
1 operator(s) control(s) 000019 masternode(s)
3 operator(s) control(s) 000017 masternode(s)
3 operator(s) control(s) 000016 masternode(s)
1 operator(s) control(s) 000015 masternode(s)
2 operator(s) control(s) 000014 masternode(s)
2 operator(s) control(s) 000013 masternode(s)
1 operator(s) control(s) 000012 masternode(s)
5 operator(s) control(s) 000011 masternode(s)
8 operator(s) control(s) 000010 masternode(s)
6 operator(s) control(s) 000009 masternode(s)
4 operator(s) control(s) 000008 masternode(s)
11 operator(s) control(s) 000007 masternode(s)
8 operator(s) control(s) 000006 masternode(s)
24 operator(s) control(s) 000005 masternode(s)
23 operator(s) control(s) 000004 masternode(s)
43 operator(s) control(s) 000003 masternode(s)
105 operator(s) control(s) 000002 masternode(s)
304 operator(s) control(s) 000001 masternode(s)