Browse Source

Removed old email from license notices; minor changes to the program output, help message

main v2.3.3
parent
commit
1d8f987c27
  1. 2
      src/addr/local.go
  2. 2
      src/checksum/checksum.go
  3. 2
      src/checksum/checksum_test.go
  4. 2
      src/encryption/decrypt.go
  5. 2
      src/encryption/encrypt.go
  6. 2
      src/encryption/encryption_test.go
  7. 2
      src/encryption/key.go
  8. 2
      src/fsys/dir.go
  9. 2
      src/fsys/dir_test.go
  10. 4
      src/fsys/file.go
  11. 2
      src/fsys/file_test.go
  12. 2
      src/fsys/symlink.go
  13. 2
      src/fsys/symlink_test.go
  14. 4
      src/go.mod
  15. 18
      src/main.go
  16. 16
      src/node/node.go
  17. 2
      src/node/options.go
  18. 2
      src/protocol/constants.go
  19. 2
      src/protocol/headers.go
  20. 4
      src/protocol/packet.go
  21. 4
      src/protocol/packetConstruct.go
  22. 4
      src/protocol/packetDecode.go
  23. 2
      src/protocol/protocol_test.go
  24. 2
      src/protocol/recv.go
  25. 6
      src/protocol/send.go

2
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

2
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

2
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

2
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

2
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

2
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

2
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

2
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

2
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

4
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

2
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

2
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

2
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

4
src/go.mod

@ -1,3 +1,3 @@
module unbewohnte.xyz/Unbewohnte/ftu
module unbewohnte/ftu
go 1.17
go 1.18

18
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)
}

16
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)
}

2
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

2
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

2
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

4
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

4
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

4
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")

2
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

2
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

6
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.

Loading…
Cancel
Save