password
This commit is contained in:
parent
ebdf1336a1
commit
f1d156ea84
17
TCPClient.go
17
TCPClient.go
@ -40,6 +40,7 @@ func NewTCPClient(TCPServer *TCPServer, Countries Countries) *TCPClient {
|
|||||||
Address: Cfg.Cluster.Server,
|
Address: Cfg.Cluster.Server,
|
||||||
Port: Cfg.Cluster.Port,
|
Port: Cfg.Cluster.Port,
|
||||||
Login: Cfg.Cluster.Login,
|
Login: Cfg.Cluster.Login,
|
||||||
|
Password: Cfg.Cluster.Password,
|
||||||
MsgChan: TCPServer.MsgChan,
|
MsgChan: TCPServer.MsgChan,
|
||||||
CmdChan: TCPServer.CmdChan,
|
CmdChan: TCPServer.CmdChan,
|
||||||
SpotChanToFlex: make(chan TelnetSpot, 100),
|
SpotChanToFlex: make(chan TelnetSpot, 100),
|
||||||
@ -149,13 +150,14 @@ func (c *TCPClient) ReadLine() {
|
|||||||
if strings.Contains(message, Cfg.Cluster.LoginPrompt) {
|
if strings.Contains(message, Cfg.Cluster.LoginPrompt) {
|
||||||
Log.Debug("Found login prompt...sending callsign")
|
Log.Debug("Found login prompt...sending callsign")
|
||||||
c.Write([]byte(c.Login + "\r\n"))
|
c.Write([]byte(c.Login + "\r\n"))
|
||||||
c.SetFilters()
|
c.LoggedIn = true
|
||||||
if Cfg.Cluster.Command != "" {
|
// c.SetFilters()
|
||||||
c.WriteString(Cfg.Cluster.Command + "\n\r")
|
// if Cfg.Cluster.Command != "" {
|
||||||
}
|
// c.WriteString(Cfg.Cluster.Command + "\n\r")
|
||||||
|
// }
|
||||||
Log.Infof("Connected to cluster %s", Cfg.Cluster.Server)
|
Log.Infof("Connected to cluster %s", Cfg.Cluster.Server)
|
||||||
Log.Info("Start receiving spots")
|
Log.Info("Start receiving spots")
|
||||||
c.LoggedIn = true
|
continue
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -164,6 +166,11 @@ func (c *TCPClient) ReadLine() {
|
|||||||
message, _ = strings.CutSuffix(message, "\n")
|
message, _ = strings.CutSuffix(message, "\n")
|
||||||
message, _ = strings.CutSuffix(message, "\r")
|
message, _ = strings.CutSuffix(message, "\r")
|
||||||
|
|
||||||
|
if strings.Contains(message, "password") {
|
||||||
|
Log.Debug("Found password prompt...sending password")
|
||||||
|
c.Write([]byte(c.Password + "\r\n"))
|
||||||
|
}
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
Log.Errorf("Error reading message: %s", err)
|
Log.Errorf("Error reading message: %s", err)
|
||||||
c.Conn.Close()
|
c.Conn.Close()
|
||||||
|
@ -27,6 +27,7 @@ type Config struct {
|
|||||||
Server string `yaml:"server"`
|
Server string `yaml:"server"`
|
||||||
Port string `yaml:"port"`
|
Port string `yaml:"port"`
|
||||||
Login string `yaml:"login"`
|
Login string `yaml:"login"`
|
||||||
|
Password string `yaml:"password"`
|
||||||
Skimmer bool `yaml:"skimmer"`
|
Skimmer bool `yaml:"skimmer"`
|
||||||
FT8 bool `yaml:"ft8"`
|
FT8 bool `yaml:"ft8"`
|
||||||
FT4 bool `yaml:"ft4"`
|
FT4 bool `yaml:"ft4"`
|
||||||
|
@ -8,13 +8,14 @@ sqlite:
|
|||||||
sqlite_path: 'C:\Perso\Seafile\Radio\Logs\Log4OM\F4BPO.SQLite' # SQLite Db oath of Log4OM
|
sqlite_path: 'C:\Perso\Seafile\Radio\Logs\Log4OM\F4BPO.SQLite' # SQLite Db oath of Log4OM
|
||||||
callsign: F4BPO # Log4OM Callsign used to check if you get spotted by someone
|
callsign: F4BPO # Log4OM Callsign used to check if you get spotted by someone
|
||||||
cluster:
|
cluster:
|
||||||
server: dxc.sm7iun.se # dxc.k0xm.net
|
server: cluster.f4bpo.com # dxc.k0xm.net dxc.sm7iun.se
|
||||||
port: 23
|
port: 7300
|
||||||
login: f4bpo
|
login: f4bpo
|
||||||
|
password: 89DGgg
|
||||||
skimmer: true
|
skimmer: true
|
||||||
ft8: false
|
ft8: false
|
||||||
ft4: false
|
ft4: false
|
||||||
command: SET/NOFILTER
|
command:
|
||||||
login_prompt: "login:"
|
login_prompt: "login:"
|
||||||
flex:
|
flex:
|
||||||
discovery: true # Radio must be on same LAN than the program
|
discovery: true # Radio must be on same LAN than the program
|
||||||
|
2
main.go
2
main.go
@ -42,7 +42,7 @@ func main() {
|
|||||||
cfg := NewConfig(cfgPath)
|
cfg := NewConfig(cfgPath)
|
||||||
|
|
||||||
log := NewLog()
|
log := NewLog()
|
||||||
log.Info("Running FlexDXCluster version 0.3")
|
log.Info("Running FlexDXCluster version 0.4")
|
||||||
log.Infof("Callsign: %s", cfg.SQLite.Callsign)
|
log.Infof("Callsign: %s", cfg.SQLite.Callsign)
|
||||||
|
|
||||||
DeleteDatabase("./flex.sqlite", log)
|
DeleteDatabase("./flex.sqlite", log)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user