How to use the ciphey.__main__.make_default_config function in ciphey

To help you get started, weโ€™ve selected a few ciphey examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github brandonskerritt / Ciphey / tests / test_main_generated.py View on Github external
def test_Hex_thMtzwNN():
    # {'PlainText Sentences': "He then went on to teach and become headmaster of several fairly well known Canadian private schools. That the Order of the House of June 8, 1998, respecting motions pursuant to Standing Order 73 and 78(3) be rescinded. She received 50 complaints about lack of access, financial improprieties and political interference for heaven's sake. There should not be two different paths that applications follow depending strictly on the speed with which the department currently processes. Mr. Paul Szabo (Mississauga South, Lib. Many thousands of Canadian families and their communities are facing a form of extinction. This is a broad view of Quebec's potential, when the province has only part of its tools for economic development. We all agree and yet these things still go on. I must also say on their behalf that it is not right for the government to use closure, so that other citizens cannot hear what we have to say on this issue. The NDP is lucky to even be here and, if the New Brunswick and Ontario elections are any indication, probably will not be here in the future. However, that is not the case. There was an article printed in the Minnedosa Tribune in September that gives an idea of what has happened to the business aspect of our family farms. I support the principle which the member speaks of, but the initiative is perhaps somewhat misplaced in that this motion proposes that the federal government provide the delivery of natural gas to rural regions in Canada. I want to remind the government House leader that, up until yesterday evening, his office was confirming to mine that there was no question of a bill like this. Paul Martin (Minister of Finance, Lib.", 'Encrypted Texts': {'PlainText': "He then went on to teach and become headmaster of several fairly well known Canadian private schools. That the Order of the House of June 8, 1998, respecting motions pursuant to Standing Order 73 and 78(3) be rescinded. She received 50 complaints about lack of access, financial improprieties and political interference for heaven's sake. There should not be two different paths that applications follow depending strictly on the speed with which the department currently processes. Mr. Paul Szabo (Mississauga South, Lib. Many thousands of Canadian families and their communities are facing a form of extinction. This is a broad view of Quebec's potential, when the province has only part of its tools for economic development. We all agree and yet these things still go on. I must also say on their behalf that it is not right for the government to use closure, so that other citizens cannot hear what we have to say on this issue. The NDP is lucky to even be here and, if the New Brunswick and Ontario elections are any indication, probably will not be here in the future. However, that is not the case. There was an article printed in the Minnedosa Tribune in September that gives an idea of what has happened to the business aspect of our family farms. I support the principle which the member speaks of, but the initiative is perhaps somewhat misplaced in that this motion proposes that the federal government provide the delivery of natural gas to rural regions in Canada. I want to remind the government House leader that, up until yesterday evening, his office was confirming to mine that there was no question of a bill like this. Paul Martin (Minister of Finance, Lib.", 'EncryptedText': '4865207468656e2077656e74206f6e20746f20746561636820616e64206265636f6d6520686561646d6173746572206f66207365766572616c20666169726c792077656c6c206b6e6f776e2043616e616469616e2070726976617465207363686f6f6c732e205468617420746865204f72646572206f662074686520486f757365206f66204a756e6520382c20313939382c2072657370656374696e67206d6f74696f6e73207075727375616e7420746f205374616e64696e67204f7264657220373320616e642037382833292062652072657363696e6465642e2053686520726563656976656420353020636f6d706c61696e74732061626f7574206c61636b206f66206163636573732c2066696e616e6369616c20696d70726f707269657469657320616e6420706f6c69746963616c20696e746572666572656e636520666f722068656176656e27732073616b652e2054686572652073686f756c64206e6f742062652074776f20646966666572656e742070617468732074686174206170706c69636174696f6e7320666f6c6c6f7720646570656e64696e67207374726963746c79206f6e20746865207370656564207769746820776869636820746865206465706172746d656e742063757272656e746c792070726f6365737365732e204d722e205061756c20537a61626f20284d6973736973736175676120536f7574682c204c69622e204d616e792074686f7573616e6473206f662043616e616469616e2066616d696c69657320616e6420746865697220636f6d6d756e69746965732061726520666163696e67206120666f726d206f6620657874696e6374696f6e2e205468697320697320612062726f61642076696577206f6620517565626563277320706f74656e7469616c2c207768656e207468652070726f76696e636520686173206f6e6c792070617274206f662069747320746f6f6c7320666f722065636f6e6f6d696320646576656c6f706d656e742e20576520616c6c20616772656520616e6420796574207468657365207468696e6773207374696c6c20676f206f6e2e2049206d75737420616c736f20736179206f6e20746865697220626568616c662074686174206974206973206e6f7420726967687420666f722074686520676f7665726e6d656e7420746f2075736520636c6f737572652c20736f2074686174206f7468657220636974697a656e732063616e6e6f7420686561722077686174207765206861766520746f20736179206f6e20746869732069737375652e20546865204e4450206973206c75636b7920746f206576656e206265206865726520616e642c20696620746865204e6577204272756e737769636b20616e64204f6e746172696f20656c656374696f6e732061726520616e7920696e6469636174696f6e2c2070726f6261626c792077696c6c206e6f74206265206865726520696e20746865206675747572652e20486f77657665722c2074686174206973206e6f742074686520636173652e2054686572652077617320616e2061727469636c65207072696e74656420696e20746865204d696e6e65646f73612054726962756e6520696e2053657074656d626572207468617420676976657320616e2069646561206f662077686174206861732068617070656e656420746f2074686520627573696e65737320617370656374206f66206f75722066616d696c79206661726d732e204920737570706f727420746865207072696e6369706c6520776869636820746865206d656d62657220737065616b73206f662c206275742074686520696e6974696174697665206973207065726861707320736f6d6577686174206d6973706c6163656420696e20746861742074686973206d6f74696f6e2070726f706f736573207468617420746865206665646572616c20676f7665726e6d656e742070726f76696465207468652064656c6976657279206f66206e61747572616c2067617320746f20727572616c20726567696f6e7320696e2043616e6164612e20492077616e7420746f2072656d696e642074686520676f7665726e6d656e7420486f757365206c656164657220746861742c20757020756e74696c20796573746572646179206576656e696e672c20686973206f66666963652077617320636f6e6669726d696e6720746f206d696e65207468617420746865726520776173206e6f207175657374696f6e206f6620612062696c6c206c696b6520746869732e205061756c204d617274696e20284d696e6973746572206f662046696e616e63652c204c69622e', 'CipherUsed': 'Hex'}}
    cfg = make_default_config('''4865207468656e2077656e74206f6e20746f20746561636820616e64206265636f6d6520686561646d6173746572206f66207365766572616c20666169726c792077656c6c206b6e6f776e2043616e616469616e2070726976617465207363686f6f6c732e205468617420746865204f72646572206f662074686520486f757365206f66204a756e6520382c20313939382c2072657370656374696e67206d6f74696f6e73207075727375616e7420746f205374616e64696e67204f7264657220373320616e642037382833292062652072657363696e6465642e2053686520726563656976656420353020636f6d706c61696e74732061626f7574206c61636b206f66206163636573732c2066696e616e6369616c20696d70726f707269657469657320616e6420706f6c69746963616c20696e746572666572656e636520666f722068656176656e27732073616b652e2054686572652073686f756c64206e6f742062652074776f20646966666572656e742070617468732074686174206170706c69636174696f6e7320666f6c6c6f7720646570656e64696e67207374726963746c79206f6e20746865207370656564207769746820776869636820746865206465706172746d656e742063757272656e746c792070726f6365737365732e204d722e205061756c20537a61626f20284d6973736973736175676120536f7574682c204c69622e204d616e792074686f7573616e6473206f662043616e616469616e2066616d696c69657320616e6420746865697220636f6d6d756e69746965732061726520666163696e67206120666f726d206f6620657874696e6374696f6e2e205468697320697320612062726f61642076696577206f6620517565626563277320706f74656e7469616c2c207768656e207468652070726f76696e636520686173206f6e6c792070617274206f662069747320746f6f6c7320666f722065636f6e6f6d696320646576656c6f706d656e742e20576520616c6c20616772656520616e6420796574207468657365207468696e6773207374696c6c20676f206f6e2e2049206d75737420616c736f20736179206f6e20746865697220626568616c662074686174206974206973206e6f7420726967687420666f722074686520676f7665726e6d656e7420746f2075736520636c6f737572652c20736f2074686174206f7468657220636974697a656e732063616e6e6f7420686561722077686174207765206861766520746f20736179206f6e20746869732069737375652e20546865204e4450206973206c75636b7920746f206576656e206265206865726520616e642c20696620746865204e6577204272756e737769636b20616e64204f6e746172696f20656c656374696f6e732061726520616e7920696e6469636174696f6e2c2070726f6261626c792077696c6c206e6f74206265206865726520696e20746865206675747572652e20486f77657665722c2074686174206973206e6f742074686520636173652e2054686572652077617320616e2061727469636c65207072696e74656420696e20746865204d696e6e65646f73612054726962756e6520696e2053657074656d626572207468617420676976657320616e2069646561206f662077686174206861732068617070656e656420746f2074686520627573696e65737320617370656374206f66206f75722066616d696c79206661726d732e204920737570706f727420746865207072696e6369706c6520776869636820746865206d656d62657220737065616b73206f662c206275742074686520696e6974696174697665206973207065726861707320736f6d6577686174206d6973706c6163656420696e20746861742074686973206d6f74696f6e2070726f706f736573207468617420746865206665646572616c20676f7665726e6d656e742070726f76696465207468652064656c6976657279206f66206e61747572616c2067617320746f20727572616c20726567696f6e7320696e2043616e6164612e20492077616e7420746f2072656d696e642074686520676f7665726e6d656e7420486f757365206c656164657220746861742c20757020756e74696c20796573746572646179206576656e696e672c20686973206f66666963652077617320636f6e6669726d696e6720746f206d696e65207468617420746865726520776173206e6f207175657374696f6e206f6620612062696c6c206c696b6520746869732e205061756c204d617274696e20284d696e6973746572206f662046696e616e63652c204c69622e''')
    cfg["debug"] = "TRACE"
    result = main(cfg)

    assert result["IsPlaintext?"] == True
