Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
465 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
Boost Software License - Version 1.0 - August 17th, 2003 | ||
|
||
Permission is hereby granted, free of charge, to any person or organization | ||
obtaining a copy of the software and accompanying documentation covered by | ||
this license (the "Software") to use, reproduce, display, distribute, | ||
execute, and transmit the Software, and to prepare derivative works of the | ||
Software, and to permit third-parties to whom the Software is furnished to | ||
do so, all subject to the following: | ||
|
||
The copyright notices in the Software and this entire statement, including | ||
the above license grant, this restriction and the following disclaimer, | ||
must be included in all copies of the Software, in whole or in part, and | ||
all derivative works of the Software, unless such copies or derivative | ||
works are solely in the form of machine-executable object code generated by | ||
a source language processor. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT | ||
SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE | ||
FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, | ||
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | ||
DEALINGS IN THE SOFTWARE. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
:::::::::::::::::::::::::::::::::::::::::::: | ||
:: Elevate.cmd - Version 4 | ||
:: Automatically check & get admin rights | ||
:: Obtained from: http://stackoverflow.com/questions/7044985 | ||
:: Licensed under: https://creativecommons.org/licenses/by-sa/3.0/ | ||
:::::::::::::::::::::::::::::::::::::::::::: | ||
@echo off | ||
CLS | ||
ECHO. | ||
ECHO ============================= | ||
ECHO Running Admin shell | ||
ECHO ============================= | ||
|
||
:init | ||
setlocal DisableDelayedExpansion | ||
set cmdInvoke=1 | ||
set winSysFolder=System32 | ||
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. | ||
ECHO ************************************** | ||
ECHO Invoking UAC for Privilege Escalation | ||
ECHO ************************************** | ||
|
||
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%" | ||
|
||
if '%cmdInvoke%'=='1' goto InvokeCmd | ||
|
||
ECHO UAC.ShellExecute "!batchPath!", args, "", "runas", 1 >> "%vbsGetPrivileges%" | ||
goto ExecElevation | ||
|
||
:InvokeCmd | ||
ECHO args = "/c """ + "!batchPath!" + """ " + args >> "%vbsGetPrivileges%" | ||
ECHO UAC.ShellExecute "%SystemRoot%\%winSysFolder%\cmd.exe", args, "", "runas", 1 >> "%vbsGetPrivileges%" | ||
|
||
:ExecElevation | ||
"%SystemRoot%\%winSysFolder%\WScript.exe" "%vbsGetPrivileges%" %* | ||
exit /B | ||
|
||
:gotPrivileges | ||
setlocal & cd /d %~dp0 | ||
if '%1'=='ELEV' (del "%vbsGetPrivileges%" 1>nul 2>nul & shift /1) | ||
|
||
:::::::::::::::::::::::::::: | ||
::START | ||
:::::::::::::::::::::::::::: | ||
|
||
setx GPU_FORCE_64BIT_PTR 1 | ||
setx GPU_MAX_HEAP_SIZE 100 | ||
setx GPU_USE_SYNC_OBJECTS 1 | ||
setx GPU_MAX_ALLOC_PERCENT 100 | ||
setx GPU_SINGLE_ALLOC_PERCENT 100 | ||
if exist ..\excavator.exe ( | ||
..\excavator -c ..\default_command_file.json | ||
) else ( | ||
excavator -c default_command_file.json | ||
) | ||
pause |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
@echo off | ||
:: CONFIG STARTS | ||
SET COMMAND_FILE=default_command_file.json | ||
SET CONSOLE_LOG_LEVEL=2 | ||
SET FILE_LOG_LEVEL=6 | ||
SET WEB_PORT=38080 | ||
SET WEB_HOST=127.0.0.1 | ||
SET WEB_LAUNCH_DELAY=5 | ||
SET RESTART_DELAY=10 | ||
:: CONFIG ENDS | ||
|
||
:: AMD SPECIFIC SETTERS (DO NOT MODIFY!) | ||
SET GPU_FORCE_64BIT_PTR=1 | ||
SET GPU_MAX_HEAP_SIZE=100 | ||
SET GPU_USE_SYNC_OBJECTS=1 | ||
SET GPU_MAX_ALLOC_PERCENT=100 | ||
SET GPU_SINGLE_ALLOC_PERCENT=100 | ||
|
||
echo Welcome to NiceHash Excavator | ||
echo Opening website | ||
start cmd /c "@echo off & echo Please, wait %WEB_LAUNCH_DELAY% seconds for Excavator status page to open... & ping 127.0.0.1 -n %WEB_LAUNCH_DELAY% > nul & if "%WEB_HOST%"=="0.0.0.0" (explorer http://127.0.0.1:%WEB_PORT%) else (explorer http://%WEB_HOST%:%WEB_PORT%) & exit" | ||
|
||
:start | ||
echo Starting Excavator... | ||
excavator.exe -c %COMMAND_FILE% -d %CONSOLE_LOG_LEVEL% -f %FILE_LOG_LEVEL% -p 0 -wp %WEB_PORT% -wi %WEB_HOST% | ||
echo Excavator has crashed... restarting in %RESTART_DELAY% seconds... | ||
ping 127.0.0.1 -n %RESTART_DELAY% > nul | ||
goto start |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.