-
Notifications
You must be signed in to change notification settings - Fork 1
/
run.rb
108 lines (94 loc) · 5.17 KB
/
run.rb
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
require 'rubygems'
require 'mechanize'
require 'colorize'
require 'optparse'
require 'highline/import'
options = {}
puts "#{'┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓'.yellow}"
puts "#{'┃'.yellow} #{' RUBY FACEBOOK AUTO-REPORTER'.red}""#{' ┃'.yellow}"
puts "#{'┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫'.yellow}"
puts "#{'┃'.yellow} #{'Created By:'.yellow} #{'A/R'.green}""#{' ┃'.yellow}"
puts "#{'┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫'.yellow}"
puts "#{'┃'.yellow} #{'Github :'.blue} #{'https://github.com/byteofandri'.blue}""#{'┃'.yellow}"
puts "#{'┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛'.yellow}"
puts ''
class Facebook < Mechanize
user_agent_alias = 'Windows Mozilla'
follow_meta_refresh = true
def login(email, pass)
# FREE FACEBOOK MODE
get 'https://free.facebook.com/'
# MOBILE FACEBOOK MODE
#get 'https://www.m.facebook.com/'
form_login = page.form_with(:method => 'POST') do |a|
a.email = email
a.pass = pass
end.submit(form_login)
pp form_login
end
def report_someone(ent)
# FREE FACEBOOK MODE
get "https://free.facebook.com/nfx/basic/question/?context_str={%22initial_action_name%22%3A%22RESOLVE_PROBLEM%22%2C%22breadcrumbs%22%3A[]%2C%22story_location%22%3A%22profile_someone_else%22%2C%22is_from_feed_tombstone%22%3Afalse%2C%22actions_taken%22%3A%22%22%2C%22is_rapid_reporting%22%3Afalse%2C%22reportable_ent_token%22%3A%22#{ent}%22%2C%22is_impostor%22%3A%22%22}&redirect_uri=%2Fprofile.php%3Fid%3D#{ent}" do |a|
# MOBILE FACEBOOK MODE
#get "https://m.facebook.com/nfx/basic/question/?context_str={%22initial_action_name%22%3A%22RESOLVE_PROBLEM%22%2C%22breadcrumbs%22%3A[]%2C%22story_location%22%3A%22profile_someone_else%22%2C%22is_from_feed_tombstone%22%3Afalse%2C%22actions_taken%22%3A%22%22%2C%22is_rapid_reporting%22%3Afalse%2C%22reportable_ent_token%22%3A%22#{ent}%22%2C%22is_impostor%22%3A%22%22}&redirect_uri=%2Fprofile.php%3Fid%3D#{ent}" do |a|
b = page.forms.first do |a|
a['a'] = 'b'
end
c = b.radiobutton_with(:value => /account/).check
d = a.form_with(:method => 'POST') do |a|
puts 'SEGMENT REPORT 1 SUBMITTED'
end.submit(d)
end
e = page.forms.first do |a|
a['a'] = 'b'
end
f = e.radiobutton_with(:value => /fake/).check
g = page.form_with(:method => 'POST') do |a|
puts 'SEGMENT REPORT 2 SUBMITTED'
end.submit(g)
h = page.forms.first do |a|
a['a'] = 'b'
end
i = h.radiobutton_with(:value => /REPORT_CONTENT/).check
j = page.form_with(:method => 'POST') do |a|
puts 'REVIEW TO FACEBOOK'
end.submit(j)
end
end
facebook = Facebook.new
parser = OptionParser.new do |opts|
opts.banner = ' USAGE: ruby report-fb.rb [options]'
opts.on('-l', '-L', '--LOGIN', '--login', 'LOGIN INTO FACEBOOK') do |l|
options[:login] = l
end
opts.on('-p', '-P', '--PERSON', '--person', 'REPORT ACCOUNT') do |p|
options[:person] = p
end
opts.on('-h', '-H', '--HELP', '--help', 'SHOW HELP/USAGE MESSAGE') do
puts opts
puts ''
puts "#{'┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓'.red}"
puts "#{'┃'.red}#{' USAGE: ruby report-fb.rb -l -L --login --LOGIN'.blue} #{' ┃'.red}"
puts "#{'┃'.red}#{'┌────────────────────────────────────┐'.green}""#{' ┃'.red}"
puts "#{'┃'.red}#{'│ Example : ruby report-fb.rb --login│'.green}""#{' ┃'.red}"
puts "#{'┃'.red}#{'└────────────────────────────────────┘'.green}""#{' ┃'.red}"
puts "#{'┃'.red}#{' USAGE: ruby report-fb.rb -p -P --person --PERSON 100040832567374'.blue}#{'┃'.red}"
puts "#{'┃'.red}#{'┌─────────────────────────────────────────────────────────┐'.green}""#{' ┃'.red}"
puts "#{'┃'.red}#{'│ Example : ruby report-fb.rb --person "target_profile_id"│'.green}""#{' ┃'.red}"
puts "#{'┃'.red}#{'└─────────────────────────────────────────────────────────┘'.green}""#{' ┃'.red}"
puts "#{'┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛'.red}"
puts ''
exit
end
end
parser.parse!
if options[:login]
puts ''
puts "#{' LOGIN INTO FACEBOOK'.green}"
usr = ask(" USERNAME: ") { |a| a.echo = true}
pwd = ask(" PASSWORD: ") { |a| a.echo = "*" }
facebook.login(usr, pwd)
end
if options[:person]
facebook.report_someone(ARGV[2])
end