Created
April 4, 2012 21:40
-
-
Save sim51/2305903 to your computer and use it in GitHub Desktop.
Comment inverser une chaine de caractère ... avec twitter
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
STWEET_USER=logisimatest | |
STWEET_PASS= | |
while [[ "$phrase" == "" ]] | |
do | |
echo | |
echo "Tapez une phrase :" | |
read word | |
done | |
for (word in $phrase){ | |
size=${#word} | |
while [ -n "$word" ] | |
do | |
DATE=`date +%Y%m%d%H%M%s` | |
letter=$(printf "%c" "$word") | |
word=${word#?} | |
resp=1 | |
while [[ ${#resp} != 0 ]] | |
do | |
echo "tweet letter $letter" | |
curl --silent -u $STWEET_USER:$STWEET_PASS --data-binary "status=$letter@$DATE#" http://api.supertweet.net/1/statuses/update.xml > temp | |
resp=$(grep '<error>' temp | sed 's/.*<error>\([-a-zA-Z0-9 ._@#]\+\)<\/error>.*/\1/g') | |
echo $resp | |
sleep 1 | |
done | |
done | |
sleep 4 | |
curl --silent -u $STWEET_USER:$STWEET_PASS http://api.supertweet.net/1/statuses/user_timeline.xml?count=${size} > temp | |
echo "reverse word is" | |
echo `grep '<text>' temp` | sed 's/<text>\([-a-zA-Z0-9 ._@#]\+\)\?@[0-9]\+#<\/text>[[:space:]]\?/\1/g' | |
} |
You mean the password is here :p
oui celui-là ^^
Pas grave...
Il a été généré pour le compte "supertwitter" qui permet uniquement de tweeter sur mon compte twitter de test ... c'est pas critique ^^
Oh ben tient je le connais ce mot de passe :D
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Je suis pas réveillé ce matin ... je me demande pourquoi :D