Skip to content
This repository was archived by the owner on Jul 30, 2020. It is now read-only.

Commit f2d9229

Browse files
FurtifLord-Haji
authored andcommitted
New api
* Update module ferox for new heads * move logic submodule to folder * move logic submodule to folder pt2 * base submodule feroxrev * update, common requests have changed: - checkChallenge is not more - downloadSettings is always there now * release RB * new api support * set versionint * base modules
1 parent cd64841 commit f2d9229

File tree

384 files changed

+45489
-31
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

384 files changed

+45489
-31
lines changed

.gitmodules

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,6 @@
22
path = FeroxRev
33
url = https://github.com/Necrobot-Private/PokemonGo.RocketAPI.git
44
branch = master
5-
[submodule "PoGo.NecroBot.Logic"]
6-
path = PoGo.NecroBot.Logic
7-
url = https://github.com/Necrobot-Private/PoGo.NecroBot.Logic.git
8-
branch = master
95
[submodule "PokeEase"]
106
path = PokeEase
117
url = https://github.com/Necrobot-Private/PokeEase.git

KillSwitch.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
BotStatus=ENABLED;
22
//============================================//
3-
POKEMON GO 0.83.2
3+
POKEMON GO 0.85.1
44
//============================================//
55

6-
Necrobot is now compatible with 0.83.2 API.
6+
Necrobot is now compatible with 0.85.1 API.
77

88
//============================================//
9-
Updated: 10/29/2017
9+
Updated: 12/08/2017
1010

1111

1212
For support/questions:

PoGo.NecroBot.CLI/PoGo.NecroBot.CLI.csproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,8 @@
123123
<HintPath>$(SolutionDir)\packages\Costura.Fody.1.6.2\lib\dotnet\Costura.dll</HintPath>
124124
<Private>False</Private>
125125
</Reference>
126-
<Reference Include="Google.Protobuf, Version=3.4.1.0, Culture=neutral, PublicKeyToken=a7d26565bac4d604, processorArchitecture=MSIL">
127-
<HintPath>$(SolutionDir)\packages\Google.Protobuf.3.4.1\lib\net45\Google.Protobuf.dll</HintPath>
126+
<Reference Include="Google.Protobuf, Version=3.5.0.0, Culture=neutral, PublicKeyToken=a7d26565bac4d604, processorArchitecture=MSIL">
127+
<HintPath>$(SolutionDir)\packages\Google.Protobuf.3.5.0\lib\net45\Google.Protobuf.dll</HintPath>
128128
</Reference>
129129
<Reference Include="log4net, Version=2.0.8.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
130130
<HintPath>$(SolutionDir)\packages\log4net.2.0.8\lib\net45-full\log4net.dll</HintPath>
@@ -159,8 +159,8 @@
159159
<Reference Include="Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
160160
<HintPath>$(SolutionDir)\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
161161
</Reference>
162-
<Reference Include="POGOProtos.Core, Version=2.19.1.0, Culture=neutral, processorArchitecture=MSIL">
163-
<HintPath>$(SolutionDir)\packages\POGOProtos.Core.2.19.1\lib\net45\POGOProtos.Core.dll</HintPath>
162+
<Reference Include="POGOProtos.Core, Version=2.20.0.0, Culture=neutral, processorArchitecture=MSIL">
163+
<HintPath>$(SolutionDir)\packages\POGOProtos.Core.2.20.0\lib\net45\POGOProtos.Core.dll</HintPath>
164164
</Reference>
165165
<Reference Include="Remotion.Linq, Version=2.1.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b, processorArchitecture=MSIL">
166166
<HintPath>$(SolutionDir)\packages\Remotion.Linq.2.1.2\lib\net45\Remotion.Linq.dll</HintPath>

