Flawfinder version 2.0.10, (C) 2001-2019 David A. Wheeler.
Number of rules (primarily dangerous function names) in C/C++ ruleset: 223
Examining data/trojan-1.16.0/src/core/authenticator.cpp
Examining data/trojan-1.16.0/src/core/authenticator.h
Examining data/trojan-1.16.0/src/core/config.cpp
Examining data/trojan-1.16.0/src/core/config.h
Examining data/trojan-1.16.0/src/core/log.cpp
Examining data/trojan-1.16.0/src/core/log.h
Examining data/trojan-1.16.0/src/core/service.cpp
Examining data/trojan-1.16.0/src/core/service.h
Examining data/trojan-1.16.0/src/core/version.cpp
Examining data/trojan-1.16.0/src/core/version.h
Examining data/trojan-1.16.0/src/main.cpp
Examining data/trojan-1.16.0/src/proto/socks5address.cpp
Examining data/trojan-1.16.0/src/proto/socks5address.h
Examining data/trojan-1.16.0/src/proto/trojanrequest.cpp
Examining data/trojan-1.16.0/src/proto/trojanrequest.h
Examining data/trojan-1.16.0/src/proto/udppacket.cpp
Examining data/trojan-1.16.0/src/proto/udppacket.h
Examining data/trojan-1.16.0/src/session/clientsession.cpp
Examining data/trojan-1.16.0/src/session/clientsession.h
Examining data/trojan-1.16.0/src/session/forwardsession.cpp
Examining data/trojan-1.16.0/src/session/forwardsession.h
Examining data/trojan-1.16.0/src/session/natsession.cpp
Examining data/trojan-1.16.0/src/session/natsession.h
Examining data/trojan-1.16.0/src/session/serversession.cpp
Examining data/trojan-1.16.0/src/session/serversession.h
Examining data/trojan-1.16.0/src/session/session.cpp
Examining data/trojan-1.16.0/src/session/session.h
Examining data/trojan-1.16.0/src/session/udpforwardsession.cpp
Examining data/trojan-1.16.0/src/session/udpforwardsession.h
Examining data/trojan-1.16.0/src/ssl/ssldefaults.cpp
Examining data/trojan-1.16.0/src/ssl/ssldefaults.h
Examining data/trojan-1.16.0/src/ssl/sslsession.cpp
Examining data/trojan-1.16.0/src/ssl/sslsession.h

FINAL RESULTS:

data/trojan-1.16.0/src/core/service.cpp:256:20:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
            boost::system::error_code ec;
data/trojan-1.16.0/src/core/service.cpp:300:12:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
    boost::system::error_code ec;
