All Projects → eleme → Trojan

eleme / Trojan

Licence: apache-2.0
Trojan is an efficient mobile terminal lightweight log SDK

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Trojan

Deployx.sh
基于 Docker 容器架构的 Trojan/VLESS/VMess TCP/WS TLS 分流部署&管理脚本
Stars: ✭ 290 (-19.44%)
Mutual labels:  trojan
Ghost
👻 RAT (Remote Access Trojan) - Silent Botnet - Full Remote Command-Line Access - Download & Execute Programs - Spread Virus' & Malware
Stars: ✭ 312 (-13.33%)
Mutual labels:  trojan
Tslog
📝 tslog - Expressive TypeScript Logger for Node.js.
Stars: ✭ 321 (-10.83%)
Mutual labels:  logging-library
Log4qt
Log4Qt - Logging for the Qt cross-platform application framework
Stars: ✭ 292 (-18.89%)
Mutual labels:  logging-library
Daiquiri
Python library to easily setup basic logging functionality
Stars: ✭ 308 (-14.44%)
Mutual labels:  logging-library
V2ray Rules Dat
🦄 🎃 👻 V2Ray 路由规则文件加强版,可代替 V2Ray 官方 geoip.dat 和 geosite.dat,兼容 Shadowsocks-windows、Xray-core、Trojan-Go 和 leaf。Enhanced edition of V2Ray rules dat files, compatible with Xray-core, Shadowsocks-windows, Trojan-Go and leaf.
Stars: ✭ 6,550 (+1719.44%)
Mutual labels:  trojan
Wire Ios
📱 Wire for iOS (iPhone and iPad)
Stars: ✭ 3,079 (+755.28%)
Mutual labels:  mobile-app
Dvia V2
Damn Vulnerable iOS App (DVIA) is an iOS application that is damn vulnerable. Its main goal is to provide a platform to mobile security enthusiasts/professionals or students to test their iOS penetration testing skills in a legal environment. This project is developed and maintained by @prateekg147. The vulnerabilities and solutions covered in this app are tested up to iOS 11. The current version is writen in Swift and has the following vulnerabilities.
Stars: ✭ 353 (-1.94%)
Mutual labels:  mobile-app
Docker Android
Android in docker solution with noVNC supported and video recording
Stars: ✭ 4,042 (+1022.78%)
Mutual labels:  mobile-app
Nlog.extensions.logging
NLog Provider for Microsoft.Extensions.Logging for .NET Standard libraries and .NET Core applications
Stars: ✭ 323 (-10.28%)
Mutual labels:  logging-library
Buttercup Mobile
📱 React-Native mobile application for Buttercup
Stars: ✭ 297 (-17.5%)
Mutual labels:  mobile-app
Scribe
The fastest logging library in the world. Built from scratch in Scala and programmatically configurable.
Stars: ✭ 304 (-15.56%)
Mutual labels:  logging-library
Stupidkeylogger
A Terrific Keystroke Recorder
Stars: ✭ 318 (-11.67%)
Mutual labels:  trojan
Contraflutterkit
A Flutter UI kit with 50 plus screens for beginners to learn.
Stars: ✭ 288 (-20%)
Mutual labels:  mobile-app
Electron Timber
Pretty logger for Electron apps
Stars: ✭ 337 (-6.39%)
Mutual labels:  logging-library
Adamantium Thief
🔑 Decrypt chromium based browsers passwords, cookies, credit cards, history, bookmarks, autofill. Version > 80 is supported.
Stars: ✭ 283 (-21.39%)
Mutual labels:  trojan
Caffe Mobile
Optimized (for size and speed) Caffe lib for iOS and Android with out-of-the-box demo APP.
Stars: ✭ 316 (-12.22%)
Mutual labels:  mobile-app
Reckless
Reckless logging. Low-latency, high-throughput, asynchronous logging library for C++.
Stars: ✭ 358 (-0.56%)
Mutual labels:  logging-library
2019 Typography Calendar
2019 字体日历 App
Stars: ✭ 342 (-5%)
Mutual labels:  mobile-app
Yo
Lightweight, easy-to-use, configurable, and extensible mobile front-end development framework.
Stars: ✭ 319 (-11.39%)
Mutual labels:  mobile-app

