From fce58501d42824545e607ab577c4510e19abbbdf Mon Sep 17 00:00:00 2001 From: Chris Talib Date: Sun, 4 Nov 2018 22:14:49 +0100 Subject: [PATCH] first --- convert.sh | 11 +++++++++++ crawdl.rb | 25 +++++++++++++++++++++++++ dl_images.rb | 12 ++++++++++++ livehosts.sh | 4 ++++ 4 files changed, 52 insertions(+) create mode 100644 convert.sh create mode 100644 crawdl.rb create mode 100644 dl_images.rb create mode 100755 livehosts.sh diff --git a/convert.sh b/convert.sh new file mode 100644 index 0000000..da3a00a --- /dev/null +++ b/convert.sh @@ -0,0 +1,11 @@ +#/bin/bash + +for file in *; + do + base=${file%.*} + if [ ! -f $base.csv ]; then + echo '[!] Doesnt exists... Creating!' + soffice --headless --convert-to csv $base.xlsx; + fi + done + echo '[*] Done!' diff --git a/crawdl.rb b/crawdl.rb new file mode 100644 index 0000000..4a97813 --- /dev/null +++ b/crawdl.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true + +require 'socket' +require 'OpenURI' + +puts 'What host?' +host = gets.chomp +host.to_s + +puts 'What port?' +port = gets.chomp +port.to_i + +puts 'Path?' +path = gets.chomp +path.to_s + +open(host) do |f| + f.each_line { |line| p line } + p f.base_uri + p f.content_type + p f.charset + p f.content_encoding + p f.last_modified +end diff --git a/dl_images.rb b/dl_images.rb new file mode 100644 index 0000000..d596ec7 --- /dev/null +++ b/dl_images.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +require 'nokogiri' +require 'open-uri' + +puts 'what to crawl' +url = gets.chomp + +url = url.open +result = URI.extract(url).select { |a| a[/\.(?:gif|png|jpg|jpeg)\b/] } + +cmd "wget #{result}" diff --git a/livehosts.sh b/livehosts.sh new file mode 100755 index 0000000..673177b --- /dev/null +++ b/livehosts.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +nmap $1 -n -sP | grep report | awk '{print $5}' +