개인을 식별하는 방법
아래의 것들을 이용해서 개인을 구별할 수 있다.
- 고유 개인 식별자
- 장치 식별자
- 쿠키
- 비콘
- 픽셀 태그
- 모바일 광고 식별자 및 유사 기술
- 기타 형태의 영구 식별자 또는 확률적 식별자
- 온라인 식별자
- 인터넷 프로토콜 주소
References
- 칼럼ㅣ삼성이 당신의 데이터를 팔고 있을 수 있다 - CIO Korea, 2020-01-29
'use strict'; const amqplib = require('amqplib'); const Logger = use('Logger'); class MsgIssuer { constructor() { // for test this.rabbitMqUrl = 'amqp://userid:userpw@192.168.10.136//'; } issueTask() { this._issuing('tasks.issueTask', {}, 'cbill0'); } _issuing(task, kwargs, idHead) { const open = amqplib.connect(this.rabbitMqUrl); const body = { id: `${idHead}-${(new Date()).getTime()}`, task: task, args: [], kwargs, retries: 0, timelimit: [null, null], } // Publisher const routingKey = 'celery'; open.then(function (conn) { return conn.createChannel(); }).then(function (ch) { // return ch.purgeQueue(routingKey); // to purge message in the queue return ch.assertQueue(routingKey) .then(function (ok) { return ch.sendToQueue( routingKey, Buffer.from(JSON.stringify(body)), { contentType: 'application/json', contentEncoding: 'UTF-8', deliveryMode: 1, }); }); }).catch(Logger.error); } } module.exports = MsgIssuer;
import pika import json parameters = pika.URLParameters( "amqp://id:pass@14.14.117.10/%2F" ) connection = pika.BlockingConnection(parameters) ch = connection.channel() ch.queue_declare(queue="celery", durable=True) ch.basic_publish( exchange="celery", routing_key="celery", body=json.dumps( { "id": "myid", "task": "task.tasks.mytask", "args": [], "kwargs": { "mykey1": "123", "mykey2": "456", }, "retries": 0, } ), properties=pika.BasicProperties( content_type="application/json", content_encoding="utf-8" ), )
sudo rabbitmq-plugins enable rabbitmq_management
curl http://localhost:15672/cli/rabbitmqadmin > rabbitmqadmin
python rabbitmqadmin.py list queues vhost name messages
python rabbitmqadmin.py list exchanges
# 그냥 rabbitmqctl 로도 가능하다
sudo rabbitmqctl list_queues name messages messages_ready messages_unacknowledged
rabbitmqadmin purge queue name=name_of_the_queue_to_be_purged
python3 rabbitmqadmin.py delete queue name='celery' choco install fzf
c:\> dir c: /b /s | fzf
dir /b /s | fzf) 이것은 일단 file 을 전부 보여주는 시간이 오래 걸려서 유용하지 않다.dir "\*.mp4" /b /s 등) 과 함께 사용하는 건 괜찮을 듯도 하다.windows 환경 - cpu : i3-2100 3.1GHz - RAM : 8GB
module.exports = function(opts) { if( typeof(opts) == 'string' ) { opts = { key: opts, hmac: true, debug: false }; } var key = opts.key; var verifyHmac = opts.hmac; var debug = opts.debug; var reviver = opts.reviver; ... // Use SHA-256 to derive a 32-byte key from the specified string. // NOTE: We could alternatively do some kind of key stretching here. var cryptoKey = crypto.createHash('sha256').update(key).digest(); ... function decrypt(cipherText) { if( !cipherText ) { return null; } try { if( verifyHmac ) { // Extract the HMAC from the start of the message: var expectedHmac = cipherText.substring(0, 64); // The remaining message is the IV + encrypted message: cipherText = cipherText.substring(64); // Calculate the actual HMAC of the message: var actualHmac = hmac(cipherText); if( !scmp(Buffer.from(actualHmac, 'hex'), Buffer.from(expectedHmac, 'hex')) ) { throw new Error('HMAC does not match'); } } // Extract the IV from the beginning of the message: var iv = new Buffer(cipherText.substring(0,32), 'hex'); // The remaining text is the encrypted JSON: var encryptedJson = cipherText.substring(32); // Make sure to use the 'iv' variant when creating the decipher object: var decipher = crypto.createDecipheriv('aes256', cryptoKey, iv); // Decrypt the JSON: var json = decipher.update(encryptedJson, 'base64', 'utf8') + decipher.final('utf8'); // Return the parsed object: return JSON.parse(json, reviver); } catch( e ) { // If we get an error log it and ignore it. Decrypting should never fail. if( debug ) { console.error('Exception in decrypt (ignored): %s', e); } return null; } }
class NodeSimpleEncrypter: """ """ KEY = b"FFfBEVh5Dr1BhJiEi3mnCsB6nByGv1iL" IV_LEN = 16 def __init__(self): pass @staticmethod def decryptForV2(value): m = hashlib.sha256() m.update(NodeSimpleEncrypter.KEY) key = m.digest() cipherText = value[64:] ivstr = cipherText[:32] iv = binascii.unhexlify(ivstr) encodedBody = cipherText[32:] body = base64.b64decode(encodedBody) # CBC MODE # https://gist.github.com/forkd/168c9d74b988391e702aac5f4aa69e41 # https://pycryptodome.readthedocs.io/en/latest/src/cipher/classic.html#cbc-mode aes = AES.new(key=key, mode=AES.MODE_CBC, iv=iv) return unpad(aes.decrypt(body), AES.block_size)
banner_image 로 설정했다. 그랬더니 firefox 에서 보이지 않게 됐다. 그래서 다른 class name (banner 가 들어가지 않은) 으로 변경하였다.