You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

60 lines
2.1 KiB

from ispoof.objects.player import Player
from ispoof.spoofer.scraper import Scraper
from ispoof.spoofer.device import Device
2 years ago
from pymobiledevice3.exceptions import AlreadyMountedError
from sqlalchemy import create_engine
from ispoof.lists.pokemonlist import PokemonList
from ispoof.data import initialize_database
from sqlalchemy.orm import Session
2 years ago
import traceback
if __name__ == "__main__":
device = Device()
image_path = "DeveloperDiskImage.dmg"
signature_path = "DeveloperDiskImage.dmg.signature"
try:
device.mount_image(image_path, signature_path)
except Exception as e:
# traceback.print_exc()
2 years ago
print("Already mounted. Continuing.")
player = Player()
query = input("Enter your location: ")
player.set_location_with_query(query)
print(str(player.location))
2 years ago
scraper = Scraper()
engine = create_engine("sqlite:///data.db")
initialize_database(engine=engine)
pokemon_lst = PokemonList(engine=engine)
2 years ago
while True:
2 years ago
pokemons = scraper.get_hundos()
pokemon_lst.insert_to_database(pokemons)
2 years ago
print("Spoof to")
print("Pokemon List:")
pokemons = pokemon_lst.sort_by_name()
for i, pokemon in enumerate(pokemons):
print(i, pokemon)
i = int(input("Choose pokemon: "))
pokemon = pokemons[i]
location = pokemon.location
print(pokemon)
2 years ago
device.spoof_gps(location)
did_activity = None
print(pokemon)
2 years ago
while True:
activity = input("Did you do any cooldown activities? [Y/N] ").lower()
if activity in ("y", "n"):
did_activity = activity == "y"
break
player.set_location(location, did_activity)
print(f"Current cooldown: {player.current_cooldown} min")
while True:
continue_prompt = input("Continue? [Y/N] ").lower()
if continue_prompt in ("y", "n"):
if continue_prompt == "n":
device.stop_spoofing()
exit(0)
else:
break