403Webshell

Warning: set_time_limit() has been disabled for security reasons in /home/domains/vol3/223/3261223/user/htdocs/wp-content/plugins/contact-form-7/wp-contact-form-7.php on line 26
Server IP : 77.68.64.20  /  Your IP : 216.73.216.30
Web Server : Apache
System : Linux hp3-wp-1011484.hostingp3.local 3.10.0-1160.139.1.el7.tuxcare.els2.x86_64 #1 SMP Mon Nov 3 13:30:41 UTC 2025 x86_64
User : csh2668037 ( 2112352)
PHP Version : 7.4.33
Disable Function : shell_exec,exec,system,popen,set_time_limit
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /bin/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /bin/extlookup2hiera
#!/usr/bin/ruby

require 'optparse'
require 'csv'

options = {:in => nil, :out => nil, :format => :yaml}

OptionParser.new do |opts|
  opts.banner = "Converter for extlookup CSV files into Hiera JSON and YAML files"

  opts.on("--in FILE", "-i", "Input CSV file") do |v|
    options[:in] = v
  end

  opts.on("--out FILE", "-o", "Output Hiera file") do |v|
    options[:out] = v
  end

  opts.on("--json", "-j", "Create JSON format file") do |v|
    options[:format] = :json
  end
end.parse!

if options[:in].nil? || options[:out].nil?
  STDERR.puts "Please specify an input and output file with --in and --out"
  exit 1
end

unless File.exist?(options[:in])
  STDERR.puts "Cannot find input file #{options[:in]}"
  exit 1
end

csvdata = CSV.read(options[:in])
hieradata = {}

csvdata.each do |d|
  d = d.map{|item| item.to_s}

  if d.size > 2
    hieradata[d[0]] = d[1, d.size].flatten
  else
    hieradata[d[0]] = d[1]
  end
end

case options[:format]
when :yaml
  require 'yaml'
  File.open(options[:out], "w") {|f| f.write hieradata.to_yaml}
when :json
  require 'rubygems'
  require 'json'
  File.open(options[:out], "w") {|f| f.write JSON.pretty_generate hieradata}
end


Youez - 2016 - github.com/yon3zu
LinuXploit