From 1d8f987c279a72c2cccf8f827a761527ad16c96c Mon Sep 17 00:00:00 2001 From: Unbewohnte Date: Thu, 4 Aug 2022 13:21:28 +0300 Subject: [PATCH] Removed old email from license notices; minor changes to the program output, help message --- src/addr/local.go | 2 +- src/checksum/checksum.go | 2 +- src/checksum/checksum_test.go | 2 +- src/encryption/decrypt.go | 2 +- src/encryption/encrypt.go | 2 +- src/encryption/encryption_test.go | 2 +- src/encryption/key.go | 2 +- src/fsys/dir.go | 2 +- src/fsys/dir_test.go | 2 +- src/fsys/file.go | 4 ++-- src/fsys/file_test.go | 2 +- src/fsys/symlink.go | 2 +- src/fsys/symlink_test.go | 2 +- src/go.mod | 4 ++-- src/main.go | 18 +++++++++--------- src/node/node.go | 16 ++++++++-------- src/node/options.go | 2 +- src/protocol/constants.go | 2 +- src/protocol/headers.go | 2 +- src/protocol/packet.go | 4 ++-- src/protocol/packetConstruct.go | 4 ++-- src/protocol/packetDecode.go | 4 ++-- src/protocol/protocol_test.go | 2 +- src/protocol/recv.go | 2 +- src/protocol/send.go | 6 +++--- 25 files changed, 47 insertions(+), 47 deletions(-) diff --git a/src/addr/local.go b/src/addr/local.go index d03a59d..2759199 100644 --- a/src/addr/local.go +++ b/src/addr/local.go @@ -1,6 +1,6 @@ /* ftu - file transferring utility. -Copyright (C) 2021,2022 Kasyanov Nikolay Alexeyevich (Unbewohnte (https://unbewohnte.xyz/)) +Copyright (C) 2021,2022 Kasyanov Nikolay Alexeyevich (Unbewohnte) This file is a part of ftu diff --git a/src/checksum/checksum.go b/src/checksum/checksum.go index 15f8340..a878ba8 100644 --- a/src/checksum/checksum.go +++ b/src/checksum/checksum.go @@ -1,6 +1,6 @@ /* ftu - file transferring utility. -Copyright (C) 2021,2022 Kasyanov Nikolay Alexeyevich (Unbewohnte (https://unbewohnte.xyz/)) +Copyright (C) 2021,2022 Kasyanov Nikolay Alexeyevich (Unbewohnte) This file is a part of ftu diff --git a/src/checksum/checksum_test.go b/src/checksum/checksum_test.go index e274086..d22b389 100644 --- a/src/checksum/checksum_test.go +++ b/src/checksum/checksum_test.go @@ -1,6 +1,6 @@ /* ftu - file transferring utility. -Copyright (C) 2021,2022 Kasyanov Nikolay Alexeyevich (Unbewohnte (https://unbewohnte.xyz/)) +Copyright (C) 2021,2022 Kasyanov Nikolay Alexeyevich (Unbewohnte) This file is a part of ftu diff --git a/src/encryption/decrypt.go b/src/encryption/decrypt.go index 0e71e35..665c88b 100644 --- a/src/encryption/decrypt.go +++ b/src/encryption/decrypt.go @@ -1,6 +1,6 @@ /* ftu - file transferring utility. -Copyright (C) 2021,2022 Kasyanov Nikolay Alexeyevich (Unbewohnte (https://unbewohnte.xyz/)) +Copyright (C) 2021,2022 Kasyanov Nikolay Alexeyevich (Unbewohnte) This file is a part of ftu diff --git a/src/encryption/encrypt.go b/src/encryption/encrypt.go index 7a947ac..ce5dd87 100644 --- a/src/encryption/encrypt.go +++ b/src/encryption/encrypt.go @@ -1,6 +1,6 @@ /* ftu - file transferring utility. -Copyright (C) 2021,2022 Kasyanov Nikolay Alexeyevich (Unbewohnte (https://unbewohnte.xyz/)) +Copyright (C) 2021,2022 Kasyanov Nikolay Alexeyevich (Unbewohnte) This file is a part of ftu diff --git a/src/encryption/encryption_test.go b/src/encryption/encryption_test.go index f2f6378..7597561 100644 --- a/src/encryption/encryption_test.go +++ b/src/encryption/encryption_test.go @@ -1,6 +1,6 @@ /* ftu - file transferring utility. -Copyright (C) 2021,2022 Kasyanov Nikolay Alexeyevich (Unbewohnte (https://unbewohnte.xyz/)) +Copyright (C) 2021,2022 Kasyanov Nikolay Alexeyevich (Unbewohnte) This file is a part of ftu diff --git a/src/encryption/key.go b/src/encryption/key.go index 25e2f60..f7a29aa 100644 --- a/src/encryption/key.go +++ b/src/encryption/key.go @@ -1,6 +1,6 @@ /* ftu - file transferring utility. -Copyright (C) 2021,2022 Kasyanov Nikolay Alexeyevich (Unbewohnte (https://unbewohnte.xyz/)) +Copyright (C) 2021,2022 Kasyanov Nikolay Alexeyevich (Unbewohnte) This file is a part of ftu diff --git a/src/fsys/dir.go b/src/fsys/dir.go index 226b40d..9c1cf89 100644 --- a/src/fsys/dir.go +++ b/src/fsys/dir.go @@ -1,6 +1,6 @@ /* ftu - file transferring utility. -Copyright (C) 2021,2022 Kasyanov Nikolay Alexeyevich (Unbewohnte (https://unbewohnte.xyz/)) +Copyright (C) 2021,2022 Kasyanov Nikolay Alexeyevich (Unbewohnte) This file is a part of ftu diff --git a/src/fsys/dir_test.go b/src/fsys/dir_test.go index 20b51f1..84713f4 100644 --- a/src/fsys/dir_test.go +++ b/src/fsys/dir_test.go @@ -1,6 +1,6 @@ /* ftu - file transferring utility. -Copyright (C) 2021,2022 Kasyanov Nikolay Alexeyevich (Unbewohnte (https://unbewohnte.xyz/)) +Copyright (C) 2021,2022 Kasyanov Nikolay Alexeyevich (Unbewohnte) This file is a part of ftu diff --git a/src/fsys/file.go b/src/fsys/file.go index 6a03437..ba0e90e 100644 --- a/src/fsys/file.go +++ b/src/fsys/file.go @@ -1,6 +1,6 @@ /* ftu - file transferring utility. -Copyright (C) 2021,2022 Kasyanov Nikolay Alexeyevich (Unbewohnte (https://unbewohnte.xyz/)) +Copyright (C) 2021,2022 Kasyanov Nikolay Alexeyevich (Unbewohnte) This file is a part of ftu @@ -25,7 +25,7 @@ import ( "os" "path/filepath" - "unbewohnte.xyz/Unbewohnte/ftu/checksum" + "unbewohnte/ftu/checksum" ) // A struct that represents the necessary file information for transportation through node diff --git a/src/fsys/file_test.go b/src/fsys/file_test.go index 7b0dab3..74312a6 100644 --- a/src/fsys/file_test.go +++ b/src/fsys/file_test.go @@ -1,6 +1,6 @@ /* ftu - file transferring utility. -Copyright (C) 2021,2022 Kasyanov Nikolay Alexeyevich (Unbewohnte (https://unbewohnte.xyz/)) +Copyright (C) 2021,2022 Kasyanov Nikolay Alexeyevich (Unbewohnte) This file is a part of ftu diff --git a/src/fsys/symlink.go b/src/fsys/symlink.go index 9ebdba3..62c37e0 100644 --- a/src/fsys/symlink.go +++ b/src/fsys/symlink.go @@ -1,6 +1,6 @@ /* ftu - file transferring utility. -Copyright (C) 2021,2022 Kasyanov Nikolay Alexeyevich (Unbewohnte (https://unbewohnte.xyz/)) +Copyright (C) 2021,2022 Kasyanov Nikolay Alexeyevich (Unbewohnte) This file is a part of ftu diff --git a/src/fsys/symlink_test.go b/src/fsys/symlink_test.go index 0a912e4..7dc277a 100644 --- a/src/fsys/symlink_test.go +++ b/src/fsys/symlink_test.go @@ -1,6 +1,6 @@ /* ftu - file transferring utility. -Copyright (C) 2021,2022 Kasyanov Nikolay Alexeyevich (Unbewohnte (https://unbewohnte.xyz/)) +Copyright (C) 2021,2022 Kasyanov Nikolay Alexeyevich (Unbewohnte) This file is a part of ftu diff --git a/src/go.mod b/src/go.mod index a1d2b5d..5060e50 100644 --- a/src/go.mod +++ b/src/go.mod @@ -1,3 +1,3 @@ -module unbewohnte.xyz/Unbewohnte/ftu +module unbewohnte/ftu -go 1.17 +go 1.18 diff --git a/src/main.go b/src/main.go index 485e918..60168fb 100644 --- a/src/main.go +++ b/src/main.go @@ -26,13 +26,13 @@ import ( "fmt" "os" - "unbewohnte.xyz/Unbewohnte/ftu/node" + "unbewohnte/ftu/node" ) var ( - VERSION string = "v2.3.2" + VERSION string = "v2.3.3" - versionInformation string = fmt.Sprintf("ftu %s\nfile transferring utility\n\nCopyright (C) 2021,2022 Kasyanov Nikolay Alexeyevich (Unbewohnte (me@unbewohnte.xyz))\nThis program comes with ABSOLUTELY NO WARRANTY.\nThis is free software, and you are welcome to redistribute it under certain conditions; type \"ftu -l\" for details.\n", VERSION) + versionInformation string = fmt.Sprintf("ftu %s\nfile transferring utility\n\nCopyright (C) 2021,2022 Kasyanov Nikolay Alexeyevich (Unbewohnte)\nThis program comes with ABSOLUTELY NO WARRANTY.\nThis is free software, and you are welcome to redistribute it under certain conditions; type \"ftu -l\" for details.\n", VERSION) //go:embed COPYING licenseInformation string @@ -55,12 +55,12 @@ func init() { fmt.Printf("ftu -[FLAGs]\n\n") fmt.Printf("[FLAGs]\n\n") - fmt.Printf("| -p [Uinteger_here] for port\n") - fmt.Printf("| -r [true|false] for recursive sending of a directory\n") + fmt.Printf("| -p [integer] for port\n") + fmt.Printf("| -r [true|false] send recursively or not\n") fmt.Printf("| -a [ip_address|domain_name] address to connect to (cannot be used with -s)\n") fmt.Printf("| -d [path_to_directory] where the files will be downloaded to (cannot be used with -s)\n") - fmt.Printf("| -s [path_to_file|directory] to send it (cannot be used with -a)\n") - fmt.Printf("| -? [true|false] to turn on|off verbose output\n") + fmt.Printf("| -s [path_to_file|directory] send it (cannot be used with -a)\n") + fmt.Printf("| -? [true|false] turn on|off verbose output\n") fmt.Printf("| -l print license information\n") fmt.Printf("| -v print version information\n\n\n") @@ -98,12 +98,12 @@ func init() { // validate flags if *SEND == "" && *ADDRESS == "" { - fmt.Printf("Neither sending nor receiving flag was specified. Run ftu -h for help\n") + fmt.Printf("[ERROR] Neither sending nor receiving flag was specified. Run ftu -h for help\n") os.Exit(-1) } if *SEND != "" && *ADDRESS != "" { - fmt.Printf("Can`t send and receive at the same time. Specify either -s or -a\n") + fmt.Printf("[ERROR] Can't send and receive at the same time. Specify either -s or -a\n") os.Exit(-1) } diff --git a/src/node/node.go b/src/node/node.go index 19427b0..b5b7356 100644 --- a/src/node/node.go +++ b/src/node/node.go @@ -1,6 +1,6 @@ /* ftu - file transferring utility. -Copyright (C) 2021,2022 Kasyanov Nikolay Alexeyevich (Unbewohnte (https://unbewohnte.xyz/)) +Copyright (C) 2021,2022 Kasyanov Nikolay Alexeyevich (Unbewohnte) This file is a part of ftu @@ -32,11 +32,11 @@ import ( "fmt" - "unbewohnte.xyz/Unbewohnte/ftu/addr" - "unbewohnte.xyz/Unbewohnte/ftu/checksum" - "unbewohnte.xyz/Unbewohnte/ftu/encryption" - "unbewohnte.xyz/Unbewohnte/ftu/fsys" - "unbewohnte.xyz/Unbewohnte/ftu/protocol" + "unbewohnte/ftu/addr" + "unbewohnte/ftu/checksum" + "unbewohnte/ftu/encryption" + "unbewohnte/ftu/fsys" + "unbewohnte/ftu/protocol" ) // netInfowork specific settings @@ -325,7 +325,7 @@ func (node *Node) send() { incomingPacket, ok := <-node.packetPipe if !ok { fmt.Printf("\nThe connection has been closed unexpectedly\n") - os.Exit(-1.) + os.Exit(-1) } // if encryption key is set - decrypt packet on the spot @@ -536,7 +536,7 @@ func (node *Node) receive() { // connect to the sending node err := node.connect() if err != nil { - fmt.Printf("\n[ERROR] Could not connect to %s:%d", node.netInfo.ConnAddr, node.netInfo.Port) + fmt.Printf("\n[ERROR] Could not connect to %s:%d\n", node.netInfo.ConnAddr, node.netInfo.Port) os.Exit(-1) } diff --git a/src/node/options.go b/src/node/options.go index 9d41512..00721b1 100644 --- a/src/node/options.go +++ b/src/node/options.go @@ -1,6 +1,6 @@ /* ftu - file transferring utility. -Copyright (C) 2021,2022 Kasyanov Nikolay Alexeyevich (Unbewohnte (https://unbewohnte.xyz/)) +Copyright (C) 2021,2022 Kasyanov Nikolay Alexeyevich (Unbewohnte) This file is a part of ftu diff --git a/src/protocol/constants.go b/src/protocol/constants.go index af871a9..0a25436 100644 --- a/src/protocol/constants.go +++ b/src/protocol/constants.go @@ -1,6 +1,6 @@ /* ftu - file transferring utility. -Copyright (C) 2021,2022 Kasyanov Nikolay Alexeyevich (Unbewohnte (https://unbewohnte.xyz/)) +Copyright (C) 2021,2022 Kasyanov Nikolay Alexeyevich (Unbewohnte) This file is a part of ftu diff --git a/src/protocol/headers.go b/src/protocol/headers.go index fc389f9..58e03b2 100644 --- a/src/protocol/headers.go +++ b/src/protocol/headers.go @@ -1,6 +1,6 @@ /* ftu - file transferring utility. -Copyright (C) 2021,2022 Kasyanov Nikolay Alexeyevich (Unbewohnte (https://unbewohnte.xyz/)) +Copyright (C) 2021,2022 Kasyanov Nikolay Alexeyevich (Unbewohnte) This file is a part of ftu diff --git a/src/protocol/packet.go b/src/protocol/packet.go index f1e3944..a395c9c 100644 --- a/src/protocol/packet.go +++ b/src/protocol/packet.go @@ -1,6 +1,6 @@ /* ftu - file transferring utility. -Copyright (C) 2021,2022 Kasyanov Nikolay Alexeyevich (Unbewohnte (https://unbewohnte.xyz/)) +Copyright (C) 2021,2022 Kasyanov Nikolay Alexeyevich (Unbewohnte) This file is a part of ftu @@ -31,7 +31,7 @@ import ( "fmt" "strings" - "unbewohnte.xyz/Unbewohnte/ftu/encryption" + "unbewohnte/ftu/encryption" ) // Internal representation of packet before|after the transportation diff --git a/src/protocol/packetConstruct.go b/src/protocol/packetConstruct.go index 833e69c..0b77280 100644 --- a/src/protocol/packetConstruct.go +++ b/src/protocol/packetConstruct.go @@ -1,6 +1,6 @@ /* ftu - file transferring utility. -Copyright (C) 2021,2022 Kasyanov Nikolay Alexeyevich (Unbewohnte (https://unbewohnte.xyz/)) +Copyright (C) 2021,2022 Kasyanov Nikolay Alexeyevich (Unbewohnte) This file is a part of ftu @@ -25,7 +25,7 @@ import ( "bytes" "encoding/binary" - "unbewohnte.xyz/Unbewohnte/ftu/fsys" + "unbewohnte/ftu/fsys" ) // constructs a ready to send FILE packet diff --git a/src/protocol/packetDecode.go b/src/protocol/packetDecode.go index 9659041..a687119 100644 --- a/src/protocol/packetDecode.go +++ b/src/protocol/packetDecode.go @@ -1,6 +1,6 @@ /* ftu - file transferring utility. -Copyright (C) 2021,2022 Kasyanov Nikolay Alexeyevich (Unbewohnte (https://unbewohnte.xyz/)) +Copyright (C) 2021,2022 Kasyanov Nikolay Alexeyevich (Unbewohnte) This file is a part of ftu @@ -26,7 +26,7 @@ import ( "encoding/binary" "fmt" - "unbewohnte.xyz/Unbewohnte/ftu/fsys" + "unbewohnte/ftu/fsys" ) var ErrorWrongPacket error = fmt.Errorf("wrong type of packet header") diff --git a/src/protocol/protocol_test.go b/src/protocol/protocol_test.go index a501870..0bd10f6 100644 --- a/src/protocol/protocol_test.go +++ b/src/protocol/protocol_test.go @@ -1,6 +1,6 @@ /* ftu - file transferring utility. -Copyright (C) 2021,2022 Kasyanov Nikolay Alexeyevich (Unbewohnte (https://unbewohnte.xyz/)) +Copyright (C) 2021,2022 Kasyanov Nikolay Alexeyevich (Unbewohnte) This file is a part of ftu diff --git a/src/protocol/recv.go b/src/protocol/recv.go index e28ed77..da5aa8f 100644 --- a/src/protocol/recv.go +++ b/src/protocol/recv.go @@ -1,6 +1,6 @@ /* ftu - file transferring utility. -Copyright (C) 2021,2022 Kasyanov Nikolay Alexeyevich (Unbewohnte (https://unbewohnte.xyz/)) +Copyright (C) 2021,2022 Kasyanov Nikolay Alexeyevich (Unbewohnte) This file is a part of ftu diff --git a/src/protocol/send.go b/src/protocol/send.go index 7a42749..dccdcab 100644 --- a/src/protocol/send.go +++ b/src/protocol/send.go @@ -1,6 +1,6 @@ /* ftu - file transferring utility. -Copyright (C) 2021,2022 Kasyanov Nikolay Alexeyevich (Unbewohnte (https://unbewohnte.xyz/)) +Copyright (C) 2021,2022 Kasyanov Nikolay Alexeyevich (Unbewohnte) This file is a part of ftu @@ -28,8 +28,8 @@ import ( "io" "net" - "unbewohnte.xyz/Unbewohnte/ftu/encryption" - "unbewohnte.xyz/Unbewohnte/ftu/fsys" + "unbewohnte/ftu/encryption" + "unbewohnte/ftu/fsys" ) // Sends given packet to connection.