2024-11-06 06:07:22 +00:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"context"
|
|
|
|
"fmt"
|
|
|
|
"log"
|
|
|
|
"os"
|
|
|
|
|
2024-11-06 08:33:27 +00:00
|
|
|
"git.asdf.cafe/abs3nt/fbisender/src/sender"
|
|
|
|
"github.com/urfave/cli/v3"
|
2024-11-06 06:07:22 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
func main() {
|
2024-11-06 08:33:27 +00:00
|
|
|
app := &cli.Command{
|
|
|
|
Name: "fbisender",
|
|
|
|
Usage: "send files to FBI over network with an HTTP server",
|
|
|
|
UsageText: "fbisender [global options] <target file or directory>",
|
|
|
|
Action: func(ctx context.Context, c *cli.Command) error {
|
|
|
|
if !c.Args().Present() {
|
|
|
|
return fmt.Errorf("target file or directory is required as an argument")
|
2024-11-06 06:07:22 +00:00
|
|
|
}
|
2024-11-06 08:33:27 +00:00
|
|
|
return sender.SendFiles(ctx, c.Args().First())
|
|
|
|
},
|
2024-11-06 06:07:22 +00:00
|
|
|
}
|
|
|
|
|
2024-11-06 08:33:27 +00:00
|
|
|
if err := app.Run(context.Background(), os.Args); err != nil {
|
|
|
|
log.Fatal(err)
|
2024-11-06 06:07:22 +00:00
|
|
|
}
|
|
|
|
}
|