github brandonskerritt / Ciphey / tests / test_main.py View on Github external
def test_main_base64_true():
    result = main(make_default_config("SXQgd2FzIHRoZSBiZXN0IG9mIHRpbWVzLCBpdCB3YXMgdGhlIHdvcnN0IG9mIHRpbWVzLiBUaGVyZSBpcyBvbmx5IHNvIG11Y2ggcm9hZCBpbiBEb3ZlciBvbmUgY2FuIGxheS4="))
    assert (
        result == "It was the best of times, it was the worst of times. There is only so much road in Dover one can lay."
    )
github brandonskerritt / Ciphey / tests / test_main.py View on Github external
def test_argument_grep_true():
    result = main(make_default_config("It was the best of times, it was the worst of times"))
    assert result == "It was the best of times, it was the worst of times"
github brandonskerritt / Ciphey / tests / test_encoding.py View on Github external
import sys

from ciphey.LanguageChecker.brandon import Brandon
from ciphey.Decryptor.Encoding.encodingParent import EncodingParent
from ciphey.__main__ import make_default_config
import unittest
from loguru import logger
import cipheydists


config = make_default_config("")


class TestEncoding(unittest.TestCase):
    def test_english_yes(self):
        lc = Brandon(config)
        ep = EncodingParent(lc)
        result = ep.decrypt("eW91ciB0ZXh0")
        self.assertEqual(result["IsPlaintext?"], True)

    def test_base64_spaces_yes(self):
        lc = Brandon(config)
        ep = EncodingParent(lc)
        result = ep.decrypt("SGVsbG8gSSBsaWtlIGRvZ3MgYW5kIGNhdHM=")
        self.assertEqual(result["IsPlaintext?"], True)

    def test_binary_spaces_yes(self):