Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
beefproject
GitHub Repository: beefproject/beef
Path: blob/master/modules/host/physical_location_thirdparty/module.rb
1154 views
1
#
2
# Copyright (c) 2006-2025 Wade Alcorn - [email protected]
3
# Browser Exploitation Framework (BeEF) - https://beefproject.com
4
# See the file 'doc/COPYING' for copying permission
5
#
6
class Physical_location_thirdparty < BeEF::Core::Command
7
def self.options
8
[{
9
'name' => 'api_url',
10
'type' => 'combobox',
11
'ui_label' => 'API',
12
'store_type' => 'arraystore',
13
'store_fields' => ['api_url'],
14
'store_data' =>
15
[
16
%w[http://ip-api.com/json],
17
%w[https://ip.nf/me.json],
18
%w[https://ipapi.co/json],
19
%w[https://geoip.tools/v1/json],
20
%w[https://geoip.nekudo.com/api/],
21
%w[https://extreme-ip-lookup.com/json/],
22
%w[http://www.geoplugin.net/json.gp],
23
%w[https://ipinfo.io/json]
24
],
25
'emptyText' => 'Select an API',
26
'valueField' => 'api_url',
27
'displayField' => 'api_url',
28
'mode' => 'local',
29
'forceSelection' => 'false',
30
'autoWidth' => true
31
}]
32
end
33
34
def post_execute
35
save({ 'result' => @datastore['result'] })
36
end
37
end
38
39