@@ -988,8 +988,6 @@ def check_session(self, position):
988
988
self .api = ApiWrapper (config = self .config )
989
989
self .api .set_position (* position )
990
990
self .login ()
991
- #self.api.set_signature_lib(self.get_encryption_lib())
992
- #self.api.set_hash_lib(self.get_hash_lib())
993
991
994
992
def login (self ):
995
993
status = {}
@@ -1115,66 +1113,6 @@ def login(self):
1115
1113
1116
1114
self .heartbeat ()
1117
1115
1118
- def get_encryption_lib (self ):
1119
- if _platform == "Windows" or _platform == "win32" :
1120
- # Check if we are on 32 or 64 bit
1121
- if sys .maxsize > 2 ** 32 :
1122
- file_name = 'encrypt64.dll'
1123
- else :
1124
- file_name = 'encrypt32.dll'
1125
- if _platform .lower () == "darwin" :
1126
- file_name = 'libencrypt-osx-64.so'
1127
- if _platform .lower () == "linux" or _platform .lower () == "linux2" :
1128
- file_name = 'libencrypt-linux-x86-64.so'
1129
- if self .config .encrypt_location == '' :
1130
- path = os .path .abspath (os .path .join (os .path .dirname (__file__ ), os .pardir ))
1131
- else :
1132
- path = self .config .encrypt_location
1133
-
1134
- full_path = ''
1135
- if os .path .isfile (path + '/' + file_name ): # check encrypt_location or local dir first
1136
- full_path = path + '/' + file_name
1137
- elif os .path .isfile (path + '/src/pgoapi/pgoapi/lib/' + file_name ): # if not found, check pgoapi lib folder
1138
- full_path = path + '/src/pgoapi/pgoapi/lib/' + file_name
1139
-
1140
- if full_path == '' :
1141
- self .logger .error (file_name + ' is not found! Please place it in the bots root directory or set encrypt_location in config.' )
1142
- sys .exit (1 )
1143
- else :
1144
- self .logger .info ('Found ' + file_name + '! Platform: ' + _platform + ' ' + file_name + ' directory: ' + full_path )
1145
-
1146
- return full_path
1147
-
1148
- def get_hash_lib (self ):
1149
- if _platform == "Windows" or _platform == "win32" :
1150
- # Check if we are on 32 or 64 bit
1151
- if sys .maxsize > 2 ** 32 :
1152
- file_name = 'niantichash64.dll'
1153
- else :
1154
- file_name = 'niantichash32.dll'
1155
- if _platform .lower () == "darwin" :
1156
- file_name = 'libniantichash-macos-64.dylib'
1157
- if _platform .lower () == "linux" or _platform .lower () == "linux2" :
1158
- file_name = 'libniantichash-linux-x86-64.so'
1159
- if self .config .encrypt_location == '' :
1160
- path = os .path .abspath (os .path .join (os .path .dirname (__file__ ), os .pardir ))
1161
- else :
1162
- path = self .config .encrypt_location
1163
-
1164
- full_path = ''
1165
- if os .path .isfile (path + '/' + file_name ): # check encrypt_location or local dir first
1166
- full_path = path + '/' + file_name
1167
- elif os .path .isfile (path + '/src/pgoapi/pgoapi/lib/' + file_name ): # if not found, check pgoapi lib folder
1168
- full_path = path + '/src/pgoapi/pgoapi/lib/' + file_name
1169
-
1170
- if full_path == '' :
1171
- self .logger .error (file_name + ' is not found! Please place it in the bots root directory or set encrypt_location in config.' )
1172
- sys .exit (1 )
1173
- else :
1174
- self .logger .info ('Found ' + file_name + '! Platform: ' + _platform + ' ' + file_name + ' directory: ' + full_path )
1175
-
1176
- return full_path
1177
-
1178
1116
def _setup_api (self ):
1179
1117
# instantiate pgoapi @var ApiWrapper
1180
1118
self .api = ApiWrapper (config = self .config )
@@ -1185,9 +1123,6 @@ def _setup_api(self):
1185
1123
self .login ()
1186
1124
# chain subrequests (methods) into one RPC call
1187
1125
1188
- #self.api.set_signature_lib(self.get_encryption_lib())
1189
- #self.api.set_hash_lib(self.get_hash_lib())
1190
-
1191
1126
self .logger .info ('' )
1192
1127
# send empty map_cells and then our position
1193
1128
self .update_web_location ()
0 commit comments