PoGo.NecroBot.CLI/packages.config

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<package id="CommandLineParser" version="1.9.71" targetFramework="net462" />
55
<package id="Costura.Fody" version="1.6.2" targetFramework="net462" developmentDependency="true" />
66
<package id="Fody" version="2.2.1.0" targetFramework="net462" developmentDependency="true" />
7-
<package id="Google.Protobuf" version="3.4.1" targetFramework="net462" />
7+
<package id="Google.Protobuf" version="3.5.0" targetFramework="net462" />
88
<package id="log4net" version="2.0.8" targetFramework="net462" />
99
<package id="Microsoft.EntityFrameworkCore" version="1.1.2" targetFramework="net462" />
1010
<package id="Microsoft.Extensions.Caching.Abstractions" version="1.1.2" targetFramework="net462" />
@@ -19,7 +19,7 @@
1919
<package id="Microsoft.Win32.Primitives" version="4.3.0" targetFramework="net462" />
2020
<package id="NETStandard.Library" version="1.6.1" targetFramework="net462" />
2121
<package id="Newtonsoft.Json" version="10.0.3" targetFramework="net462" />
22-
<package id="POGOProtos.Core" version="2.19.1" targetFramework="net462" />
22+
<package id="POGOProtos.Core" version="2.20.0" targetFramework="net462" />
2323
<package id="Remotion.Linq" version="2.1.2" targetFramework="net462" />
2424
<package id="Selenium.Support" version="3.7.0" targetFramework="net462" />
2525
<package id="Selenium.WebDriver" version="3.7.0" targetFramework="net462" />

PoGo.NecroBot.Logic

Lines changed: 0 additions & 1 deletion
This file was deleted.

PoGo.NecroBot.Logic/Caching.cs

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
using PoGo.NecroBot.Logic.State;
2+
using System;
3+
using System.Runtime.Caching;
4+
using TinyIoC;
5+
6+
namespace PoGo.NecroBot.Logic
7+
{
8+
public class Caching
9+
{
10+
private const int CACH_DURATION = 15; //minutes
11+
private static MemoryCache encounteredPokemons = new MemoryCache("encounteredPokemons");
12+
13+
public static void AddEncounteredPokemon(ulong encounterId)
14+
{
15+
ISession session = TinyIoCContainer.Current.Resolve<ISession>();
16+
string uniqueKey = $"{session.Settings.Username}-{encounterId}";
17+
encounteredPokemons.Add(uniqueKey, encounterId, DateTime.Now.AddMinutes(CACH_DURATION));
18+
19+
}
20+
}
21+
}
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
using PoGo.NecroBot.Logic.Logging;
2+
using System.Threading.Tasks;
3+
4+
namespace PoGo.NecroBot.Logic.Captcha.Anti_Captcha
5+
{
6+
public class AntiCaptchaClient
7+
{
8+
9+
private const string Host = "api.anti-captcha.com";
10+
//private string ClientKey = "xxxxxxx";
11+
private const string ProxyHost = "xx.xx.xx.xx";
12+
private const int ProxyPort = 8282;
13+
private const string ProxyLogin = "";
14+
private const string ProxyPassword = "";
15+
16+
private const string UserAgent =
17+
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.106 Safari/537.36"
18+
;
19+
20+
21+
public static async Task<string> SolveCaptcha(string captchaURL, string apiKey, string googleSiteKey,
22+
string proxyHost, int proxyPort, string proxyAccount = "", string proxyPassword = "")
23+
{
24+
var task1 = AnticaptchaApiWrapper.CreateNoCaptchaTaskProxyless(
25+
Host,
26+
apiKey,
27+
captchaURL, //target website address
28+
googleSiteKey,
29+
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.106 Safari/537.36"
30+
);
31+
32+
return await ProcessTask(task1, apiKey).ConfigureAwait(false);
33+
}
34+
35+
private static async Task<string> ProcessTask(AnticaptchaTask task, string apikey)
36+
{
37+
AnticaptchaResult response;
38+
39+
do
40+
{
41+
response = AnticaptchaApiWrapper.GetTaskResult(Host, apikey, task);
42+
43+
if (response.GetStatus().Equals(AnticaptchaResult.Status.ready))
44+
{
45+
break;
46+
}
47+
48+
await Task.Delay(3000).ConfigureAwait(false);
49+
} while (response != null && response.GetStatus().Equals(AnticaptchaResult.Status.processing));
50+
51+
if (response == null || response.GetSolution() == null)
52+
{
53+
Logger.Write("Unknown error occurred...", LogLevel.Error);
54+
//Console.WriteLine("Response dump:");
55+
//Console.WriteLine(response);
56+
}
57+
else
58+
{
59+
//Console.WriteLine("The answer is '" + response.GetSolution() + "'");
60+
}
61+
62+
return response.GetSolution();
63+
}
64+
}
65+
}

0 commit comments

Comments
 (0)