Skip to content

Commit

Permalink
Merge pull request #6138 from Xairooo/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
MerlionRock authored Jul 26, 2017
2 parents e1401d8 + fd04e7e commit 69a906e
Show file tree
Hide file tree
Showing 8 changed files with 115 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"Threads": 2,
"HashKeyFile": "hashkey.txt",
"HashKeyFile": "MultiBotConfigHashkey.txt",
"UseProxy": false,
"ProxyFile": "proxy.txt",
"AccountsFile": "accounts.txt",
"ProxyFile": "MultiBotConfigProxy.txt",
"AccountsFile": "MultiBotConfigAccounts.txt",
"AuthJsonFile": "auth.json",
"ConfigJsonFile": "config.json",
"CompleteTutorialNickName": true,
Expand All @@ -12,4 +12,4 @@
"Port": "4000"
},
"walker_limit_output": true
}
}
File renamed without changes.
2 changes: 2 additions & 0 deletions configs/MultiBotConfigHashkey.txt.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
1I2F1L5B3D7F3K5G3Z2N
7V5J1K2H6S1F8I4V3V5Z
2 changes: 2 additions & 0 deletions configs/MultiBotConfigProxy.txt.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
127.0.0.1:1080
127.0.0.1:1080
2 changes: 0 additions & 2 deletions configs/hashkey.txt

This file was deleted.

2 changes: 0 additions & 2 deletions configs/proxy.txt

This file was deleted.

35 changes: 35 additions & 0 deletions runMultiBot.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#!/usr/bin/env bash
pokebotpath=$(cd "$(dirname "$0")"; pwd)
cd $pokebotpath
source bin/activate 2> /dev/null
if [[ $? -eq 1 ]];
then
echo "Virtualenv does not exits"
echo "Run: ./setup.sh -i"
exit 1
fi
git fetch -a
installed=(`pip list 2>/dev/null |sed -e 's/ //g' -e 's/(/:/' -e 's/)//' -e 's/[-_]//g' | awk '{print tolower($0)}'`)
required=(`cat requirements.txt | sed -e 's/.*pgoapi$/pgoapi==1.2.0/' -e 's/[-_]//g' -e 's/==\(.*\)/:\1/' | awk '{print tolower($0)}'`)
for package in ${required[@]}
do
if [[ ! (${installed[*]} =~ $package) ]];
then
echo "Some of the required packages are not found / have different version."
echo "Run: ./setup.sh -u"
exit 1
fi
done
if [ "1" == $(git branch -vv |grep -c "* dev") ] && [ $(git log --pretty=format:"%h" -1) != $(git log --pretty=format:"%h" -1 origin/dev) ] ||
[ "1" == $(git branch -vv |grep -c "* master") ] && [ $(git log --pretty=format:"%h" -1) != $(git log --pretty=format:"%h" -1 origin/master) ]
then
read -p "Branch has an update. Run ./setup.sh -u to update? y/n
" do_setup
if [[ $do_setup = "y" || $do_setup = "Y" ]];
then
./setup.sh -u
fi
fi
python MultiBot.py
done
exit 0
72 changes: 72 additions & 0 deletions windows_bat/PokemonGo-Bot-MultiBot-Start.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
TITLE PokemonGo-Bot
CLS
@ECHO OFF



:init
setlocal DisableDelayedExpansion
path c:\Program Files\Git\cmd;%PATH%
path C:\Python27;%PATH%
path C:\Python27\Scripts;%PATH%
set "batchPath=%~0"
for %%k in (%0) do set batchName=%%~nk
set "vbsGetPrivileges=%temp%\OEgetPriv_%batchName%.vbs"
setlocal EnableDelayedExpansion



:checkPrivileges
NET FILE 1>NUL 2>NUL
if '%errorlevel%' == '0' ( goto gotPrivileges ) else ( goto getPrivileges )



:getPrivileges
if '%1'=='ELEV' (echo ELEV & shift /1 & goto gotPrivileges)
@ECHO Set UAC = CreateObject^("Shell.Application"^) > "%vbsGetPrivileges%"
@ECHO args = "ELEV " >> "%vbsGetPrivileges%"
@ECHO For Each strArg in WScript.Arguments >> "%vbsGetPrivileges%"
@ECHO args = args ^& strArg ^& " " >> "%vbsGetPrivileges%"
@ECHO Next >> "%vbsGetPrivileges%"
@ECHO UAC.ShellExecute "!batchPath!", args, "", "runas", 1 >> "%vbsGetPrivileges%"
"%SystemRoot%\System32\WScript.exe" "%vbsGetPrivileges%" %*
exit /B



:gotPrivileges
setlocal & pushd .
cd /d %~dp0
if '%1'=='ELEV' (del "%vbsGetPrivileges%" 1>nul 2>nul & shift /1)



:startBot
REM CLS
REM ECHO.
REM ECHO.
REM ECHO --------------------Initializing web server--------------------
REM ECHO.
REM ECHO.
REM set BatchPath="%~dp0"
REM start cmd.exe /k "CD %BatchPath%&CD..&CD web&python -m SimpleHTTPServer"
REM ECHO.
REM ECHO.
CLS
ECHO --------------------Starting bot--------------------
ECHO.
ECHO.



:loop
TITLE=PokemonGo-Bot
CD %BatchPath%
CD ..
python MultiBot.py
if errorlevel 1 goto restart
if errorlevel 0 goto eof

:eof
exit

0 comments on commit 69a906e

Please sign in to comment.