Jump to content

kornwaretm

Members
  • Posts

    25
  • Joined

  • Last visited

Posts posted by kornwaretm

  1. thank you for the replies.

    On 10/16/2018 at 8:26 PM, MartinK said:

    .......Ubuntu 18.04 installs version 1.1.* by default, so maybe you are missing older one? 

    Yes installing on Ubuntu 16 works,

    On 10/18/2018 at 1:26 PM, janoo said:

    I have seen this error when the library files (Network.so..) were not correctly referenced from the code (the file path was incorrect).

    if one of the required libs missing, server API reply with something like "could not find lib.so" message. where in my case the message say "Dynamic library not found"

    i hope support for latest openssl arrive soon. for now i stick to Ubuntu 16.

    thank you very much

  2. my system :

    • system ubuntu 18
    • odbc 5.2
    • mysql
    • gcc 7.3

    halo. i run my program using new shared libs from esmc 7. my program previously running OK on ERA 6.5 , keep getting dynamic library not found. no idea what library. i've "ldd" them to check dependency. cant find anything.

    library initiatin was ok, all required function are successfully obtained from the shared libs. the error message appear when i attempt to send a json request(connection request)

    request :

    {"Era.ServerApi.StartRequest":{}}

    response:

    {"error":"Dynamic library not found"}

     

    what may cause this

    thanks in advance

  3. i have a follow up question. after the installer are created i noticed that the agent peer certificate doesn't stick with the installer (check my attachment). i have to manually set the certificate via the web console. if i create an installer via web console, the peer certificate are assigned automatically.

    {
    	"Era.Common.NetworkMessage.ConsoleApi.Repository.RpcCreateStoredInstallerRequest": {
    		"staticObjectData": {
    			"name": "in_installer_name",
    			"description": "in_installer_description"
    		},
    		"storedInstallerData": {
    			"endpointLicenseUuid": {
    				"uuid": "in_endpoint_license"
    			},
    			"agentPeerCertificateUuid": {
    				"uuid": "in_agent_peer_certificate_id"
    			},
    			"agentPeerCertificatePassword": "",
    			"endpointRepositoryPackage": {
    				"package_app_id": "in_package",
    				"package_description": "in_description",
    				"package_lang": "en_US",
    				"package_name": "in_name",
    				"package_os": "in_os",
    				"package_os_systems": "in_os_systems",
    				"package_version": "in_version"
    			},
    			"staticGroupUuid": {
    				"uuid": "in_group_id"
    			},
    			"acceptEula": true,
    			"installerType": 1,
    			"serverHostname": "in_host",
    			"serverPort": "in_port"
    		}
    	}
    }

    my question is did i miss a parameter? or if not how to assign the certificate via serverAPI? 

     

    cert.png

  4. i have a problem when creating installer via server API. i don't know what to set for "endpointRepositoryPackage", "package_app_id" , "package_os", "package_os_systems", and "package_version". i've tried some possible values with no luck, when i test download the installer it fails.  i create all in one installer using this json 

    {
    	"Era.Common.NetworkMessage.ConsoleApi.Repository.RpcCreateStoredInstallerRequest":
    	{
    		"staticObjectData":
    		{
    			"name":"Test installer",
    			"description":"olala vit"
    		},
    		
    		"storedInstallerData":
    		{
    			"agentPeerCertificateUuid":
    			{
    				"uuid":"agentpee-rcertific-ateu-uidddddddddd"
    			},
    			"endpointRepositoryPackage":
    			{
    				"package_app_id":"com.eset.apps.business.ees",
    				"package_description":"ESET Endpoint Security",
    				"package_lang":"en_US",
    				"package_name":"ESET Endpoint Security",
    				"package_os":"WINDOWS",
    				"package_os_systems":"WINDOWS XP, VISTA, NT 4.0, 95, 8, 7, 2000, 10",
    				"package_version":"6.6.2064.0"
    			},
    			
    			
    			"staticGroupUuid":
    			{
    				"uuid":"staticgr-oups-uuid-stri-nghereeeeeee"
    			},
    			"acceptEula":true,
    			"installerType":1,
    			"serverHostname":"hos.ti.pa.ddr",
    			"serverPort":"2222"
    		}
    	}
    }

    i need guide for this. thanks in advance

  5. thanks for the reply. i've been triying using random licenses for testing this. add and remove them a lot. may this is the cause? anyway if the process is normal with real license will i be able to get license uuid returned? i need license uuid to create activation task. 

    {
    	"Era.Common.NetworkMessage.ConsoleApi.TasksTriggers.RpcCreateClientTaskRequest": {
    		"clientTaskConfiguration": {
    			"taskType": 18,
    			"taskProductActivation": {
    				"eset_license": {
    					"license_uuid": {
    						"uuid": "in_license_uuid"
    					}
    				}
    			}
    		},
    		"collisionsHandling": 1,
    		"staticObjectData": {
    			"name": "in_name",
    			"description": "in_description"
    		}
    	}
    }

     

  6. hi.

    i'm trying to get license uuid. i activate a license using this json. i'm expecting to get the license uuid from this request.

    {
    	"Era.Common.NetworkMessage.ConsoleApi.Licenses.RpcAddPoolByLicenseKeyRequest": {
    		"licenseKey": "KEEY-KEYY-KKEY-KEYE-KEEY"
    	}
    }

    instead i got this json

    {
      "Era.Common.NetworkMessage.ConsoleApi.RpcExceptionData": {} 
    }

    server log :

    2017-11-23 04:35:22 Error: ConsoleApiModule [Thread 7feba17ba700]: 23394 Error while processing AddPoolByLicenseKey request: CEcpCommunicator: ECPRequestMessageLinkSeatPools request failed, error=0x2051d000.
    2017-11-23 04:35:22 Error: ConsoleApiModule [Thread 7feba17ba700]: Untranslatable CInterModuleException: CEcpCommunicator: ECPRequestMessageLinkSeatPools request failed, error=0x2051d000.

    something went wrong there, i can't understand. however, i can see the license in the web console. i need to get the license uuid so i can assign the license to a specific group, and create activation task. 

     

    tanks in advance

  7. halo, i experienced strange behavior when creating client task via the server api. here is the json request:

    {
    	"Era.Common.NetworkMessage.ConsoleApi.TasksTriggers.RpcCreateClientTaskRequest": {
    		"clientTaskConfiguration": {
    			"taskType": 18,
    			"taskProductActivation": {
    				"eset_license": {
    					"license_uuid": {
    						"uuid": "00000000-0000-0000-7018-000000000001"
    					}
    				}
    			}
    		},
    		"collisionsHandling": 1,
    		"staticObjectData": {
    			"name": "activation",
    			"description": "activation task"
    		}
    	}
    }

    instead of giving a "expected error message" this gives rather strange message. it says the connection is closed, here the json response 

    {
    	"Era.ServerApi.SimpleResponse": {
    		"result": false,
    		"error": "Connection closed."
    	}
    }

    lets say it is true that the connection is closed. why is it closed? what is wrong with my request that makes the connection need to be closed immediately ?

     

    thanks in advance.

  8. halo, my environment : ubuntu, era 6.5. i'm trying to create a policy data based on "built in policy". i can not find the required data ("Binary data of the serialized policy.") for "policyData" attribute. here is my json. i erase the policyData.data content, because it is very long.

    {
    	"Era.Common.NetworkMessage.ConsoleApi.Policies.RpcCreatePolicyRequest": {
    		"staticObjectData": {
    			"name": "Antivirus - Maximum security ole",
    			"description": "Taking advantage of advanced heuristic, LiveGrid, IdleState Scanner, Automatic device scan after connection, SSL filtering. Detection of potentially unsafe, unwanted and suspicious applications is not affected. Exclusions are overwritten."
    		},
    		"policyData": {
    			"data": "long data......----------",
    			"product": "eset.local.products.endpoint"
    		}
    	}
    }

    so far i manage to find the qualified product names they are in the tbl_policies table, but i cant find the "Binary data of the serialized policy." i tried to use the extremely long "policy_data" field from the same data. the JSON reponse was okay, but in the web console the settings panel not working, displaying error message "ERROR WHILE INITIALIZING CONFIGURATION EDITOR". i have no idea what else to try. any insight are welcome.

     

    thanks in advance. 

  9. i try to set add access type for Groups & Computers in my permission set. via serverAPI. here is the json :
     

    {
      "Era.Common.NetworkMessage.ConsoleApi.Security.RpcCreateCompetenceRequest" :
      {
        "staticObjectData":
        {
          "name":"permission_set",
            "description":"permission_set"
        },
    	"accessRights" : [{"accessType":1, "resourceUuid":{"uuid":"00000000-0000-0000-7004-000000000000"}]
     }

    to create access rights "read", "write", or "read use" using 1, 2,and 5 values respectively. i though they were binary "001", "010", "101", which match perfectly with the terms "read", "write", and "read use".  so i can use "111" for functionality "read write use". "111" is 7 if i use this value in the json, the API return error

    {
    	"Era.ServerApi.SimpleResponse": {
    		"result": false,
    		"error": "Can not parse protobuf from message. Json message is: {\"staticObjectData\":{\"name\":\"test\", \"description\":\"test permission set\"},\"accessRights\":[{\"accessType\":7, \"resourceUuid\":{\"uuid\":\"00000000-0000-0000-7004-000000000000\"}}]} ."
    	}
    }

    3 ("011") and 4 ("100") also not working, return success but no permission granted. The accessRight property is not a binary representation of the 3 column ("read", "write", "use"), so how to set an access right to "read write use" ?

  10. hi i'm running era 6.5 on ubuntu. i'm trying to find a way to access uuid from static group id, dynamic group id. I need to get these information for making some automatic operations. But i cant seems to find a way to access those information via JSON. the only way i can figure out how to get those information is via database access. Am i missing something? or accessing the data base is the correct way? 

    thanks

  11. hi MartinK, i've enabled logging to "stdout" and set the message level to "Trace" . i got these output. i still can't figure out what is wrong. 

    here is the full output

    [###]
    initiating libraries, status : ERA_SUCCESS
    logging options
    {"Era.ServerApi.SimpleResponse": {"result":true} }
    status : 0
    start server API
    {"Era.ServerApi.SimpleResponse": {"result":true} }
    status : 0
    create connection
    [{"Era.ServerApi.CreateConnectionRequest":{"port":2223,"host":"127.0.0.1"}}]
    2017-11-03 07:52:54 Information: NetworkModule [Thread 7f9f37fff700]: Received message: CreateConnectionRequest
    2017-11-03 07:52:54 Information: NetworkModule [Thread 7f9f3d64d700]: Forcibly closing sessionId:1, isClosing:0
    2017-11-03 07:52:54 Information: NetworkModule [Thread 7f9f3d64d700]: Removing session 1
    2017-11-03 07:52:54 Information: NetworkModule [Thread 7f9f3d64d700]: Closing connection , session id:1
    2017-11-03 07:52:54 Information: NetworkModule [Thread 7f9f3de4e700]: Sending message: ConnectionFailure
    {"Era.ServerApi.SimpleResponse": {"result":false,"error":"std::bad_cast"} }
    status : 0
    close connection
    {"Era.ServerApi.SimpleResponse": {"result":false,"error":"Active session does not exist"} }
    status : 0
    stop server API
    2017-11-03 07:52:54 Information: NetworkModule [Thread 7f9f42669740]: OnStop. Force: 1, ClientProxy size: 0
    2017-11-03 07:52:54 Information: NetworkModule [Thread 7f9f42669740]: Waiting for shutdown ...
    2017-11-03 07:52:54 Information: NetworkModule [Thread 7f9f42669740]: Stopping main container ...
    2017-11-03 07:52:54 Information: NetworkModule [Thread 7f9f42669740]: CContainer stopping statusLogGenerator
    2017-11-03 07:52:54 Information: NetworkModule [Thread 7f9f42669740]: CContainer stopping requestHandlerConsoleClient
    2017-11-03 07:52:54 Information: NetworkModule [Thread 7f9f42669740]: Stopping RequestHandler. Session count:0
    2017-11-03 07:52:54 Information: NetworkModule [Thread 7f9f42669740]: CContainer stopping invocationJobSchedulerConsole
    2017-11-03 07:52:54 Information: NetworkModule [Thread 7f9f42669740]: Stopping network proxy scheduler ...
    2017-11-03 07:52:54 Information: NetworkModule [Thread 7f9f42669740]: Shutdown complete, ready to get unloaded ...
    {"Era.ServerApi.SimpleResponse": {"result":true} }
    status : 0
    exit lib
    [root

    here are things that happening before the "bad_cast". i cant tell what's wrong there. 

    [{"Era.ServerApi.CreateConnectionRequest":{"port":2223,"host":"127.0.0.1"}}]
    2017-11-03 07:52:54 Information: NetworkModule [Thread 7f9f37fff700]: Received message: CreateConnectionRequest
    2017-11-03 07:52:54 Information: NetworkModule [Thread 7f9f3d64d700]: Forcibly closing sessionId:1, isClosing:0
    2017-11-03 07:52:54 Information: NetworkModule [Thread 7f9f3d64d700]: Removing session 1
    2017-11-03 07:52:54 Information: NetworkModule [Thread 7f9f3d64d700]: Closing connection , session id:1
    2017-11-03 07:52:54 Information: NetworkModule [Thread 7f9f3de4e700]: Sending message: ConnectionFailure
    {"Era.ServerApi.SimpleResponse": {"result":false,"error":"std::bad_cast"} }

     

  12. thank you MartinK

    i'm sure, the server api have not use the port and host data yet. since it's having trouble to read those data right? i wish i could tell which field is  the API trying to cast? and from what type to what type? this is dynamic_cast problem isn't it?

    i did change those values with various possible value, "localhost", 127.0.0.1, direct ip, also try to change the port, possible combinations of both, and no luck. still bad_cast. 

    initiating libraries, status : ERA_SUCCESS
    {"Era.ServerApi.SimpleResponse": {"result":true} }
    status : 0
    [{"Era.ServerApi.CreateConnectionRequest":{"host":"127.0.0.1","port":2223}}]
    {"Era.ServerApi.SimpleResponse": {"result":false,"error":"std::bad_cast"} }

    so, i've confirmed so far the "ConvertProtobufStringToProtobufObject" means malformed json, or unrecognized json element. for the bad_cast i must say it is impossible to hack through, insufficient information. thanks for the help. 

  13. if you read my c++ code on my second post, i already remove the quote around port number, and the response is bad_cast. Since i'm building in linux probably there is some compatibility issue?  here is how i initialize "era_process_request" . 

    void* serverAPI;
    int (*process_request)(const char*, char**);
    
    serverAPI = dlopen("/opt/eset/RemoteAdministrator/Server/ServerApi.so", RTLD_LAZY);
    process_request = reinterpret_cast<int(*)(const char*, char**)>(dlsym(serverAPI, "era_process_request"));

    i mess around with string type, both (const char*) and (char*) produce similar result, bad_cast. 

  14. thank you MartinK.

    woops. my bad, i thought the problem was about wrongly formated input. now i get different message. here is the response message

    {"Era.ServerApi.SimpleResponse": {"result":false,"error":"std::bad_cast"} }

    here is the c++ code

    char* szRes;
    int sendstatus;
    std::string
    createConnectionRequest = "{\"Era.ServerApi.CreateConnectionRequest\":{\"host\":\"";
    createConnectionRequest += host;
    createConnectionRequest += "\",\"port\":";
    createConnectionRequest += port;
    createConnectionRequest += "}}";
    
    szRes = NULL;
    std::cout << "[" << createConnectionRequest << "]\n";
    sendstatus = process_request( createConnectionRequest.c_str(), &szRes);
    if (szRes)
    {
    	std::cout<<szRes<<"\nstatus : " << sendstatus << std::endl;
    	free_response(szRes);
    }

     

    actually if documentation about this error messages, or about "era_init_lib", "era_process_request", "era_deinit_lib", "era_free"  is available somewhere i'd love to know. 

  15. Hi, i'm in the process to make a php extension for Eset Remote Administrator. the process never pass "Era.ServerApi.CreateConnectionRequests" always return error "ConvertProtobufStringToProtobufObject". what may cause this error?

    {"Era.ServerApi.SimpleResponse": {"result":true} }
    ----------------[{"Era.ServerApi.CreateConnectionRequests":{"host":"127.0.0.1","port":"8080"}}]-----------------------
    {"Era.ServerApi.SimpleResponse": {"result":false,"error":"ConvertProtobufStringToProtobufObject failed with: map::at"} }
    {"Era.ServerApi.SimpleResponse": {"result":false,"error":"Active session does not exist"} }
    {"Era.ServerApi.SimpleResponse": {"result":true} }

    my environment : ERA Version 6.5 (6.5.417.0) running on Linux x86_64, gcc version 4.8.5, PHP 5.4.16 (cli and web). 

    thanks in advance

×
×
  • Create New...