Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #56261

Re: Odd-length string

Path csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <python-python-list@m.gmane.org>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.003
X-Spam-Evidence '*H*': 0.99; '*S*': 0.00; 'from:addr:yahoo.co.uk': 0.04; 'ascii': 0.09; 'lawrence': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'subject:string': 0.09; 'translate': 0.10; 'command.': 0.16; 'hex': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'red,': 0.16; 'typeerror:': 0.16; 'wrote:': 0.18; 'code.': 0.18; 'command': 0.22; 'header :User-Agent:1': 0.23; 'bytes': 0.24; 'instance,': 0.24; 'rid': 0.24; 'sort': 0.25; 'skip:" 30': 0.26; 'this:': 0.26; 'header:X -Complaints-To:1': 0.27; 'header:In-Reply-To:1': 0.27; 'idea': 0.28; 'fixed': 0.29; 'lines': 0.31; 'context.': 0.31; 'didnt': 0.31; 'anyone': 0.31; 'file': 0.32; '(most': 0.33; 'guess': 0.33; 'sense': 0.34; 'problem': 0.35; 'problem.': 0.35; 'but': 0.35; 'format.': 0.36; 'replies': 0.36; 'sequence': 0.36; 'expected': 0.38; 'handle': 0.38; 'to:addr:python-list': 0.38; 'recent': 0.39; 'does': 0.39; 'quote': 0.39; 'to:addr:python.org': 0.39; 'enough': 0.39; 'received:org': 0.40; 'how': 0.40; 'most': 0.60; 'new': 0.61; 'first': 0.61; 'email addr:gmail.com': 0.63; 'show': 0.63; 'kind': 0.63; 'received:2': 0.84
X-Injected-Via-Gmane http://gmane.org/
To python-list@python.org
From Mark Lawrence <breamoreboy@yahoo.co.uk>
Subject Re: Odd-length string
Date Sun, 06 Oct 2013 15:56:05 +0100
References <0f1b6cd6-3025-4bdc-8f80-73a51a7ed241@googlegroups.com> <dc7e43a4-2f40-4275-8754-7e947f886fd9@googlegroups.com>
Mime-Version 1.0
Content-Type text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding 8bit
X-Gmane-NNTP-Posting-Host host-2-98-207-126.as13285.net
User-Agent Mozilla/5.0 (Windows NT 6.1; rv:24.0) Gecko/20100101 Thunderbird/24.0
In-Reply-To <dc7e43a4-2f40-4275-8754-7e947f886fd9@googlegroups.com>
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.784.1381071381.18130.python-list@python.org> (permalink)
Lines 25
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1381071381 news.xs4all.nl 15898 [2001:888:2000:d::a6]:35307
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:56261

Show key headers only | View raw


On 06/10/2013 15:37, markotaht@gmail.com wrote:
> I fixed this problem but encountered new problem. Problem was that some parts that came throug my decryption were 00 or 0 the first symbol so the program didnt show them.
>
> NEw problem is : Traceback (most recent call last):
>    File "C:\Users\Marko\Desktop\hacker.org\XOR cypher.py", line 35, in <module>
>      print("Key-" + str(võti) + ": " + str("".join(tulemus2)))
> TypeError: sequence item 0: expected str instance, bytes found
>
> If i  take away the join command i get this: Key-00000000: [b'u', b'o', b'\x00', b'\x1d', b' ', b'|', b'N', b'\x0f', b'9', b'j', b'K', b'J', b'&', b'#', b'A', b'K', b'5', b'k', b'_', b'\x1e', b',', b'j', b'\x0c', b'\x08', b'i', b'(', b'\x06', b'\\', b'r', b'3', b'\x1f', b'V', b's', b'9', b'\x1d']
>
> the Key-00000000 is the key im using to decrypt the code. everything else is generated byt the decrytion process and the unhexlify command. So my guess is, the join command cant handle the b"u" type of format. how can i get rid of the b.
>
> Or does anyone have a better idea how to translate HEX into ASCII and sort out the lines that make sense
>

Will you please be kind enough to quote your replies in context.

-- 
Roses are red,
Violets are blue,
Most poems rhyme,
But this one doesn't.

Mark Lawrence

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Odd-length string markotaht@gmail.com - 2013-10-06 06:10 -0700
  Re: Odd-length string Roy Smith <roy@panix.com> - 2013-10-06 09:46 -0400
  Re: Odd-length string Peter Otten <__peter__@web.de> - 2013-10-06 16:31 +0200
  Re: Odd-length string markotaht@gmail.com - 2013-10-06 07:37 -0700
    Re: Odd-length string Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-10-06 15:56 +0100
    Re: Odd-length string Terry Reedy <tjreedy@udel.edu> - 2013-10-06 15:50 -0400
    Re: Odd-length string Piet van Oostrum <piet@vanoostrum.org> - 2013-10-06 20:59 -0400

csiph-web