Skip to content
Permalink
Browse files

* vkontakte.ru: s#vkontakte.ru#vk.com#g

  • Loading branch information...
l29ah committed Jan 28, 2012
1 parent d515c3c commit 67c93ecc6cfbb20df9b6b49d03aea965b149f4f6
Showing with 12 additions and 11 deletions.
  1. +1 −0 vk.com
  2. +2 −2 vkontakte.ru/vkfindaudio
  3. +3 −3 vkontakte.ru/vkfindaudio.pl
  4. +1 −1 vkontakte.ru/vkgetstate
  5. +1 −1 vkontakte.ru/vklogin
  6. +2 −2 vkontakte.ru/vkpm
  7. +2 −2 vkontakte.ru/vkwall
1 vk.com
@@ -4,7 +4,7 @@ shift 1
FIND=$*

FIND=`echo -n "$FIND" | urlencode`
wget --load-cookies "$COOKIEF" "http://vkontakte.ru/gsearch.php?q=$FIND&section=audio" -qO- |
wget --load-cookies "$COOKIEF" "http://vk.com/gsearch.php?q=$FIND&section=audio" -qO- |
iconv -f cp1251 |
sed -ne 's/.*onclick="return operate([0-9]*,\([0-9]*\),\([0-9]*\),'\''\([0-9a-f]*\)'\'',[0-9]*);".*/http:\/\/cs\1.vkontakte.ru\/u\2\/audio\/\3.mp3/p;
sed -ne 's/.*onclick="return operate([0-9]*,\([0-9]*\),\([0-9]*\),'\''\([0-9a-f]*\)'\'',[0-9]*);".*/http:\/\/cs\1.vk.com\/u\2\/audio\/\3.mp3/p;
s/.*performer[0-9]*">\(.*\)<\/b> - <span id="title[0-9]*">\(.*\)<\/spa.*/\1 - \2/p;'
@@ -15,13 +15,13 @@
$browser->cookie_jar(HTTP::Cookies->new());

# Login first
my $response = $browser->post("http://vkontakte.ru/login.php", {success_url => '', fail_url => '', try_to_login => 1, email => $logininfo{vk_login}, pass => $logininfo{vk_passw}});
my $response = $browser->post("http://vk.com/login.php", {success_url => '', fail_url => '', try_to_login => 1, email => $logininfo{vk_login}, pass => $logininfo{vk_passw}});

my $query = join ' ', @ARGV;
$response = $browser->get("http://vkontakte.ru/gsearch.php?q=$query&section=audio");
$response = $browser->get("http://vk.com/gsearch.php?q=$query&section=audio");
if ($response->is_success) {
foreach (split /\n/, $response->content) {
print "http://cs$1.vkontakte.ru\/u$2/audio/$3.mp3\n" if /return operate\([0-9]*,([0-9]*),([0-9]*),'([0-9a-f]*)',[0-9]*\)/;
print "http://cs$1.vk.com\/u$2/audio/$3.mp3\n" if /return operate\([0-9]*,([0-9]*),([0-9]*),'([0-9a-f]*)',[0-9]*\)/;
}
}
else {
@@ -2,7 +2,7 @@

COOKIEF=$1

wget --load-cookies "$COOKIEF" -q -O - "http://vkontakte.ru/feed2.php" |
wget --load-cookies "$COOKIEF" -q -O - "http://vk.com/feed2.php" |
cut -d, -f 2-10 --output-delimiter='
' |
sed 's/.*": \([0-9]*\)}/\1/' |
@@ -3,5 +3,5 @@ LOGIN=$1
PASSWORD=$2
COOKIEF=$3

wget -S --save-cookies "$COOKIEF" --keep-session-cookies --post-data="success_url=&fail_url=&try_to_login=1&email=$LOGIN&pass=$PASSWORD" 'http://vkontakte.ru/login.php' -O /dev/null -q &> /dev/null
wget -S --save-cookies "$COOKIEF" --keep-session-cookies --post-data="success_url=&fail_url=&try_to_login=1&email=$LOGIN&pass=$PASSWORD" 'http://vk.com/login.php' -O /dev/null -q &> /dev/null

@@ -8,8 +8,8 @@ TEXT=$*

TITLE=`echo -n "$TITLE" | iconv -t cp1251 | urlencode`
TEXT=`echo -n "$TEXT" | iconv -t cp1251 | urlencode`
wget --load-cookies "$COOKIEF" --post-data=`wget --load-cookies "$COOKIEF" "http://vkontakte.ru/mail.php?act=write&to=$SPAMTO" -qO- |
wget --load-cookies "$COOKIEF" --post-data=`wget --load-cookies "$COOKIEF" "http://vk.com/mail.php?act=write&to=$SPAMTO" -qO- |
sed -n '/name="secure"/p
/name="chas"/p' |
sed 's/.*value="\([0-9a-f]*\)".*/\1/' |
(read a; read b; echo "secure=$a&chas=$b")`"&photo=0&to_id=$SPAMTO&to_reply=0&act=sent&title=$TITLE&message=$TEXT" -qO/dev/null "http://vkontakte.ru/mail.php"
(read a; read b; echo "secure=$a&chas=$b")`"&photo=0&to_id=$SPAMTO&to_reply=0&act=sent&title=$TITLE&message=$TEXT" -qO/dev/null "http://vk.com/mail.php"
@@ -5,7 +5,7 @@ shift 2
TEXT=$*

TEXT=`echo -n "$TEXT" | iconv -t cp1251 | urlencode`
uhp=`wget --load-cookies "$COOKIEF" "http://vkontakte.ru/id$SPAMTO" -q -O /tmp/$$`
uhp=`wget --load-cookies "$COOKIEF" "http://vk.com/id$SPAMTO" -q -O /tmp/$$`
url=`cat /tmp/$$ | grep 'wall.php?act=get10&wall_hash' | sed 's/.*makeFRequest('\''\(.*\)'\''.*/,\1/' | cut -d, -f2`
toid=`sed -n '/name="to_id"/p' /tmp/$$ | sed 's/.*value="\([0-9a-f]*\)".*/\1/'`
wget -q --load-cookies "$COOKIEF" --post-data="seed=$TEXT&fpage=1&mid=$toid&n=3" -O/dev/null "http://vkontakte.ru/$url"
wget -q --load-cookies "$COOKIEF" --post-data="seed=$TEXT&fpage=1&mid=$toid&n=3" -O/dev/null "http://vk.com/$url"

0 comments on commit 67c93ec

Please sign in to comment.
You can’t perform that action at this time.