This repository has been archived by the owner on Mar 29, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpoke.pl
executable file
·151 lines (135 loc) · 3.61 KB
/
poke.pl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
#!/usr/bin/perl
use strict;
use WWW::Mechanize;
use HTTP::Cookies;
use Term::ReadKey;
# Version: 1.0 Alpha
# Date: 2010-12-06
# Revised: 2011-06-14
# Author: Patrik Greco <sikevux @sikevux.se>
# https://sikevux.se
# License: Kopimi
# Description:
# This script was written to make sure that you will be
# assured a victory in case of a so called poke war at
# Facebook.
# This script violates the Facebook Terms of Service.
# You can, and probably will get banned for using it.
# You have been warned. Enjoy!
#-- Initiate all Vars --#
my ($login, $password, $sec_code, $comp_name, $mech, $pokeback);
#-- End Vars --#
#-- Start of the program --#
print("
__ _
.-.' `; `-._
(_, )
,'o'( Sikevux's )
(__,-' perl )>
( poker )
`-'._.--._.-'
,,,,,,,|||,,|||,,,,,,,
");
#-- end of Sheep --#
#-- Login prompt --#
print "Facebook login: ";
$login = ReadLine(0);
chomp($login);
ReadMode 0;
print "Password: ";
# Don't print the password as we type
ReadMode('noecho');
$password = ReadLine(0);
chomp( $password );
ReadMode 0;
# Working on it.
#-- End login prompt --#
#-- Mechanize start --#
$mech = WWW::Mechanize->new();
# We need to store some tmp cookies
$mech->cookie_jar(HTTP::Cookies->new());
# Grab the login so we can get the login form
$mech->get("https://m.facebook.com/login.php");
# Send the login form to facebutt
$mech->submit_form(
form_number => 1,
fields =>
{
email => $login,
pass => $password
}
);
#-- Auth Done :) --#
#-- 2nd Auth --#
print $mech->content();
print "Security code: ";
$sec_code = ReadLine(0);
chomp($sec_code);
ReadMode 0;
if($mech->content()=~/approvals_code/) {
$mech->submit_form(
form_number => 1,
fields =>
{
approvals_code => $sec_code
}
);
}
#-- 2nd Auth Done --#
#-- Add fakkin puter --#
print "Computer name: ";
$comp_name = ReadLine(0);
chomp($comp_name);
ReadMode 0;
$mech->submit_form(
form_number => 1,
fields =>
{
machine_name => $comp_name
}
);
print $mech->content();
my $plompt = ReadLine(0);
chomp($plompt);
ReadMode 0;
if($plompt != 'y') {
exit();
}
#-- Add puter Done --#
print "\n";
print "######################\n";
print "# We are now Live! #\n";
print "# Take cover! #\n";
print "######################\n";
#-- Poke :) --#
# Get the page!
$mech->get("https://m.facebook.com/home.php");
print $mech->content();
my $ndplompt = ReadLine(0);
chomp($ndplompt);
ReadMode 0;
if($ndplompt != 'y') {
exit();
}
# As long as 1 is 1 everything will be ok
while (1==1) {
# if the page includes "poke" poke ppl!
if ($mech->content()=~/poke/) {
print "starting to poke";
$pokeback = $mech->content();
$pokeback =~ s/\n//g;
$pokeback =~ s/^.*poke=//g;
$pokeback =~ s/\">Poke.*$//g;
$pokeback =~ s/&/&/g;
$mech->get("https://m.facebook.com/a/home.php?poke=$pokeback");
$mech->get("https://m.facebook.com/home.php");
print "one poke!";
}
# if there's no one to poke back, just wait 1 minute.
else {
print "something";
sleep(60);
$mech->get("https://m.facebook.com/home.php");
}
}
#-- Poke done --#