MCPcopy Create free account
hub / github.com/Hex1629/BotnetC2 / get_location

Function get_location

BOTNETc2/cnc.py:24–36  ·  view source on GitHub ↗
(ip_addr,GET_DATA)

Source from the content-addressed store, hash-verified

22HINT_PASSWORD = ''
23
24def get_location(ip_addr,GET_DATA):
25 response = requests.get(f'https://ipapi.co/{ip_addr}/json/').json()
26 network = f'#IP DATA\nIP : {ip_addr}\nNETWORK : {response.get("network")}\nVERSION : {response.get("version")}\nORG : {response.get("org")}\nCOUNTRY_TLD : {response.get("country_tld")}'
27 location = f'# LOCATION\nCITY : {response.get("city")}\nREGION : {response.get("region")}\nCOUNTRY_NAME : {response.get("country_name")}\nLATITUDE : {response.get("latitude")}\nLONGITUDE : {response.get("longitude")}'
28 times = f'# TIME\nTIME-ZONE : {response.get("timezone")}\nUTC_OFFSET : {response.get("utc_offset")}'
29 other_data = f'# OTHER DATA\nCALLING_CODE : {response.get("country_calling_code")}\nLANGUAGES : {response.get("languages")}\nCURRENCY_NAME : {response.get("currency_name")}\nCURRENCY : {response.get("currency")}'
30
31 if GET_DATA == "IP_DATA":location_data = network
32 elif GET_DATA == "LOCATION":location_data = location
33 elif GET_DATA == "TIME":location_data = times
34 elif GET_DATA == "OTHER_DATA":location_data = other_data
35 elif GET_DATA == "ALL_DATA":location_data = network+'\n\n'+location+'\n\n'+times+'\n\n'+other_data
36 return location_data
37
38def loadering(client):
39 send(client, f'\33]0;\a', False)

Callers 1

command_lineFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected