コード例 #1
0
ファイル: elm.py プロジェクト: altelch/ddt4all
   Borrowed from PyRen (modified for this use)
'''

import options

import serial
from serial.tools import list_ports

import sys
import os
import re
import time
import string
from datetime import datetime

_ = options.translator('elm')

snat = {
    "01": "760",
    "02": "724",
    "04": "762",
    "07": "771",
    "08": "778",
    "0D": "775",
    "0E": "76E",
    "0F": "770",
    "13": "732",
    "1B": "7AC",
    "1C": "76B",
    "1E": "768",
    "23": "773",
コード例 #2
0
# -*- coding: utf-8 -*-

# Plugin to program keys on Megane II
# (c) 2017
# This is an example plugin

import PyQt4.QtGui as gui
import PyQt4.QtCore as core
import ecu
import elm
import options

_ = options.translator('ddt4all')

plugin_name = _("Megane/Scenic II card programming")
category = _("Keys")
need_hw = True
ecufile = "UCH_84_J84_03_60"

a8_mess = [
    19, 29, 39, 4, 24, 46, 31, 12, 16, 28, 7, 10, 15, 0, 40, 26, 18, 20, 3, 8,
    34, 8, 47, 21, 2, 25, 38, 6, 4, 22, 14, 33, 17, 1, 44, 11, 32, 41, 36, 42,
    5, 45, 5, 43, 30, 37, 13, 27
]

a8_xor = [0x10, 0x20, 0x20, 0x10, 0x81, 0x88]
a8_xor_2 = [0x10, 0x20, 0x28, 0x10, 0x81, 0x88]


def a8(isk_c):
    '''MC9S12DG256 (Megane 2, Scenic 2)'''
コード例 #3
0
import sniffer
import imp
import traceback
import tempfile, errno
import codecs

__author__ = "Cedric PAILLE"
__copyright__ = "Copyright 2016-2018"
__credits__ = []
__license__ = "GPL"
__version__ = "1.0.0"
__maintainer__ = "Cedric PAILLE"
__email__ = "*****@*****.**"
__status__ = "Beta"

_ = options.translator('ddt4all_main')
app = None
sys.stdout = codecs.getwriter('utf8')(sys.stdout)

def isWritable(path):
    try:
        testfile = tempfile.TemporaryFile(dir = path)
        testfile.close()
    except OSError as e:
        if e.errno == errno.EACCES:  # 13
            return False
        e.filename = path
    except:
        return False
    return True