Last active
February 4, 2024 12:12
-
-
Save cryptolok/8a023875b47e20bc5e64ba8e27294261 to your computer and use it in GitHub Desktop.
small tool to retreive vk.com (vkontakte) users hidden metadata (state, access, dates, counts, etc) anonymously (without login)
This file contains 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 | |
# small tool to retreive vk.com (vkontakte) users hidden metadata (state, access, dates, counts, etc) anonymously (without login) | |
# sudo apt install curl | |
parse(){ | |
local IFS=\> | |
read -d \< CELL VALUE | |
} | |
URL=$1 | |
if [[ ! "$URL" ]] | |
then | |
echo 'USAGE : vMetaDate.sh vk.com/target_personal_page' | |
exit 1 | |
fi | |
#ID=$(curl -s -A 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:52.0) Gecko/20100101 Firefox/52.0' $URL | grep 'user_id' | cut -d ':' -f 2 | cut -d ',' -f 1) | |
ID=$(curl -s -A 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:52.0) Gecko/20100101 Firefox/52.0' $URL | grep '?id=' | cut -d '=' -f 2 | cut -d '"' -f 1) | |
ID=$(echo $ID) | |
echo -e "\nPERMANENT DATA\n" | |
echo "ID : $ID" | |
DATA=$(curl -s -A 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:52.0) Gecko/20100101 Firefox/52.0' "https://vk.com/foaf.php?id=$ID") | |
while parse | |
do | |
if [[ "$VALUE" != " " && "$VALUE" ]] | |
then | |
CELL=$(echo $CELL | cut -d ':' -f 2) | |
echo "$CELL : $VALUE" | |
fi | |
done <<< $DATA | |
created=$(echo $DATA | grep -o -P 'dc:date=".*"' | cut -d '"' -f 2) | |
lastLoggedIn=$(echo $DATA | grep -o -P 'dc:date=".*"' | cut -d '"' -f 4) | |
modified=$(echo $DATA | grep -o -P 'dc:date=".*"' | cut -d '"' -f 6) | |
echo "created : $created" | |
echo -e "\nVARIABLE DATA\n" | |
echo "lastLoggedIn : $lastLoggedIn" | |
echo "modified : $modified" | |
title=$(echo $DATA | grep -o -P 'dc:title=".*;"' | cut -d '"' -f 2) | |
echo "title : $title" | |
image=$(echo $DATA | grep -o -P 'rdf:about=".*"' | cut -d '"' -f 2) | |
echo "image : $image" | |
locationOfBirth=$(echo $DATA | grep -o -P 'ya:city=".*"' | cut -d '"' -f 2) | |
location=$(echo $DATA | grep -o -P 'ya:city=".*"' | cut -d '"' -f 4) | |
echo "locationOfBirth : $location" | |
echo "location : $location" | |
school=$(echo $DATA | grep -o -P 'ya:school.*/>' | cut -d '"' -f 2) | |
schoolCountry=$(echo $DATA | grep -o -P 'ya:school.*/>' | cut -d '"' -f 6) | |
schoolCity=$(echo $DATA | grep -o -P 'ya:school.*/>' | cut -d '"' -f 8) | |
echo "school : $school" | |
echo "schoolCountry : $schoolCountry" | |
echo "schoolCity : $schoolCity" | |
university=$(echo $DATA | grep -o -P '<ya:university.*/>' | cut -d '"' -f 2) | |
caption=$(echo $DATA | grep -o -P '<ya:university.*/>' | cut -d '"' -f 4) | |
subCaption=$(echo $DATA | grep -o -P '<ya:university.*/>' | cut -d '"' -f 6) | |
grade=$(echo $DATA | grep -o -P '<ya:university.*/>' | cut -d '"' -f 8) | |
graduation=$(echo $DATA | grep -o -P '<ya:university.*/>' | cut -d '"' -f 10) | |
graduationCountry=$(echo $DATA | grep -o -P '<ya:university.*/>' | cut -d '"' -f 14) | |
graduationCity=$(echo $DATA | grep -o -P '<ya:university.*/>' | cut -d '"' -f 16) | |
echo "university : $university" | |
echo "caption : $caption" | |
echo "subCaption : $subCaption" | |
echo "grade : $grade" | |
echo "graduation : $graduation" | |
echo "graduationCountry : $graduationCountry" | |
echo "graduationCity : $graduationCity" | |
work=$(echo $DATA | grep -o -P '<ya:workPlace.*/>' | cut -d '"' -f 2) | |
job=$(echo $DATA | grep -o -P '<ya:workPlace.*/>' | cut -d '"' -f 4) | |
workCountry=$(echo $DATA | grep -o -P '<ya:workPlace.*/>' | cut -d '"' -f 8) | |
workCity=$(echo $DATA | grep -o -P '<ya:workPlace.*/>' | cut -d '"' -f 10) | |
echo "work : $work" | |
echo "job : $job" | |
echo "workCountry : $workCountry" | |
echo "workCity : $workCity" | |
military=$(echo $DATA | grep -o -P '<ya:military.*/>' | cut -d '"' -f 2) | |
militaryCountry=$(echo $DATA | grep -o -P '<ya:military.*/>' | cut -d '"' -f 6) | |
militaryCity=$(echo $DATA | grep -o -P '<ya:military.*/>' | cut -d '"' -f 8) | |
echo "military : $military" | |
echo "militaryCountry : $militaryCountry" | |
echo "militaryCity : $militaryCity" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Моргни два раза если знаешь русский. Кек