I actually use Putty to access my server, and I notice that sometimes when I run DA API using curl I got a weird output but the API is working well:
Sample code:
Weird output: (but API is working)
You can see the text Putty is there because it detected the binary output contains character of Ctrl-E from Directadmin API and putty is set to reply with a string 'Putty' when it received this. Sometimes, I got the correct json output sometimes a binary output so it happens randomly. However, the API call is working, example the above code it set the domain DKIM correctly. Is this a bug?
Information related to this on stackoverflow:
Sample code:
Bash:
username="admin"
password="12321aa"
da_port="2222"
host_server="server.domain.com"
ssl="https"
domain="test.com"
command="CMD_API_EMAIL_POP"
data="action=set_dkim&domain=${domain}&enable=yes&json=yes"
method="POST"
curl --silent --request "${method}" --user "${username}":"${password}" --data "${data}" "${ssl}://${host_server}:${da_port}/${command}"
Weird output: (but API is working)
You can see the text Putty is there because it detected the binary output contains character of Ctrl-E from Directadmin API and putty is set to reply with a string 'Putty' when it received this. Sometimes, I got the correct json output sometimes a binary output so it happens randomly. However, the API call is working, example the above code it set the domain DKIM correctly. Is this a bug?
Information related to this on stackoverflow:
Putty likes to print itself sometimes in my command line
So, sometimes when I am programming in C through putty connected to a linux server, after executing my C file for testing, the command line will fill with the word "PuTTY" repeatedly 30 to 40 times.
stackoverflow.com
Last edited: