# 2 :30021 ftp

```
# successful logging in; but ftp hangs when dir
200 Port command successful
150 Opening data channel for directory list.
<stuck>

# using curl / browser to explore more

$ curl ftp://192.168.154.127:30021
-r--r--r-- 1 ftp ftp            536 Nov 03  2020 .gitignore
drwxr-xr-x 1 ftp ftp              0 Nov 03  2020 app
drwxr-xr-x 1 ftp ftp              0 Nov 03  2020 bin
drwxr-xr-x 1 ftp ftp              0 Nov 03  2020 config
-r--r--r-- 1 ftp ftp            130 Nov 03  2020 config.ru
drwxr-xr-x 1 ftp ftp              0 Nov 03  2020 db
-r--r--r-- 1 ftp ftp           1750 Nov 03  2020 Gemfile
drwxr-xr-x 1 ftp ftp              0 Nov 03  2020 lib
drwxr-xr-x 1 ftp ftp              0 Nov 03  2020 log
-r--r--r-- 1 ftp ftp             66 Nov 03  2020 package.json
drwxr-xr-x 1 ftp ftp              0 Nov 03  2020 public
-r--r--r-- 1 ftp ftp            227 Nov 03  2020 Rakefile
-r--r--r-- 1 ftp ftp            374 Nov 03  2020 README.md
drwxr-xr-x 1 ftp ftp              0 Nov 03  2020 test
drwxr-xr-x 1 ftp ftp              0 Nov 03  2020 tmp
drwxr-xr-x 1 ftp ftp              0 Nov 03  2020 vendor

# cannot upload file
# $ curl -T kashz.txt ftp://192.168.154.127:30021/
# curl: (25) Failed FTP upload: 550

$ curl ftp://192.168.154.127:30021/README.md
# README
This README would normally document whatever steps are necessary to get the
application up and running.
Things you may want to cover:
* Ruby version
* System dependencies
* Configuration
* Database creation
* Database initialization
* How to run the test suite
* Services (job queues, cache servers, search engines, etc.)
* Deployment instructions
* ...

# seems like a directory strucutre for a ruby project - contains GemFiles, folders and other .rb files
# /config looks interesting

$ curl ftp://192.168.154.127:30021/config/
-r--r--r-- 1 ftp ftp            595 Nov 03  2020 application.rb
-r--r--r-- 1 ftp ftp            128 Nov 03  2020 boot.rb
-r--r--r-- 1 ftp ftp            154 Nov 03  2020 cable.yml
-r--r--r-- 1 ftp ftp            594 Nov 03  2020 database.yml
-r--r--r-- 1 ftp ftp            128 Nov 03  2020 environment.rb
drwxr-xr-x 1 ftp ftp              0 Nov 03  2020 environments
drwxr-xr-x 1 ftp ftp              0 Nov 03  2020 initializers
drwxr-xr-x 1 ftp ftp              0 Nov 03  2020 locales
-r--r--r-- 1 ftp ftp           2306 Nov 03  2020 puma.rb
-r--r--r-- 1 ftp ftp            139 Nov 03  2020 routes.rb
-r--r--r-- 1 ftp ftp           1277 Nov 03  2020 secrets.yml

$ curl ftp://192.168.154.127:30021/config/secrets.yml
# Be sure to restart your server when you modify this file.
# Your secret key is used for verifying the integrity of signed cookies.
# If you change this key, all old signed cookies will become invalid!
# You can use `rails secret` to generate a secure secret key.
development:
  secret_key_base: 36c569c923cac0e10cddd6588b468d09e82eb8a3a25cee7274f1a6680fb0cb19f6c1a64cad5c57923aa4b89675315c9202a5ff8db67f84a150668d6949cc0846
test:
  secret_key_base: be9463a08fe11dd60d1ff4bd361392f994f5365445b6685b86ac65fa08d1a2c8772068af773f31b758475849117a231dc51ac60f3a937539ceff9dc3a3668c48
  
$ curl ftp://192.168.154.127:30021/Gemfile
gem 'rails', '~> 5.1.3'
# Use sqlite3 as the database for Active Record
gem 'sqlite3'
# Use Puma as the app server
gem 'puma', '~> 3.7'

```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://kashz.gitbook.io/proving-grounds-writeups/pg-boxes/medjed/2-30021-ftp.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
