aboutsummaryrefslogtreecommitdiff
path: root/boca-1.5.1/tools
diff options
context:
space:
mode:
authorcassiopc <cassiopc@gmail.com>2012-10-22 16:50:03 +0000
committercassiopc <cassiopc@gmail.com>2012-10-22 16:50:03 +0000
commitdf477b322c071d81ea06ad972a36ea9f30cdc34f (patch)
tree77dad3b53ed879e65b22f24f880592a12e5dbad0 /boca-1.5.1/tools
parent9e75d473525446d0961a7567bcb8a1e672949df8 (diff)
downloadboca-df477b322c071d81ea06ad972a36ea9f30cdc34f.tar.gz
boca-df477b322c071d81ea06ad972a36ea9f30cdc34f.zip
update sendscore.sh to cope with new version. Fix password update and hexsub
Diffstat (limited to 'boca-1.5.1/tools')
-rw-r--r--boca-1.5.1/tools/icpc.etc.tgzbin9583 -> 9553 bytes
-rwxr-xr-xboca-1.5.1/tools/sendscore.sh10
2 files changed, 5 insertions, 5 deletions
diff --git a/boca-1.5.1/tools/icpc.etc.tgz b/boca-1.5.1/tools/icpc.etc.tgz
index 4151601..6a4f09f 100644
--- a/boca-1.5.1/tools/icpc.etc.tgz
+++ b/boca-1.5.1/tools/icpc.etc.tgz
Binary files differ
diff --git a/boca-1.5.1/tools/sendscore.sh b/boca-1.5.1/tools/sendscore.sh
index 371c8d2..72393c3 100755
--- a/boca-1.5.1/tools/sendscore.sh
+++ b/boca-1.5.1/tools/sendscore.sh
@@ -15,7 +15,7 @@
# // You should have received a copy of the GNU General Public License
# // along with this program. If not, see <http://www.gnu.org/licenses/>.
# ////////////////////////////////////////////////////////////////////////////////
-# last modified 10/jul/2012 by cassio@ime.usp.br
+# last modified 22/oct/2012 by cassio@ime.usp.br
if [ "$1" == "" -o "$2" == "" -o "$3" == "" -o "$4" == "" ]; then
echo "Usage $0 <scorefile> <BOCAaddress> <user> <password> [<PC2site>]"
@@ -32,7 +32,7 @@ if [ "$5" != "" ]; then
pc2=$5
fi
-for i in wget tr perl md5sum cut; do
+for i in wget tr perl shasum cut; do
p=`which $i`
if [ -x "$p" ]; then
echo -n ""
@@ -44,9 +44,9 @@ done
if [ -r "$1" ]; then
md=`wget -S -T3 -t3 $BOCASERVER/index.php -O /dev/null --save-cookies /tmp/.cookie.txt --keep-session-cookies 2>&1 | grep PHPSESS | tail -n1 | cut -f2 -d'=' | cut -f1 -d';'`
-res=`echo -n $pass | md5sum - | cut -f1 -d' '`
-res=`echo -n "${res}${md}" | md5sum - | cut -f1 -d' '`
-wget -T3 -t3 "$BOCASERVER/index.php?name=${user}&password=${res}" --load-cookies /tmp/.cookie.txt --keep-session-cookies --save-cookies /tmp/.cookie.txt -O /tmp/.temp.txt 2>/dev/null >/dev/null
+res=`echo -n $pass | shasum -a 256 - | cut -f1 -d' '`
+res=`echo -n "${res}${md}" | shasum -a 256 - | cut -f1 -d' '`
+wget -T3 -t3 "$BOCASERVER/index.php?name=${user}&password=${res}&action=scoretransfer" --load-cookies /tmp/.cookie.txt --keep-session-cookies --save-cookies /tmp/.cookie.txt -O /tmp/.temp.txt 2>/dev/null >/dev/null
grep -qi incorrect /tmp/.temp.txt
if [ $? == 0 ]; then
echo User or password incorrect