data/trojan-1.16.0/src/core/service.cpp:320:89:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
    socket_acceptor.async_accept(session->accept_socket(), [this, session](const boost::system::error_code error) {
data/trojan-1.16.0/src/core/service.cpp:326:20:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
            boost::system::error_code ec;
data/trojan-1.16.0/src/core/service.cpp:338:121:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
    udp_socket.async_receive_from(boost::asio::buffer(udp_read_buf, MAX_LENGTH), udp_recv_endpoint, [this](const boost::system::error_code error, size_t length) {
data/trojan-1.16.0/src/core/service.cpp:361:20:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
            boost::system::error_code ec;
data/trojan-1.16.0/src/core/service.cpp:385:16:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
        boost::system::error_code ec;
data/trojan-1.16.0/src/main.cpp:40:37:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
    sig.async_wait([&](const boost::system::error_code error, int signum) {
data/trojan-1.16.0/src/session/clientsession.cpp:40:12:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
    boost::system::error_code ec;
data/trojan-1.16.0/src/session/clientsession.cpp:62:103:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
    in_socket.async_read_some(boost::asio::buffer(in_read_buf, MAX_LENGTH), [this, self](const boost::system::error_code error, size_t length) {
data/trojan-1.16.0/src/session/clientsession.cpp:77:111:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
    boost::asio::async_write(in_socket, boost::asio::buffer(*data_copy), [this, self, data_copy](const boost::system::error_code error, size_t) {
data/trojan-1.16.0/src/session/clientsession.cpp:88:105:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
    out_socket.async_read_some(boost::asio::buffer(out_read_buf, MAX_LENGTH), [this, self](const boost::system::error_code error, size_t length) {
data/trojan-1.16.0/src/session/clientsession.cpp:100:112:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
    boost::asio::async_write(out_socket, boost::asio::buffer(*data_copy), [this, self, data_copy](const boost::system::error_code error, size_t) {
data/trojan-1.16.0/src/session/clientsession.cpp:111:127:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
    udp_socket.async_receive_from(boost::asio::buffer(udp_read_buf, MAX_LENGTH), udp_recv_endpoint, [this, self](const boost::system::error_code error, size_t length) {
data/trojan-1.16.0/src/session/clientsession.cpp:126:110:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
    udp_socket.async_send_to(boost::asio::buffer(*data_copy), endpoint, [this, self, data_copy](const boost::system::error_code error, size_t) {
data/trojan-1.16.0/src/session/clientsession.cpp:176:24:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
                boost::system::error_code ec;
data/trojan-1.16.0/src/session/clientsession.cpp:225:113:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
            resolver.async_resolve(config.remote_addr, to_string(config.remote_port), [this, self](const boost::system::error_code error, const tcp::resolver::results_type& results) {
data/trojan-1.16.0/src/session/clientsession.cpp:233:24:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
                boost::system::error_code ec;
data/trojan-1.16.0/src/session/clientsession.cpp:248:28:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
                    boost::system::error_code ec;
data/trojan-1.16.0/src/session/clientsession.cpp:252:92:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
                out_socket.next_layer().async_connect(*iterator, [this, self](const boost::system::error_code error) {
data/trojan-1.16.0/src/session/clientsession.cpp:258:95:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
                    out_socket.async_handshake(stream_base::client, [this, self](const boost::system::error_code error) {
data/trojan-1.16.0/src/session/clientsession.cpp:273:32:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
                        boost::system::error_code ec;
data/trojan-1.16.0/src/session/clientsession.cpp:387:12:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
    boost::system::error_code ec;
data/trojan-1.16.0/src/session/clientsession.cpp:400:58:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
        auto ssl_shutdown_cb = [this, self](const boost::system::error_code error) {
data/trojan-1.16.0/src/session/clientsession.cpp:404:20:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
            boost::system::error_code ec;
data/trojan-1.16.0/src/session/forwardsession.cpp:39:12:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
    boost::system::error_code ec;
data/trojan-1.16.0/src/session/forwardsession.cpp:60:105:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
    resolver.async_resolve(config.remote_addr, to_string(config.remote_port), [this, self](const boost::system::error_code error, const tcp::resolver::results_type& results) {
data/trojan-1.16.0/src/session/forwardsession.cpp:68:16:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
        boost::system::error_code ec;
data/trojan-1.16.0/src/session/forwardsession.cpp:83:20:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
            boost::system::error_code ec;
data/trojan-1.16.0/src/session/forwardsession.cpp:87:84:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
        out_socket.next_layer().async_connect(*iterator, [this, self](const boost::system::error_code error) {
data/trojan-1.16.0/src/session/forwardsession.cpp:93:87:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
            out_socket.async_handshake(stream_base::client, [this, self](const boost::system::error_code error) {
data/trojan-1.16.0/src/session/forwardsession.cpp:108:24:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
                boost::system::error_code ec;
data/trojan-1.16.0/src/session/forwardsession.cpp:122:103:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
    in_socket.async_read_some(boost::asio::buffer(in_read_buf, MAX_LENGTH), [this, self](const boost::system::error_code error, size_t length) {
data/trojan-1.16.0/src/session/forwardsession.cpp:137:111:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
    boost::asio::async_write(in_socket, boost::asio::buffer(*data_copy), [this, self, data_copy](const boost::system::error_code error, size_t) {
data/trojan-1.16.0/src/session/forwardsession.cpp:148:105:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
    out_socket.async_read_some(boost::asio::buffer(out_read_buf, MAX_LENGTH), [this, self](const boost::system::error_code error, size_t length) {
data/trojan-1.16.0/src/session/forwardsession.cpp:160:112:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
    boost::asio::async_write(out_socket, boost::asio::buffer(*data_copy), [this, self, data_copy](const boost::system::error_code error, size_t) {
data/trojan-1.16.0/src/session/forwardsession.cpp:205:12:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
    boost::system::error_code ec;
data/trojan-1.16.0/src/session/forwardsession.cpp:214:58:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
        auto ssl_shutdown_cb = [this, self](const boost::system::error_code error) {
data/trojan-1.16.0/src/session/forwardsession.cpp:218:20:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
            boost::system::error_code ec;
data/trojan-1.16.0/src/session/natsession.cpp:81:12:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
    boost::system::error_code ec;
data/trojan-1.16.0/src/session/natsession.cpp:109:105:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
    resolver.async_resolve(config.remote_addr, to_string(config.remote_port), [this, self](const boost::system::error_code error, const tcp::resolver::results_type& results) {
data/trojan-1.16.0/src/session/natsession.cpp:117:16:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
        boost::system::error_code ec;
data/trojan-1.16.0/src/session/natsession.cpp:132:20:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
            boost::system::error_code ec;
data/trojan-1.16.0/src/session/natsession.cpp:136:84:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
        out_socket.next_layer().async_connect(*iterator, [this, self](const boost::system::error_code error) {
data/trojan-1.16.0/src/session/natsession.cpp:142:87:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
            out_socket.async_handshake(stream_base::client, [this, self](const boost::system::error_code error) {
data/trojan-1.16.0/src/session/natsession.cpp:157:24:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
                boost::system::error_code ec;
data/trojan-1.16.0/src/session/natsession.cpp:171:103:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
    in_socket.async_read_some(boost::asio::buffer(in_read_buf, MAX_LENGTH), [this, self](const boost::system::error_code error, size_t length) {
data/trojan-1.16.0/src/session/natsession.cpp:186:111:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
    boost::asio::async_write(in_socket, boost::asio::buffer(*data_copy), [this, self, data_copy](const boost::system::error_code error, size_t) {
data/trojan-1.16.0/src/session/natsession.cpp:197:105:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
    out_socket.async_read_some(boost::asio::buffer(out_read_buf, MAX_LENGTH), [this, self](const boost::system::error_code error, size_t length) {
data/trojan-1.16.0/src/session/natsession.cpp:209:112:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
    boost::asio::async_write(out_socket, boost::asio::buffer(*data_copy), [this, self, data_copy](const boost::system::error_code error, size_t) {
data/trojan-1.16.0/src/session/natsession.cpp:254:12:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
    boost::system::error_code ec;
data/trojan-1.16.0/src/session/natsession.cpp:263:58:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
        auto ssl_shutdown_cb = [this, self](const boost::system::error_code error) {
data/trojan-1.16.0/src/session/natsession.cpp:267:20:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
            boost::system::error_code ec;
data/trojan-1.16.0/src/session/serversession.cpp:41:12:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
    boost::system::error_code ec;
data/trojan-1.16.0/src/session/serversession.cpp:49:78:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
    in_socket.async_handshake(stream_base::server, [this, self](const boost::system::error_code error) {
data/trojan-1.16.0/src/session/serversession.cpp:54:127:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
                boost::asio::async_write(accept_socket(), boost::asio::buffer(plain_http_response), [this, self](const boost::system::error_code, size_t) {
data/trojan-1.16.0/src/session/serversession.cpp:68:103:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
    in_socket.async_read_some(boost::asio::buffer(in_read_buf, MAX_LENGTH), [this, self](const boost::system::error_code error, size_t length) {
data/trojan-1.16.0/src/session/serversession.cpp:80:111:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
    boost::asio::async_write(in_socket, boost::asio::buffer(*data_copy), [this, self, data_copy](const boost::system::error_code error, size_t) {
data/trojan-1.16.0/src/session/serversession.cpp:91:105:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
    out_socket.async_read_some(boost::asio::buffer(out_read_buf, MAX_LENGTH), [this, self](const boost::system::error_code error, size_t length) {
data/trojan-1.16.0/src/session/serversession.cpp:103:112:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
    boost::asio::async_write(out_socket, boost::asio::buffer(*data_copy), [this, self, data_copy](const boost::system::error_code error, size_t) {
data/trojan-1.16.0/src/session/serversession.cpp:114:127:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
    udp_socket.async_receive_from(boost::asio::buffer(udp_read_buf, MAX_LENGTH), udp_recv_endpoint, [this, self](const boost::system::error_code error, size_t length) {
data/trojan-1.16.0/src/session/serversession.cpp:126:110:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
    udp_socket.async_send_to(boost::asio::buffer(*data_copy), endpoint, [this, self, data_copy](const boost::system::error_code error, size_t) {
data/trojan-1.16.0/src/session/serversession.cpp:186:106:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
        resolver.async_resolve(query_addr, query_port, [this, self, query_addr, query_port](const boost::system::error_code error, const tcp::resolver::results_type& results) {
data/trojan-1.16.0/src/session/serversession.cpp:203:20:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
            boost::system::error_code ec;
data/trojan-1.16.0/src/session/serversession.cpp:218:24:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
                boost::system::error_code ec;
data/trojan-1.16.0/src/session/serversession.cpp:222:99:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
            out_socket.async_connect(*iterator, [this, self, query_addr, query_port](const boost::system::error_code error) {
data/trojan-1.16.0/src/session/serversession.cpp:295:126:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
        udp_resolver.async_resolve(query_addr, to_string(packet.address.port), [this, self, packet, query_addr](const boost::system::error_code error, const udp::resolver::results_type& results) {
data/trojan-1.16.0/src/session/serversession.cpp:314:24:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
                boost::system::error_code ec;
data/trojan-1.16.0/src/session/serversession.cpp:338:12:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
    boost::system::error_code ec;
data/trojan-1.16.0/src/session/serversession.cpp:352:58:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
        auto ssl_shutdown_cb = [this, self](const boost::system::error_code error) {
data/trojan-1.16.0/src/session/serversession.cpp:356:20:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
            boost::system::error_code ec;
data/trojan-1.16.0/src/session/udpforwardsession.cpp:60:105:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
    resolver.async_resolve(config.remote_addr, to_string(config.remote_port), [this, self](const boost::system::error_code error, const tcp::resolver::results_type& results) {
data/trojan-1.16.0/src/session/udpforwardsession.cpp:68:16:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
        boost::system::error_code ec;
data/trojan-1.16.0/src/session/udpforwardsession.cpp:83:20:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
            boost::system::error_code ec;
data/trojan-1.16.0/src/session/udpforwardsession.cpp:87:84:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
        out_socket.next_layer().async_connect(*iterator, [this, self](const boost::system::error_code error) {
data/trojan-1.16.0/src/session/udpforwardsession.cpp:93:87:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
            out_socket.async_handshake(stream_base::client, [this, self](const boost::system::error_code error) {
data/trojan-1.16.0/src/session/udpforwardsession.cpp:127:105:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
    out_socket.async_read_some(boost::asio::buffer(out_read_buf, MAX_LENGTH), [this, self](const boost::system::error_code error, size_t length) {
data/trojan-1.16.0/src/session/udpforwardsession.cpp:139:112:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
    boost::asio::async_write(out_socket, boost::asio::buffer(*data_copy), [this, self, data_copy](const boost::system::error_code error, size_t) {
data/trojan-1.16.0/src/session/udpforwardsession.cpp:152:51:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
    gc_timer.async_wait([this, self](const boost::system::error_code error) {
data/trojan-1.16.0/src/session/udpforwardsession.cpp:225:58:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
        auto ssl_shutdown_cb = [this, self](const boost::system::error_code error) {
data/trojan-1.16.0/src/session/udpforwardsession.cpp:229:20:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
            boost::system::error_code ec;
data/trojan-1.16.0/src/session/udpforwardsession.cpp:235:16:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
        boost::system::error_code ec;
data/trojan-1.16.0/src/core/config.cpp:117:18:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    char *JSON = getenv("SS_PLUGIN_OPTIONS");
data/trojan-1.16.0/src/core/config.cpp:124:26:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
            local_addr = getenv("SS_REMOTE_HOST");
data/trojan-1.16.0/src/core/config.cpp:125:31:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
            local_port = atoi(getenv("SS_REMOTE_PORT"));
data/trojan-1.16.0/src/core/config.cpp:131:27:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
            remote_addr = getenv("SS_REMOTE_HOST");
data/trojan-1.16.0/src/core/config.cpp:132:32:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
            remote_port = atoi(getenv("SS_REMOTE_PORT"));
data/trojan-1.16.0/src/core/config.cpp:133:26:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
            local_addr = getenv("SS_LOCAL_HOST");
data/trojan-1.16.0/src/core/config.cpp:134:31:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
            local_port = atoi(getenv("SS_LOCAL_PORT"));
data/trojan-1.16.0/src/core/config.cpp:125:26:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
            local_port = atoi(getenv("SS_REMOTE_PORT"));
data/trojan-1.16.0/src/core/config.cpp:132:27:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
            remote_port = atoi(getenv("SS_REMOTE_PORT"));
data/trojan-1.16.0/src/core/config.cpp:134:26:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
            local_port = atoi(getenv("SS_LOCAL_PORT"));
data/trojan-1.16.0/src/core/config.cpp:142:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char mdString[(EVP_MAX_MD_SIZE << 1) + 1];
data/trojan-1.16.0/src/core/config.cpp:162:9:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
        sprintf(mdString + (i << 1), "%02x", (unsigned int)digest[i]);
data/trojan-1.16.0/src/core/log.cpp:69:16:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    FILE *fp = fopen(filename.c_str(), "a");
data/trojan-1.16.0/src/core/log.cpp:80:16:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    FILE *fp = fopen(filename.c_str(), "a");
data/trojan-1.16.0/src/core/service.cpp:61:25:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        socket_acceptor.open(listen_endpoint.protocol());
data/trojan-1.16.0/src/core/service.cpp:76:24:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
            udp_socket.open(udp_bind_endpoint.protocol());
data/trojan-1.16.0/src/proto/socks5address.cpp:59:17:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
                char t[40];
data/trojan-1.16.0/src/proto/socks5address.cpp:60:17:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
                sprintf(t, "%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x",
data/trojan-1.16.0/src/session/clientsession.cpp:177:28:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
                udp_socket.open(bindpoint.protocol(), ec);
data/trojan-1.16.0/src/session/clientsession.cpp:234:41:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
                out_socket.next_layer().open(iterator->endpoint().protocol(), ec);
data/trojan-1.16.0/src/session/forwardsession.cpp:69:33:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        out_socket.next_layer().open(iterator->endpoint().protocol(), ec);
data/trojan-1.16.0/src/session/natsession.cpp:63:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char ipstr[INET6_ADDRSTRLEN];
data/trojan-1.16.0/src/session/natsession.cpp:118:33:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        out_socket.next_layer().open(iterator->endpoint().protocol(), ec);
data/trojan-1.16.0/src/session/serversession.cpp:204:24:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
            out_socket.open(iterator->endpoint().protocol(), ec);
data/trojan-1.16.0/src/session/serversession.cpp:315:28:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
                udp_socket.open(protocol, ec);
data/trojan-1.16.0/src/session/udpforwardsession.cpp:69:33:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        out_socket.next_layer().open(iterator->endpoint().protocol(), ec);

ANALYSIS SUMMARY:

Hits = 108
Lines analyzed = 3632 in approximately 0.14 seconds (26084 lines/second)
Physical Source Lines of Code (SLOC) = 2815
Hits@level = [0]   2 [1]   0 [2]  19 [3]   7 [4]  82 [5]   0
Hits@level+ = [0+] 110 [1+] 108 [2+] 108 [3+]  89 [4+]  82 [5+]   0
Hits/KSLOC@level+ = [0+] 39.0764 [1+] 38.3659 [2+] 38.3659 [3+] 31.6163 [4+] 29.1297 [5+]   0
Dot directories skipped = 2 (--followdotdir overrides)
Minimum risk level = 1
Not every hit is necessarily a security vulnerability.
There may be other security vulnerabilities; review your code!
See 'Secure Programming HOWTO'
(https://dwheeler.com/secure-programs) for more information.