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

Commit

Permalink
New api
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
Furtif authored and Lord-Haji committed Dec 13, 2017
1 parent cd64841 commit f2d9229
Show file tree
Hide file tree
Showing 384 changed files with 45,489 additions and 31 deletions.
4 changes: 0 additions & 4 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@
path = FeroxRev
url = https://github.com/Necrobot-Private/PokemonGo.RocketAPI.git
branch = master
[submodule "PoGo.NecroBot.Logic"]
path = PoGo.NecroBot.Logic
url = https://github.com/Necrobot-Private/PoGo.NecroBot.Logic.git
branch = master
[submodule "PokeEase"]
path = PokeEase
url = https://github.com/Necrobot-Private/PokeEase.git
Expand Down
2 changes: 1 addition & 1 deletion FeroxRev
6 changes: 3 additions & 3 deletions KillSwitch.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
BotStatus=ENABLED;
//============================================//
POKEMON GO 0.83.2
POKEMON GO 0.85.1
//============================================//

Necrobot is now compatible with 0.83.2 API.
Necrobot is now compatible with 0.85.1 API.

//============================================//
Updated: 10/29/2017
Updated: 12/08/2017


For support/questions:
Expand Down
8 changes: 4 additions & 4 deletions PoGo.NecroBot.CLI/PoGo.NecroBot.CLI.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,8 @@
<HintPath>$(SolutionDir)\packages\Costura.Fody.1.6.2\lib\dotnet\Costura.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Google.Protobuf, Version=3.4.1.0, Culture=neutral, PublicKeyToken=a7d26565bac4d604, processorArchitecture=MSIL">
<HintPath>$(SolutionDir)\packages\Google.Protobuf.3.4.1\lib\net45\Google.Protobuf.dll</HintPath>
<Reference Include="Google.Protobuf, Version=3.5.0.0, Culture=neutral, PublicKeyToken=a7d26565bac4d604, processorArchitecture=MSIL">
<HintPath>$(SolutionDir)\packages\Google.Protobuf.3.5.0\lib\net45\Google.Protobuf.dll</HintPath>
</Reference>
<Reference Include="log4net, Version=2.0.8.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
<HintPath>$(SolutionDir)\packages\log4net.2.0.8\lib\net45-full\log4net.dll</HintPath>
Expand Down Expand Up @@ -159,8 +159,8 @@
<Reference Include="Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>$(SolutionDir)\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="POGOProtos.Core, Version=2.19.1.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>$(SolutionDir)\packages\POGOProtos.Core.2.19.1\lib\net45\POGOProtos.Core.dll</HintPath>
<Reference Include="POGOProtos.Core, Version=2.20.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>$(SolutionDir)\packages\POGOProtos.Core.2.20.0\lib\net45\POGOProtos.Core.dll</HintPath>
</Reference>
<Reference Include="Remotion.Linq, Version=2.1.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b, processorArchitecture=MSIL">
<HintPath>$(SolutionDir)\packages\Remotion.Linq.2.1.2\lib\net45\Remotion.Linq.dll</HintPath>
Expand Down
4 changes: 2 additions & 2 deletions PoGo.NecroBot.CLI/packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<package id="CommandLineParser" version="1.9.71" targetFramework="net462" />
<package id="Costura.Fody" version="1.6.2" targetFramework="net462" developmentDependency="true" />
<package id="Fody" version="2.2.1.0" targetFramework="net462" developmentDependency="true" />
<package id="Google.Protobuf" version="3.4.1" targetFramework="net462" />
<package id="Google.Protobuf" version="3.5.0" targetFramework="net462" />
<package id="log4net" version="2.0.8" targetFramework="net462" />
<package id="Microsoft.EntityFrameworkCore" version="1.1.2" targetFramework="net462" />
<package id="Microsoft.Extensions.Caching.Abstractions" version="1.1.2" targetFramework="net462" />
Expand All @@ -19,7 +19,7 @@
<package id="Microsoft.Win32.Primitives" version="4.3.0" targetFramework="net462" />
<package id="NETStandard.Library" version="1.6.1" targetFramework="net462" />
<package id="Newtonsoft.Json" version="10.0.3" targetFramework="net462" />
<package id="POGOProtos.Core" version="2.19.1" targetFramework="net462" />
<package id="POGOProtos.Core" version="2.20.0" targetFramework="net462" />
<package id="Remotion.Linq" version="2.1.2" targetFramework="net462" />
<package id="Selenium.Support" version="3.7.0" targetFramework="net462" />
<package id="Selenium.WebDriver" version="3.7.0" targetFramework="net462" />
Expand Down
1 change: 0 additions & 1 deletion PoGo.NecroBot.Logic
Submodule PoGo.NecroBot.Logic deleted from 5326e9
21 changes: 21 additions & 0 deletions PoGo.NecroBot.Logic/Caching.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
using PoGo.NecroBot.Logic.State;
using System;
using System.Runtime.Caching;
using TinyIoC;

namespace PoGo.NecroBot.Logic
{
public class Caching
{
private const int CACH_DURATION = 15; //minutes
private static MemoryCache encounteredPokemons = new MemoryCache("encounteredPokemons");

public static void AddEncounteredPokemon(ulong encounterId)
{
ISession session = TinyIoCContainer.Current.Resolve<ISession>();
string uniqueKey = $"{session.Settings.Username}-{encounterId}";
encounteredPokemons.Add(uniqueKey, encounterId, DateTime.Now.AddMinutes(CACH_DURATION));

}
}
}
65 changes: 65 additions & 0 deletions PoGo.NecroBot.Logic/Captcha/Anti-Captcha/AntiCaptchaClient.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
using PoGo.NecroBot.Logic.Logging;
using System.Threading.Tasks;

namespace PoGo.NecroBot.Logic.Captcha.Anti_Captcha
{
public class AntiCaptchaClient
{

private const string Host = "api.anti-captcha.com";
//private string ClientKey = "xxxxxxx";
private const string ProxyHost = "xx.xx.xx.xx";
private const int ProxyPort = 8282;
private const string ProxyLogin = "";
private const string ProxyPassword = "";

private const string UserAgent =
"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"
;


public static async Task<string> SolveCaptcha(string captchaURL, string apiKey, string googleSiteKey,
string proxyHost, int proxyPort, string proxyAccount = "", string proxyPassword = "")
{
var task1 = AnticaptchaApiWrapper.CreateNoCaptchaTaskProxyless(
Host,
apiKey,
captchaURL, //target website address
googleSiteKey,
"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"
);

return await ProcessTask(task1, apiKey).ConfigureAwait(false);
}

private static async Task<string> ProcessTask(AnticaptchaTask task, string apikey)
{
AnticaptchaResult response;

do
{
response = AnticaptchaApiWrapper.GetTaskResult(Host, apikey, task);

if (response.GetStatus().Equals(AnticaptchaResult.Status.ready))
{
break;
}

await Task.Delay(3000).ConfigureAwait(false);
} while (response != null && response.GetStatus().Equals(AnticaptchaResult.Status.processing));

if (response == null || response.GetSolution() == null)
{
Logger.Write("Unknown error occurred...", LogLevel.Error);
//Console.WriteLine("Response dump:");
//Console.WriteLine(response);
}
else
{
//Console.WriteLine("The answer is '" + response.GetSolution() + "'");
}

return response.GetSolution();
}
}
}
Loading

0 comments on commit f2d9229

Please sign in to comment.