Trojan is a stable and efficient mobile lightweight log SDK that not only records general logs, such as Http, power changes, component life cycles, but also records the definition of the log, which it is useful to analysis problems through the user logs. Here is the following characteristics:

  • Concise API, it is easy to achieve diary record function through a few lines of code;
  • Use the AOP technologies Lancet SDK, it is comfortable to collect common logs, also support incremental compile;
  • Use mmap technology to ensure the efficiency of log records;
  • Scalability, developers can customize the log file to achieve the purpose of the upload;
  • Small traffic overhead, remote control user log file upload or not by online configuration;
  • High stability, it is very stable at many apps.

中文介绍

Overview

In the open source Trojan SDK, we have collected basic logs such as Activity and Fragment lifecycles, View Click events, network status changes, phone battery status changes, also include collecting KLog logs, if KLog is not used in the project, it can be customized according to the project specific conditions. Considering that the implementation framework for network modules is different at fact, there are OkHttp, Volley, Android-Async-Http, etc. Therefore, this part of collecting network logs is not suitable for customization. Users can use Lancet to collect logs at the specific network framework. In Demo, we can achieve acquisition Http request and response functions in OkHttp, it can be used as a reference. As for business-related logs, users should collect by self.

Installation

Add in the root directory's build.gradle:

buildscript {
    dependencies {
        ......
        classpath 'me.ele:lancet-plugin:1.0.2'
    }
}

Add in the app directory's build.gradle:

apply plugin: 'me.ele.lancet'

dependencies {
    ......
    provided 'me.ele:lancet-base:1.0.2'
    compile 'me.ele:trojan-library:0.0.5'
}

Use

1. Initialization

Add in the custom Application:

TrojanConfig config = new TrojanConfig.Builder(this)
    // Set user information
    .userInfo("xxxx")
    // Set device id
    .deviceId("xxxx")
    // Set cipher key if need encry log
    .cipherKey("xxxx")
    // Optional, save log file in sdcard by default
    .logDir("xxxx")
    // Console log switch, the default is open
    .enableLog(true)
    .build();
Trojan.init(config);

Special Note:

  1. The log files are stored in sdcard by default and will not be lost even if the application is uninstalled;
  2. To be compatible with multiple processes, log files stored in their respective directories;
  3. The log is not encrypted by default, we currently only provide TEA encryption in view for high efficiency。

2. Record the log

Trojan provides two ways to recode log:

Firstly:

Trojan.log("Trojan", "We have a nice day!");

Secondly:

List<String> msgList = new LinkedList <>();
msgList.add("Hello Trojan!");
msgList.add("We have a nice day!");
msgList.add("Hello world!");
Trojan.log("Trojan", msgList);

By default, a single line log is not encrypted, and if you need to encrypt it, the following is used:

Trojan.log("Trojan", "We have a nice day!", true);

3. User Information

When the user information changes or switch users, you can call:

Trojan.refreshUser("new user info");

Of course, if the user logs out, you can pass a null value:

Trojan.refreshUser(null);

4. Upload Solution

In Demo we provided free and simple way such as LeanCloud to upload log file, you can browse, download and download log file.

5. Data Decryption

When we set the encryption key, we can encrypt a single log to ensure the security of sensitive data. We must decrypt the encrypted data When we analyze the log. Use the decryption script as follows:

  1. Compile and generate decryption SO library on MAC, The so library has been generated in the repository. This step can be omitted:

    gcc -shared -Wl,-install_name,trojan_decrypt.so -o trojan_decrypt.so -fPIC trojan_decrypt.c
    
    
  2. Call python script to decrypt the data on MAC, you need to pass in the decryption key and file path to be decrypted, it should be noted that the path of the python script:

    python ./trojan_decrypt.py cipher-key cipher-file-path
    
    

PS

Through the above steps, you can integrate Trojan SDK to record user's log, That is very simple! If you have any questions about the use of Lancet, you can get more details by Readme.

License

Trojan is available under the Apache-2.0 license. See the LICENSE file for more info.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].