Show users hostpot mikrotik

0

Hi, I'm doing a program in c # to help me create the hostpot user in mikrotik but I do not know how to fill a datagrid with the information that is in the router could you help me?

    
asked by carlos1016 28.10.2018 в 23:47
source

1 answer

0

According to the API, taking the Python program that I have in my notes and adapting it to C #, I would do the following:

MK mikrotik = new MK("x.x.x.197");
 if (!mikrotik.Login("admin", "123"))
 {
 MessageBox.Show("no connect");
 mikrotik.Close();
 return;
 }
 MessageBox.Show("connect");

 mikrotik.Send("/ip/hotspot/user/add", false);
 mikrotik.Send("=name=999", false);
 mikrotik.Send("=password=999", false);
 mikrotik.Send("=profile=profile1");

 //MessageBox.Show("create user");
 mikrotik.Close();

But you should provide more information about the error you get.

    
answered by 29.10.2018 в 01:39