Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an animated SVG of ronin-recon run in action to the README #150

Open
postmodern opened this issue Jul 25, 2024 · 5 comments
Open

Add an animated SVG of ronin-recon run in action to the README #150

postmodern opened this issue Jul 25, 2024 · 5 comments
Labels
documentation Improvements or additions to documentation

Comments

@postmodern
Copy link
Member

The README needs an animated SVG of ronin-recon run finding things. Use termtosvg with the window_frame theme.

@postmodern postmodern added the documentation Improvements or additions to documentation label Jul 25, 2024
@AI-Mozi AI-Mozi self-assigned this Aug 27, 2024
@AI-Mozi
Copy link
Member

AI-Mozi commented Aug 27, 2024

ronin_recon_run

Something like this? Without error messages ofc 😅

@AI-Mozi
Copy link
Member

AI-Mozi commented Aug 27, 2024

It's kinda long tho..

@postmodern
Copy link
Member Author

Here's the Ruby script I used (called autoshell) to simulate typing in the terminal which is then recorded by termtosvg.

#!/usr/bin/env ruby

def write_line(line, delay: 0.05, jitter: 0.0..0.06)
  line.each_char do |c|
    $stdout.putc(c)

    sleep(delay + rand(jitter))
  end
end

def type_command(command, pause: 0.5)
  # print the prompt
  print "$ "

  write_line(line, **kwargs)

  # pause before executing the command
  sleep(pause)

  puts
end

def run_command(command, **kwargs)
  type_command(command,**kwargs)

  begin
    # execute the command
    system(command)
  rescue Interrupt
    puts
  end
end

ARGF.each_line(chomp: true) do |line|
  run_command(line)
end

and here's the shell script I used to auto-type a command, run it, and record it.

#!/usr/bin/env bash

utils_dir="${BASH_SOURCE%/*}"

theme="window_frame"

function print_usage()
{
	cat <<USAGE
usage: $0 [OPTIONS] TXT_FILE [SVG_FILE]

Options:
	--javascript		Create an animated SVG with JavaScript controls
	--noscript		Create an animated SVG without JavaScript
	-h, --help		Prints this message

USAGE
}

function parse_options()
{
	local argv=()

	while [[ $# -gt 0 ]]; do
		case "$1" in
			--javascript)
				theme="window_frame_js"
				shift
				;;
			--noscript)
				theme="window_frame"
				shift
				;;
			-h|--help)
				print_usage
				exit
				;;
			-*)
				echo "$0: unrecognized option $1" >&2
				return 1
				;;
			*)
				argv+=($1)
				shift
				;;
		esac
	done

	case "${#argv[@]}" in
		1)
			input="${argv[0]}"
			output="${input%.txt}.svg"
			;;
		2)
			input="${argv[0]}"
			output="${argv[1]}"
			;;
		0)
			echo "$0: too few arguments given" >&2
			return 1
			;;
		*)
			echo "$0: too many arguments given" >&2
			return 1
			;;
	esac
}

parse_options "$@" || exit $?

termtosvg "$output" -t "$theme" -c "$utils_dir/autoshell $input"

Both scripts are designed to live in a utils/ directory. Might also want to run it on a faster internet connection or something without a firewall/NAT which can slow down nmap.

@AI-Mozi
Copy link
Member

AI-Mozi commented Aug 28, 2024

I have a 300Mbps download, so I thought it's enough..

@AI-Mozi AI-Mozi removed their assignment Aug 29, 2024
@postmodern
Copy link
Member Author

@AI-Mozi also maybe try changing your system DNS to 1.1.1.1 or 8.8.8.8. The DNS workers should be finding sub-domains much faster while nmap continuous to port scan.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
Status: No status
Development

No branches or pull requests

2 participants