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

mirror -c -P 32 wp-* wildcard usage? #714

Open
0x42h opened this issue Oct 5, 2023 · 5 comments
Open

mirror -c -P 32 wp-* wildcard usage? #714

0x42h opened this issue Oct 5, 2023 · 5 comments

Comments

@0x42h
Copy link

0x42h commented Oct 5, 2023

Is it just me, or should this expectation be pretty straightforward?

> ls -lah wp-*
-rw-r--r--   1 <username> <group>     7.0k Oct  2 22:05 wp-activate.php
drwxr-xr-x   9 <username> <group>     8.0k Oct  2 22:04 wp-admin
-rw-r--r--   1 <username> <group>      351 Oct  2 22:05 wp-blog-header.php
-rw-r--r--   1 <username> <group>     2.3k Oct  2 22:05 wp-comments-post.php
-rw-r--r--   1 <username> <group>     3.8k Oct  2 22:01 wp-config.php
-rw-r--r--   1 <username> <group>     2.9k Oct  2 22:00 wp-config-sample.php
drwxr-xr-x  23 <username> <group>     4.0k Oct  5 12:01 wp-content
-rw-r--r--   1 <username> <group>     5.5k Oct  2 22:05 wp-cron.php
drwxr-xr-x  27 <username> <group>    20.0k Oct  2 22:01 wp-includes
-rw-r--r--   1 <username> <group>     2.4k Oct  2 22:05 wp-links-opml.php
-rw-r--r--   1 <username> <group>     3.8k Oct  2 22:05 wp-load.php
-rw-r--r--   1 <username> <group>    48.3k Oct  2 22:05 wp-login.php
-rw-r--r--   1 <username> <group>     8.3k Oct  2 22:05 wp-mail.php
-rw-r--r--   1 <username> <group>    25.0k Oct  2 22:05 wp-settings.php
-rw-r--r--   1 <username> <group>    33.6k Oct  2 22:05 wp-signup.php
-rw-r--r--   1 <username> <group>     4.8k Oct  2 22:05 wp-trackback.php
> mirror -c -P 32 wp-*
mirror: Access failed: 550 /private_html/wp-*: No such file or directory
1 error detected

Expectation: all files and directories starting with wp- will be mirrored.

@0x42h 0x42h changed the title mirror -c -P 32 wp-*? mirror -c -P 32 wp-* wildcard usage? Oct 5, 2023
@lavv17
Copy link
Owner

lavv17 commented Oct 5, 2023 via email

@0x42h
Copy link
Author

0x42h commented Oct 5, 2023

Hi @lavv17,

Thanks for your reply. All the following does not work as expected. I get way more than I ask for, given that obviously I'm using it wrong, in case there is some way to actually make this work, besides the point on how user-friendly it is:

> pwd
ftp://user@host/private_html
> mirror -P 32 -c --include-glob='/wp-*'

Gives me more than just wp-*.

> mirror -P 32 -c --include-glob='/private-html/wp-*'

Gives me more than just wp-*.

> mirror -P 32 -c --include='^/private-html/wp-.*'

Gives me more than just wp-*.

> mirror -P 32 -c --include='wp-'

Gives me more than just wp-*.

> mirror -P 32 -c --include='.*wp-.*'

Gives me more than just wp-*.

> mirror -P 32 -c --include-glob='*wp-*'

Gives me more than just wp-*.

It just feels totally counter-intuitive to me and I cannot seem to make it work. Neither can I find examples in the documentation on how to use it correctly.

@lavv17
Copy link
Owner

lavv17 commented Oct 5, 2023 via email

@0x42h
Copy link
Author

0x42h commented Oct 5, 2023

mget is not recursive. It does not download directories.

@0x42h
Copy link
Author

0x42h commented Oct 5, 2023

Interesting. I see that this works:

mirror --exclude '.*' --exclude '.*/' --include 'wp-*'

So first, I need to exclude everything and then include the things I want to include. I find it an "interesting" way of suggest to download the same as the command ls -la wp-* shows me.

Is it hard to implement. Want help, maybe? Or is the code not designed to easily implement this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants