Skip to content

Commit

Permalink
Removed unnecessary files. Added .venv to gitignore and changed the p…
Browse files Browse the repository at this point in the history
…rinting of the results.
  • Loading branch information
Eder authored and Eder committed Sep 19, 2024
1 parent ef5eabd commit 86067f3
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 177 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/.vscode
venv/
.venv/

*.pyc
__pycache__
Expand Down
5 changes: 4 additions & 1 deletion autosec/modules/ev_charging_station_discovery.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,10 @@ def run(self, inputs: List[AutosecRessource]) -> List[InternetService]:
iface = interface.get_interface_name() # Get the interface name
services = asyncio.run(self.run_exploit(iface)) # Run the exploit and get services

print(f"\nCharging Station Found: \n")
if services and len(services) > 0:
print(f"\nCharging Station Found: \n")
else:
print(f"\nNo Charging Station Found.\n")

return services # Return the discovered services

Expand Down
172 changes: 0 additions & 172 deletions autosec/modules/evse_attacks/secc_scan.py

This file was deleted.

11 changes: 7 additions & 4 deletions test.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
from autosec.core.ressources.ip import InternetDevice, InternetInterface
from autosec.core.ressources.ip import InternetInterface
from autosec.modules.ev_charging_station_discovery import EVChargingStationFinder

inet_iface = InternetInterface("eth0", ipv4_address="172.27.106.161", subnet_length=20)
# inet_device = InternetDevice(interface=inet_iface, ipv6="fe80::215:5dff:fe9f:e97b")
inet_iface = InternetInterface("eth0", ipv4_address="0.0.0.0", subnet_length=20)

results = EVChargingStationFinder().run([inet_iface])

for result in results:
print(result)
secc_ip = result.get_device().get_ipv6()
tcp_port = result.get_port()
print(f"IP Address of the Charging Station: {secc_ip}")
print(f"\nTCP Port number of the Charging Station: {tcp_port}\n")

0 comments on commit 86067f3

Please sign in to comment.