Skip to content

Commit

Permalink
adaptation to pypy7.3.11
Browse files Browse the repository at this point in the history
  • Loading branch information
YarBurArt committed Jul 24, 2024
1 parent a5084bd commit fcb3f33
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions cam_hackers.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Script module, just a console wrapper for the insecam.org handles,
works with vanilla python3, tested with Python 3.11.2 and pypy3
works with vanilla python3, tested with Python 3.11.2
and PyPy 7.3.11 with GCC 12.2.0
github.com/AngelSecurityTeam/Cam-Hackers
github.com/YarBurArt/Cam-API-Enhanced
"""
Expand Down Expand Up @@ -57,11 +58,11 @@ def save_ips_to_file(country_f, ips):
country = input("Code(##) : ")
res = get_data(f"{BYCOUNTRY_URL}{country}")
last_page = re.findall(
r'pagenavigator\("\?page=", (\d+)', res.text)[0]
r'pagenavigator\("\?page=", (\d+)', res)[0]

for page in range(int(last_page)):
res = get_data(f"{BYCOUNTRY_URL}{country}/?page={page}")
find_ip = re.findall(r"http://\d+.\d+.\d+.\d+:\d+", res.text)
find_ip = re.findall(r"http://\d+.\d+.\d+.\d+:\d+", res)

save_ips_to_file(country, find_ip)

Expand All @@ -71,6 +72,10 @@ def save_ips_to_file(country_f, ips):
except UnicodeDecodeError as e:
print(f"Error decoding data: {e}")
sys.exit(1)
except Exception as e:
print(e)
print("\nSomething went wrong and now you have to deal with it, try python -v cam_hackers.py :)\n")
sys.exit(1)

finally:
print("\033[1;37m")
Expand Down

0 comments on commit fcb3f33

Please sign in to comment.