change from ur1.ca to link.fsfe.org
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,2 +1,3 @@
|
|||||||
config.cfg
|
config.cfg
|
||||||
.twitter.db
|
.twitter.db
|
||||||
|
.userpass.txt
|
||||||
|
|||||||
1
.userpass.txt.sample
Normal file
1
.userpass.txt.sample
Normal file
@@ -0,0 +1 @@
|
|||||||
|
-u username:password
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
DIR="pic"
|
DIR="pic"
|
||||||
DOMAIN="https://example.com/twitter"
|
DOMAIN="https://serv.mehl.mx/twitter"
|
||||||
DB=".twitter.db"
|
DB=".twitter.db"
|
||||||
SLSERV="http://ur1.ca"
|
SLSERV="http://link.fsfe.org/index.rb"
|
||||||
SLGREP1="Your ur1 is"
|
SLGREP1='Your link is: <a href=.*?>.*?</a>'
|
||||||
SLGREP2="http://ur1.ca/[a-zA-Z0-9]*"
|
SLGREP2="http://l.fsfe.org/[a-zA-Z0-9]*"
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ if [ "$DBCHECK" != "" ]; then # file has already been downloaded
|
|||||||
else # file hasn't been downloaded yet
|
else # file hasn't been downloaded yet
|
||||||
ok="n"
|
ok="n"
|
||||||
while [ "$ok" != "y" ]; do
|
while [ "$ok" != "y" ]; do
|
||||||
RAND=$(openssl rand -hex 4)
|
RAND=$(openssl rand -hex 3)
|
||||||
if [ ! -e "$DIR/$RAND.$EXT" ]; then
|
if [ ! -e "$DIR/$RAND.$EXT" ]; then
|
||||||
ok="y"
|
ok="y"
|
||||||
fi
|
fi
|
||||||
@@ -57,9 +57,8 @@ else # file hasn't been downloaded yet
|
|||||||
|
|
||||||
LCIMG="$DIR/$RAND.$EXT"
|
LCIMG="$DIR/$RAND.$EXT"
|
||||||
LCLINK="$DOMAIN/$LCIMG"
|
LCLINK="$DOMAIN/$LCIMG"
|
||||||
|
|
||||||
SLLINK=$(curl -s "$SLSERV" -d"longurl=$LCLINK" -A "Mozilla" | grep -i "$SLGREP1" | sed -e 's/<[^>]*>//g' | grep -Eo "$SLGREP2")
|
|
||||||
|
|
||||||
|
SLLINK=$(curl -K .userpass.txt -s "$SLSERV" -d "link=$LCLINK" -A "Mozilla" | grep -P -io "$SLGREP1" | sed -e 's/<[^>]*>//g' | grep -Eo "$SLGREP2")
|
||||||
|
|
||||||
echo "$TWFILE;$SLLINK;$LCLINK" >> "$DB"
|
echo "$TWFILE;$SLLINK;$LCLINK" >> "$DB"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user