Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -41,8 +41,6 @@ func ReceivePacket(key [32]byte, conn *net.UDPConn) common.Packet {
|
|||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
// fmt.Printf("Decrypted Packet, Sync: %v, Type: %v\n", pck.Sync, pck.Flag)
|
|
||||||
|
|
||||||
return pck
|
return pck
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -112,7 +110,6 @@ func GetFile(path string, address string) {
|
|||||||
|
|
||||||
StartConnection(request.Sid, key, fmt.Sprintf("%v:13375", address))
|
StartConnection(request.Sid, key, fmt.Sprintf("%v:13375", address))
|
||||||
|
|
||||||
// udpAddr, err := net.ResolveUDPAddr("udp", "0.0.0.0:13374")
|
|
||||||
udpAddr, err := net.ResolveUDPAddr("udp", fmt.Sprintf("%v:13374", address))
|
udpAddr, err := net.ResolveUDPAddr("udp", fmt.Sprintf("%v:13374", address))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Println(err)
|
fmt.Println(err)
|
||||||
@@ -206,10 +203,6 @@ func GetFile(path string, address string) {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
for _, i := range lostPackets {
|
|
||||||
fmt.Println(i)
|
|
||||||
}
|
|
||||||
|
|
||||||
lastPacket := ackPck
|
lastPacket := ackPck
|
||||||
|
|
||||||
for {
|
for {
|
||||||
@@ -231,7 +224,6 @@ func GetFile(path string, address string) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
offset := (int64(pck.Sync) - int64(ackPck.Sync+1)) * int64(common.MaxDataSize)
|
offset := (int64(pck.Sync) - int64(ackPck.Sync+1)) * int64(common.MaxDataSize)
|
||||||
// fmt.Printf("Sync: %v, Offset: %v\n", pck.sync, offset)
|
|
||||||
|
|
||||||
_, err = file.WriteAt(pck.Data, offset)
|
_, err = file.WriteAt(pck.Data, offset)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
@@ -269,11 +269,8 @@ func (server *Server) sendPTE(conn *net.UDPConn, addr *net.UDPAddr, pck *common.
|
|||||||
file := filepath.Join(server.parentFilePath, path)
|
file := filepath.Join(server.parentFilePath, path)
|
||||||
file = filepath.Clean(file)
|
file = filepath.Clean(file)
|
||||||
|
|
||||||
// fmt.Sprintf("%v\\*", server.parentFilePath)
|
|
||||||
matched, err := filepath.Match(filepath.Join(server.parentFilePath, "*"), file)
|
matched, err := filepath.Match(filepath.Join(server.parentFilePath, "*"), file)
|
||||||
|
|
||||||
fmt.Println(filepath.Join(server.parentFilePath, "*"))
|
|
||||||
|
|
||||||
if err != nil || !matched {
|
if err != nil || !matched {
|
||||||
log.WithFields(log.Fields{
|
log.WithFields(log.Fields{
|
||||||
"ParentFilePath": server.parentFilePath,
|
"ParentFilePath": server.parentFilePath,
|
||||||
@@ -418,8 +415,6 @@ func (server *Server) handleConnection(conn net.Conn) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// fmt.Println(buf)
|
|
||||||
|
|
||||||
rsaPck := common.RsaPacketFromBytes(buf[0:r])
|
rsaPck := common.RsaPacketFromBytes(buf[0:r])
|
||||||
key, err := rsaPck.ExtractKey(server.rsa)
|
key, err := rsaPck.ExtractKey(server.rsa)
|
||||||
if err != nil && !errors.Is(err, io.EOF) {
|
if err != nil && !errors.Is(err, io.EOF) {
|
||||||
|
|||||||
@@ -14,8 +14,5 @@ A udp File transfer "Suite" with TCP Connection establishment
|
|||||||
- Better Cli support
|
- Better Cli support
|
||||||
- Better Readme
|
- Better Readme
|
||||||
|
|
||||||
## Known Bugs / Errors / Fix list:
|
|
||||||
- Path Exploits (will get changed to only allow Files in curr exe Path or Configurable Path)
|
|
||||||
|
|
||||||
## Notes
|
## Notes
|
||||||
- Udp max packet size is set with 504
|
- Udp max packet size is set with 504
|
||||||
|
|||||||
Reference in New Issue
Block a user