This repository has been archived by the owner on Dec 4, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Program.cs
222 lines (196 loc) · 9.05 KB
/
Program.cs
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
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
using SharpAdbClient;
using SharpAdbClient.DeviceCommands;
using System;
using System.Collections.Generic;
using System.IO;
using System.Threading;
using System.Threading.Tasks;
namespace Snapscore_Booster
{
public class Program
{
public static void Main(string[] args)
{
Console.Title = "Entry's Snapchat Score Booster";
Console.ForegroundColor = ConsoleColor.Red;
Console.WriteLine("This is a free application posted on github https://github.com/DigitalEntry/SnapchatScoreBooster");
Console.WriteLine("For support you can add me on discord Entry#0001");
Console.WriteLine();
AdbServer Server = new AdbServer();
StartServerResult Result;
try
{
Result = Server.StartServer($"{Directory.GetParent(System.Reflection.Assembly.GetEntryAssembly().Location)}\\adb.exe", restartServerIfNewer: false);
Console.WriteLine($"ADB server now running on port {AdbClient.AdbServerPort}");
Console.WriteLine();
}
catch
{
Console.WriteLine($"Failed to start server on {AdbClient.AdbServerPort}");
return;
}
List<DeviceData> Devices = AdbClient.Instance.GetDevices();
DeviceData Device;
if (Devices.Count <= 0)
{
Console.WriteLine("Please connect your android device with USB debugging into your computer.");
while (Devices.Count <= 0)
{
Devices = AdbClient.Instance.GetDevices();
Thread.Sleep(3500);
}
}
if (Devices.Count >= 2)
{
Console.WriteLine("Multiple devices detected. Please pick the mobile device you want to use");
for (int i = 0; i < Devices.Count; i++)
{
Console.ForegroundColor = ConsoleColor.White;
Console.Write($"[{i}] = ");
Console.ForegroundColor = ConsoleColor.Red;
Console.Write($"Model: {Devices[i].Model} Name: {Devices[i].Name} Serial: {Devices[i].Serial}");
Console.WriteLine();
}
int DeviceWanted = int.Parse(Console.ReadLine());
Device = Devices[DeviceWanted];
}
Device = Devices[0];
Console.ForegroundColor = ConsoleColor.White;
Console.Write($"[1] = ");
Console.ForegroundColor = ConsoleColor.Red;
Console.Write($"Use timeouts generated by program");
Console.WriteLine();
Console.ForegroundColor = ConsoleColor.White;
Console.Write($"[2] = ");
Console.ForegroundColor = ConsoleColor.Red;
Console.Write($"Input custom timeouts (If the program is going too fast/slow for your phone model)");
Console.WriteLine();
int TimeoutsOption = int.Parse(Console.ReadLine());
TimeoutsGoBack: if (TimeoutsOption > 2 && TimeoutsOption < 1)
{
Console.WriteLine("Invalid Option. Please input 1 or 2");
goto TimeoutsGoBack;
}
int CameraTimeout = 4000, SnapTimeout = 1500, MultiSnapOkTimeout = 1750, SendTimeout = 3500, RecentSnapTimeout = 3500, SendTimeot = 4000;
if (TimeoutsOption == 2)
{
Console.WriteLine();
Console.WriteLine("Input custom timeouts (Time is in ms)");
Console.WriteLine();
Console.WriteLine("Input CameraTimeout");
CameraTimeout = int.Parse(Console.ReadLine());
Console.WriteLine();
Console.WriteLine("Input SnapTimeout coordinates");
SnapTimeout = int.Parse(Console.ReadLine());
Console.WriteLine();
Console.WriteLine("Input MultiSnapOKTimeout coordinates");
MultiSnapOkTimeout = int.Parse(Console.ReadLine());
Console.WriteLine();
Console.WriteLine("Input SendTimeout coordinates");
SendTimeot = int.Parse(Console.ReadLine());
Console.WriteLine();
Console.WriteLine("Input RecentSnapTimeout coordinates");
RecentSnapTimeout = int.Parse(Console.ReadLine());
Console.WriteLine();
}
Console.ForegroundColor = ConsoleColor.White;
Console.Write($"[1] = ");
Console.ForegroundColor = ConsoleColor.Red;
Console.Write($"Use coordinates generated by program");
Console.WriteLine();
Console.ForegroundColor = ConsoleColor.White;
Console.Write($"[2] = ");
Console.ForegroundColor = ConsoleColor.Red;
Console.Write($"Input custom coordinates (Use if having problems with auto-generated coordinates)");
Console.WriteLine();
int CoordsOption = int.Parse(Console.ReadLine());
CoordsGoBack: if (CoordsOption > 2 && CoordsOption < 1)
{
Console.WriteLine("Invalid Option. Please input 1 or 2");
goto CoordsGoBack;
}
double[] SnapButton = new double[2], MultiSnapOKButton = new double[2], RecentSnapButton = new double[2], SendButton = new double[2], CameraButton = new double[2];
var Receiver = new ConsoleOutputReceiver();
if (CoordsOption == 1)
{
Device.ExecuteShellCommand("wm size", Receiver);
string[] lines = Receiver.ToString().Split(new[] { Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries);
string DeviceSize = lines[1];
DeviceSize = DeviceSize.Replace("Override size: ", string.Empty);
string[] Split = DeviceSize.Split("x");
int Width = int.Parse(Split[0]);
int Height = int.Parse(Split[1]);
CameraButton = new double[] { 539 * (Width / 1080), 2149 * (Height / 2280) };
SnapButton = new double[] { 539 * (Width / 1080), 1828 * (Height / 2280)};
MultiSnapOKButton = new double[] { 550 * (Width / 1080), 1291 * (Height / 2280) };
RecentSnapButton = new double[] { 512 * (Width / 1080), 1744 * (Height / 2280) };
SendButton = new double[] { 988 * (Width / 1080), 2142 * (Height / 2280) };
Console.WriteLine();
Console.WriteLine($"CameraButton coordinates: {CameraButton[0]},{CameraButton[1]}");
Console.WriteLine($"SnapButton coordinates: {SnapButton[0]},{SnapButton[1]}");
Console.WriteLine($"MultiSnapOKButton coordinates: {MultiSnapOKButton[0]},{MultiSnapOKButton[1]}");
Console.WriteLine($"SendButton coordinates: {SendButton[0]},{SendButton[1]}");
Console.WriteLine($"RecentSnapButton coordinates: {RecentSnapButton[0]},{RecentSnapButton[1]}");
}
else
{
Console.WriteLine();
Console.WriteLine("Coordinates format x,y");
Console.WriteLine();
Console.WriteLine("Input CameraButton coordinates");
CameraButton = Array.ConvertAll(Console.ReadLine().Split(","), double.Parse);
Console.WriteLine();
Console.WriteLine("Input SnapButton coordinates");
SnapButton = Array.ConvertAll(Console.ReadLine().Split(","), double.Parse);
Console.WriteLine();
Console.WriteLine("Input MultiSnapOKButton coordinates");
MultiSnapOKButton = Array.ConvertAll(Console.ReadLine().Split(","), double.Parse);
Console.WriteLine();
Console.WriteLine("Input SendButton coordinates");
SendButton = Array.ConvertAll(Console.ReadLine().Split(","), double.Parse);
Console.WriteLine();
Console.WriteLine("Input RecentSnapButton coordinates");
RecentSnapButton = Array.ConvertAll(Console.ReadLine().Split(","), double.Parse);
Console.WriteLine();
}
Console.WriteLine();
Console.WriteLine("How many rounds of snaps do you want to send? (Each round with 200 people will get you 1,600 snapscore)");
int RequestedRounds = int.Parse(Console.ReadLine());
int Rounds = 0;
Console.WriteLine("Make sure you are at the main screen of snap and have people in your last snap. MultiSnap must be enabled for this to work");
Console.WriteLine("Starting Rounds");
Console.Title = $"Entry's Snapchat Score Booster | Rounds 0/{RequestedRounds}";
for (int i = 0; i < RequestedRounds; i++)
{
Thread.Sleep(CameraTimeout);
Device.ExecuteShellCommand($"input tap {CameraButton[0]} {CameraButton[1]}", Receiver);
Thread.Sleep(SnapTimeout);
Device.ExecuteShellCommand($"input tap {SnapButton[0]} {SnapButton[1]}", Receiver);
Thread.Sleep(SnapTimeout);
Device.ExecuteShellCommand($"input tap {SnapButton[0]} {SnapButton[1]}", Receiver);
Thread.Sleep(SnapTimeout);
Device.ExecuteShellCommand($"input tap {SnapButton[0]} {SnapButton[1]}", Receiver);
Thread.Sleep(SnapTimeout);
Device.ExecuteShellCommand($"input tap {SnapButton[0]} {SnapButton[1]}", Receiver);
Thread.Sleep(SnapTimeout);
Device.ExecuteShellCommand($"input tap {SnapButton[0]} {SnapButton[1]}", Receiver);
Thread.Sleep(SnapTimeout);
Device.ExecuteShellCommand($"input tap {SnapButton[0]} {SnapButton[1]}", Receiver);
Thread.Sleep(SnapTimeout);
Device.ExecuteShellCommand($"input tap {SnapButton[0]} {SnapButton[1]}", Receiver);
Thread.Sleep(SnapTimeout);
Device.ExecuteShellCommand($"input tap {SnapButton[0]} {SnapButton[1]}", Receiver);
Thread.Sleep(MultiSnapOkTimeout);
Device.ExecuteShellCommand($"input tap {MultiSnapOKButton[0]} {MultiSnapOKButton[1]}", Receiver);
Thread.Sleep(SendTimeot);
Device.ExecuteShellCommand($"input tap {SendButton[0]} {SendButton[1]}", Receiver);
Thread.Sleep(RecentSnapTimeout);
Device.ExecuteShellCommand($"input tap {RecentSnapButton[0]} {RecentSnapButton[1]}", Receiver);
Thread.Sleep(SendTimeot);
Device.ExecuteShellCommand($"input tap {SendButton[0]} {SendButton[1]}", Receiver);
Rounds++;
Console.Title = $"Entry's Snapchat Score Booster | Rounds {Rounds}/{RequestedRounds}";
}
}
}
}