path stringlengths 9 117 | type stringclasses 2
values | project stringclasses 10
values | commit_hash stringlengths 40 40 | commit_message stringlengths 1 137 | ground_truth stringlengths 0 2.74k | main_code stringlengths 102 3.37k | context stringlengths 0 14.7k |
|---|---|---|---|---|---|---|---|
LanguageChecker/languageChecker.__init__ | Modified | Ciphey~Ciphey | 21adbd61fb2fb19bd135b1c0107c82b4f0c704bb | worked on chi squared and started building a new maths helper class | <5>:<add> self.average = 0.0
<add> self.totalDone = 0.0
<add> self.oldAverage = 0.0
| # module: LanguageChecker
class languageChecker:
def __init__(self):
<0> self.languages = {
<1> "English":
<2> [0.0855, 0.0160, 0.0316, 0.0387, 0.1210,0.0218, 0.0209, 0.0496, 0.0733, 0.0022,0.0081, 0.0421, 0.0253, 0.0717, 0.0747,0.0207, 0.0010, 0.0633, 0.067... | ===========unchanged ref 0===========
at: collections
OrderedDict(map: Mapping[_KT, _VT], **kwargs: _VT)
OrderedDict(**kwargs: _VT)
OrderedDict(iterable: Iterable[Tuple[_KT, _VT]], **kwargs: _VT)
===========changed ref 0===========
# module: LanguageChecker
+ """
+ ββββββ... |
LanguageChecker/languageChecker.chiSquared | Modified | Ciphey~Ciphey | 21adbd61fb2fb19bd135b1c0107c82b4f0c704bb | worked on chi squared and started building a new maths helper class | <8>:<add> # if letter is not puncuation, but it is still ascii
<add> # it's probably a different language so add it to the dict
<add> if letter not in punctuation and self.isAscii(letter) :
<add> letterFreq[letter] = 1
<add> ... | # module: LanguageChecker
class languageChecker:
def chiSquared(self, text):
<0> print(text)
<1> # creates letter frequency of the text
<2> # do this so it matches up with the list
<3> letterFreq = {'a': 0, 'b': 0, 'c': 0, 'd': 0, 'e': 0, 'f': 0, 'g': 0, ... | ===========unchanged ref 0===========
at: LanguageChecker.languageChecker
isAscii(letter)
at: LanguageChecker.languageChecker.chiSquared
self.oldAverage = self.average
self.totalDone += 1
self.average = self.average + (chisquare / self.totalDone)
at: strin... |
LanguageChecker/languageChecker.__init__ | Modified | Ciphey~Ciphey | 5cc0944997e03729712b9f313350df9f045b7669 | added dictionary and worked on english processor | <8>:<add> self.mh = mathsHelper.mathsHelper()
<add> self.totalWordsTried = 0.0
| # module: LanguageChecker
class languageChecker:
def __init__(self):
<0> self.languages = {
<1> "English":
<2> [0.0855, 0.0160, 0.0316, 0.0387, 0.1210,0.0218, 0.0209, 0.0496, 0.0733, 0.0022,0.0081, 0.0421, 0.0253, 0.0717, 0.0747,0.0207, 0.0010, 0.0633, 0.067... | ===========unchanged ref 0===========
at: collections
OrderedDict(map: Mapping[_KT, _VT], **kwargs: _VT)
OrderedDict(**kwargs: _VT)
OrderedDict(iterable: Iterable[Tuple[_KT, _VT]], **kwargs: _VT)
at: string
punctuation = r"""!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~"""
====... |
LanguageChecker/languageChecker.checkChi | Modified | Ciphey~Ciphey | 5cc0944997e03729712b9f313350df9f045b7669 | added dictionary and worked on english processor | <0>:<add> # TODO 20% isn't optimal
<1>:<add> # the or statement is bc if the program has just started I don't want it to ignore the
<add> # ones at the start
<add> # TODO is 10 optimal?
<add> # TODO is 45 optimal?
<add> if self.mh.percentage(se... | # module: LanguageChecker
class languageChecker:
def checkChi(self):
<0> # runs after every chi squared to see if it's 1 significantly lower than averae
<1> if percentage(self.oldAverage, self.average) >= 20:
<2> print("Ok, it's significant!")
<3>
| ===========unchanged ref 0===========
at: LanguageChecker.languageChecker.__init__
self.average = 0.0
self.totalDone = 0.0
self.oldAverage = 0.0
at: LanguageChecker.languageChecker.chiSquared
languagesChi[language] = temp
===========changed ref 0=========... |
ciphey-main/Ciphey.__init__ | Modified | Ciphey~Ciphey | 5cc0944997e03729712b9f313350df9f045b7669 | added dictionary and worked on english processor | <0>:<del> print("hello!")
<4>:<add> parser.add_argument('-g','--greppable', help='Are you grepping this output?', required=False)
<add>
<5>:<add> print("""
<add> βββββββββββββββββ βββ ββββββββββββββ βββ
<add> ββββββββββββββββββββββ βββββ | # module: ciphey-main
class Ciphey:
def __init__(self):
<0> print("hello!")
<1> parser = argparse.ArgumentParser(description='Blog')
<2> parser.add_argument('-f','--file', help='File you want to decrypt', required=False)
<3> parser.add_argument('-l','--le... | ===========changed ref 0===========
# module: mathsHelper
+ class mathsHelper:
+ def __init__(self):
+ print("nothing")
+
===========changed ref 1===========
# module: mathsHelper
+ class mathsHelper:
+ def percentage(self, part, whole):
+ return 100 * float(part)/float(w... |
app.mathsHelper/mathsHelper.percentage | Modified | Ciphey~Ciphey | 4be6c646ae9966d006a1173b63a09e98c42fb417 | wow would you believe this chi squared works | <1>:<add> # yeah uhm sometimes I'm a dummy dum dum and I think dividing by 0 is a good idea
<add> # this if statememt is to stop my stupidity
<add> if part or whole <= 0:
<add> return 0
<add>
| # module: app.mathsHelper
class mathsHelper:
def percentage(self, part, whole):
<0> """Works with percentages"""
<1> # works with percentages
<2> return 100 * float(part)/float(whole)
<3>
| ===========changed ref 0===========
+ # module: mathsHelper
+
+
===========changed ref 1===========
+ # module: mathsHelper
+
+
===========changed ref 2===========
+ # module: mathsHelper
+ """
+ βββββββββββββββββ βββ ββββββββββββββ βββ
+ ββββββββββββββββββββββ βββββββββββββββ ββββ
+ β... |
app.languageChecker.chisquared/chiSquared.__init__ | Modified | Ciphey~Ciphey | 4be6c646ae9966d006a1173b63a09e98c42fb417 | wow would you believe this chi squared works | <10>:<add> self.totalChi = 0.0
<del>
| # module: app.languageChecker.chisquared
class chiSquared:
def __init__(self):
<0> self.languages = {
<1> "English":
<2> [0.0855, 0.0160, 0.0316, 0.0387, 0.1210,0.0218, 0.0209, 0.0496, 0.0733, 0.0022,0.0081, 0.0421, 0.0253, 0.0717, 0.0747,0.0207, 0.0010, 0.0... | ===========unchanged ref 0===========
at: app.languageChecker.chisquared.chiSquared.chiSquared
self.oldAverage = self.average
self.totalDone += 1
self.average = (self.totalChi + maxChiSquare) / self.totalDone
===========changed ref 0===========
+ # module: mathsHelper
... |
app.languageChecker.chisquared/chiSquared.checkChi | Modified | Ciphey~Ciphey | 4be6c646ae9966d006a1173b63a09e98c42fb417 | wow would you believe this chi squared works | <16>:<add> if self.mh.percentage(self.oldAverage, self.average) >= self.chiSquaredSignificaneThreshold or self.totalDone < self.totalDoneThreshold:
<del> if self.mh.percentage(self.oldAverage, self.average) >= self.chiSquaredSignificaneThreshold or self.totalDone < totalDoneThreshold:
<17>:<add> ... | # module: app.languageChecker.chisquared
class chiSquared:
def checkChi(self, text):
<0> """Checks to see if the Chi score is good
<1> if it is, it returns True
<2> Call this when you want to determine whether something is likely to be Chi or not
<3>
<... | ===========unchanged ref 0===========
at: app.languageChecker.chisquared.chiSquared.chiSquared
self.highestLanguage = language
===========changed ref 0===========
# module: app.languageChecker.chisquared
class chiSquared:
def __init__(self):
self.languages = {
... |
app.languageChecker.chisquared/chiSquared.chiSquared | Modified | Ciphey~Ciphey | 4be6c646ae9966d006a1173b63a09e98c42fb417 | wow would you believe this chi squared works | <10>:<add> if letter not in punctuation and self.mh.isAscii(letter) :
<del> if letter not in punctuation and self.isAscii(letter) :
| # module: app.languageChecker.chisquared
class chiSquared:
def chiSquared(self, text):
<0> """Creates letter frequency of text and compares that to the letter frequency of the language"""
<1>
<2> # This part creates a letter frequency of the text
<3> letterFreq ... | ===========below chunk 0===========
# module: app.languageChecker.chisquared
class chiSquared:
def chiSquared(self, text):
# offset: 1
languagesChi[language] = temp
if temp > maxChiSquare:
self.highestLanguage = language
# calculates... |
app.languageChecker.chisquared/chiSquared.myChi | Modified | Ciphey~Ciphey | 4be6c646ae9966d006a1173b63a09e98c42fb417 | wow would you believe this chi squared works | <5>:<add> print(len(text))
<add> print(len(distribution))
| # module: app.languageChecker.chisquared
class chiSquared:
def myChi(self, text, distribution):
<0> """My own implementation of Chi squared using the two resources mention in the comments on this definition as guidance"""
<1> # chrome-extension://oemmndcbldboiebfnladdacbdfmada... | ===========unchanged ref 0===========
at: app.languageChecker.chisquared.chiSquared.__init__
self.average = 0.0
self.totalDone = 0.0
self.oldAverage = 0.0
self.highestLanguage = ""
self.totalChi = 0.0
at: app.languageChecker.chisquared.chiSquared.... |
app.languageChecker.chisquared/chiSquared.checkChi | Modified | Ciphey~Ciphey | a5f06fe043ffab91227a2d9b259eb982d281254f | end of day | <17>:<del> print("It's significant!")
| # module: app.languageChecker.chisquared
class chiSquared:
def checkChi(self, text):
<0> """Checks to see if the Chi score is good
<1> if it is, it returns True
<2> Call this when you want to determine whether something is likely to be Chi or not
<3>
<... | ===========unchanged ref 0===========
at: app.languageChecker.chisquared.chiSquared.__init__
self.average = 0.0
self.totalDone = 0.0
self.oldAverage = 0.0
self.mh = mathsHelper.mathsHelper()
self.chiSquaredSignificaneThreshold = 20
self.totalD... |
app.languageChecker.chisquared/chiSquared.chiSquared | Modified | Ciphey~Ciphey | a5f06fe043ffab91227a2d9b259eb982d281254f | end of day | <4>:<add>
<add> for letter in text.lower():
<del> for letter in text:
| # module: app.languageChecker.chisquared
class chiSquared:
def chiSquared(self, text):
<0> """Creates letter frequency of text and compares that to the letter frequency of the language"""
<1>
<2> # This part creates a letter frequency of the text
<3> letterFreq ... | ===========below chunk 0===========
# module: app.languageChecker.chisquared
class chiSquared:
def chiSquared(self, text):
# offset: 1
languagesChi[language] = temp
if temp > maxChiSquare:
self.highestLanguage = language
# calculates... |
app.languageChecker.chisquared/chiSquared.myChi | Modified | Ciphey~Ciphey | a5f06fe043ffab91227a2d9b259eb982d281254f | end of day | <5>:<del> print(len(text))
<6>:<del> print(len(distribution))
| # module: app.languageChecker.chisquared
class chiSquared:
def myChi(self, text, distribution):
<0> """My own implementation of Chi squared using the two resources mention in the comments on this definition as guidance"""
<1> # chrome-extension://oemmndcbldboiebfnladdacbdfmada... | ===========unchanged ref 0===========
at: app.languageChecker.chisquared.chiSquared.chiSquared
languagesChi[language] = temp
languagesChi = {}
===========changed ref 0===========
# module: app.languageChecker.chisquared
class chiSquared:
def checkChi(self, text):
... |
app.Tests.testchi_squared/TestChi.test_english_quckbrown | Modified | Ciphey~Ciphey | c4cb77e2599d520a2a6925a1959403df1635af6b | added standard deviation and fixed a bunch of bugs | # module: app.Tests.testchi_squared
# python3 -m unittest Tests.testchi_squared
# python -m unittest discover -s tests
# python3 -m unittest discover -s Tests -p test*.py
class TestChi(unittest.TestCase):
def test_english_quckbrown(self):
<0> self.chi = chisq... | ===========below chunk 0===========
# module: app.Tests.testchi_squared
# python3 -m unittest Tests.testchi_squared
# python -m unittest discover -s tests
# python3 -m unittest discover -s Tests -p test*.py
class TestChi(unittest.TestCase):
def test_english_quckbrown(self):
# of... | |
app.Tests.testchi_squared/TestChi.test_english_puncuation | Modified | Ciphey~Ciphey | c4cb77e2599d520a2a6925a1959403df1635af6b | added standard deviation and fixed a bunch of bugs | # module: app.Tests.testchi_squared
# python3 -m unittest Tests.testchi_squared
# python -m unittest discover -s tests
# python3 -m unittest discover -s Tests -p test*.py
class TestChi(unittest.TestCase):
def test_english_puncuation(self):
<0> self.chi = chis... | ===========below chunk 0===========
# module: app.Tests.testchi_squared
# python3 -m unittest Tests.testchi_squared
# python -m unittest discover -s tests
# python3 -m unittest discover -s Tests -p test*.py
class TestChi(unittest.TestCase):
def test_english_puncuation(self):
# o... | |
app.languageChecker.chisquared/chiSquared.__init__ | Modified | Ciphey~Ciphey | c4cb77e2599d520a2a6925a1959403df1635af6b | added standard deviation and fixed a bunch of bugs | <11>:<add> self.totalEqual = False
<add> self.chisAsaList = []
<13>:<add> self.chiSquaredSignificaneThreshold = 1 # how many stds you want to go below it
<del> self.chiSquaredSignificaneThreshold = 20
<15>:<add>
<add> self.standarddeviation = 0.00 # the stand... | # module: app.languageChecker.chisquared
class chiSquared:
def __init__(self):
<0> self.languages = {
<1> "English":
<2> [0.0855, 0.0160, 0.0316, 0.0387, 0.1210,0.0218, 0.0209, 0.0496, 0.0733, 0.0022,0.0081, 0.0421, 0.0253, 0.0717, 0.0747,0.0207, 0.0010, 0.0... | ===========unchanged ref 0===========
at: app.languageChecker.chisquared.chiSquared.chiSquared
self.highestLanguage = language
self.oldAverage = self.average
self.totalDone += 1
self.average = (self.totalChi + maxChiSquare) / self.totalDone
===========changed... |
app.languageChecker.chisquared/chiSquared.checkChi | Modified | Ciphey~Ciphey | c4cb77e2599d520a2a6925a1959403df1635af6b | added standard deviation and fixed a bunch of bugs | <14>:<add> # ones at the start
<del> # ones at the start
<16>:<add> # If the latest chi squared is less than the standard deviation
<add> # or if not many chi squares have been calculated
<add> # or if every single letter in a text appears exactly once ... | # module: app.languageChecker.chisquared
class chiSquared:
def checkChi(self, text):
<0> """Checks to see if the Chi score is good
<1> if it is, it returns True
<2> Call this when you want to determine whether something is likely to be Chi or not
<3>
<... | ===========unchanged ref 0===========
at: app.languageChecker.chisquared.chiSquared
chiSquared(self, text)
chiSquared(text)
at: app.languageChecker.chisquared.chiSquared.__init__
self.average = 0.0
self.totalDone = 0.0
self.oldAverage = 0.0
sel... |
app.languageChecker.chisquared/chiSquared.chiSquared | Modified | Ciphey~Ciphey | c4cb77e2599d520a2a6925a1959403df1635af6b | added standard deviation and fixed a bunch of bugs | <2>:<del> # This part creates a letter frequency of the text
<3>:<del> letterFreq = {'a': 0, 'b': 0, 'c': 0, 'd': 0, 'e': 0, 'f': 0, 'g': 0, 'h': 0, 'i': 0, 'j': 0, 'k': 0, 'l': 0, 'm': 0, 'n': 0, 'o': 0, 'p': 0, 'q': 0, 'r': 0, 's': 0, 't': 0, 'u': 0, 'v': 0, 'w': 0, 'x': 0, 'y': 0, 'z': 0}
<4>:<d... | # module: app.languageChecker.chisquared
class chiSquared:
def chiSquared(self, text):
<0> """Creates letter frequency of text and compares that to the letter frequency of the language"""
<1>
<2> # This part creates a letter frequency of the text
<3> letterFreq ... | ===========below chunk 0===========
# module: app.languageChecker.chisquared
class chiSquared:
def chiSquared(self, text):
# offset: 1
temp = self.myChi(letterFreq, self.languages[language])
languagesChi[language] = temp
if temp > maxChiSquare:
... |
app.languageChecker.chisquared/chiSquared.checkChi | Modified | Ciphey~Ciphey | bbaf2ae51cd36b25fd9c2eadc8f1498146422860 | neural natworks | <19>:<add> if self.chisAsaList[-1] <= (self.average - (self.oldstandarddeviation * self.chiSquaredSignificaneThreshold)) or self.totalDone < self.totalDoneThreshold or self.totalEqual:
<del> if a[-1] <= (a[-1] - (self.oldstandarddeviation * self.chiSquaredSignificaneThreshold)) or self.totalDone <... | # module: app.languageChecker.chisquared
class chiSquared:
def checkChi(self, text):
<0> """Checks to see if the Chi score is good
<1> if it is, it returns True
<2> Call this when you want to determine whether something is likely to be Chi or not
<3>
<... | ===========unchanged ref 0===========
at: app.languageChecker.chisquared.chiSquared
chiSquared(self, text)
chiSquared(text)
at: app.languageChecker.chisquared.chiSquared.__init__
self.average = 0.0
self.totalDone = 0.0
self.totalEqual = False
s... |
app.languageChecker.chisquared/chiSquared.chiSquared | Modified | Ciphey~Ciphey | bbaf2ae51cd36b25fd9c2eadc8f1498146422860 | neural natworks | <7>:<del> print("letter freq for ", str(text), " is ", str(list(letterFreq.values())))
| # module: app.languageChecker.chisquared
class chiSquared:
def chiSquared(self, text):
<0> """Creates letter frequency of text and compares that to the letter frequency of the language"""
<1>
<2>
<3> # if all items of the dictionary are the same, then it's a normal di... | ===========below chunk 0===========
# module: app.languageChecker.chisquared
class chiSquared:
def chiSquared(self, text):
# offset: 1
# calculates a running average, maxChiSquare is the new chi score we get
self.average = (self.totalChi + maxChiSquare) / self.totalDone
... |
app.languageChecker.dictionaryChecker/dictionaryChecker.__init__ | Modified | Ciphey~Ciphey | 064d9f1415e95022f11ca978448066120079269a | added de-hashing functionality | <0>:<add> self.mh = mathsHelper.mathsHelper()
<add> self.languagePercentage = 0.0
<add> self.languageWordsCounter = 0.0
<add> self.languageThreshold = 45
<del> None
| # module: app.languageChecker.dictionaryChecker
class dictionaryChecker:
def __init__(self):
<0> None
<1>
| ===========changed ref 0===========
+ # module: app.Decryptor.Hash.hashBuster
+
+ def alpha(hashvalue, hashtype):
+ return False
+
===========changed ref 1===========
+ # module: app.Decryptor.Hash.hashBuster
+
+ result = {}
+
===========changed ref 2===========
# module: app.languageC... |
app.languageChecker.dictionaryChecker/dictionaryChecker.checkDictionary | Modified | Ciphey~Ciphey | 064d9f1415e95022f11ca978448066120079269a | added de-hashing functionality | <3>:<add> # and calculates how much of that is in language
<del> # and calculates how much of that is in English
<4>:<add> text = text.lower()
<add> text = self.mh.stripPuncuation(text)
<6>:<add> text = list(set(text)) # removes duplicate words
<8>:<add> ... | # module: app.languageChecker.dictionaryChecker
class dictionaryChecker:
def checkDictionary(self, text, language):
<0> """Compares a word with
<1> The dictionary is sorted and the text is sorted"""
<2> # reads through most common words / passwords
<3> #... | ===========unchanged ref 0===========
at: app.languageChecker.dictionaryChecker.dictionaryChecker.checkDictionary
self.languageWordsCounter = counter
self.languagePercentage = mh.percentage(self.languageWordsCounter, len(text))
===========changed ref 0===========
# module: app.lan... |
app.languageChecker.chisquared/chiSquared.__init__ | Modified | Ciphey~Ciphey | 064d9f1415e95022f11ca978448066120079269a | added de-hashing functionality | <2>:<add> #[0.0855, 0.0160, 0.0316, 0.0387, 0.1210,0.0218, 0.0209, 0.0496, 0.0733, 0.0022,0.0081, 0.0421, 0.0253, 0.0717, 0.0747,0.0207, 0.0010, 0.0633, 0.0673, 0.0894,0.0268, 0.0106, 0.0183, 0.0019, 0.0172,0.0011]
<del> [0.0855, 0.0160, 0.0316, 0.0387, 0.1210,0.0218, 0.0209, 0.0496, 0.07... | # module: app.languageChecker.chisquared
class chiSquared:
def __init__(self):
<0> self.languages = {
<1> "English":
<2> [0.0855, 0.0160, 0.0316, 0.0387, 0.1210,0.0218, 0.0209, 0.0496, 0.0733, 0.0022,0.0081, 0.0421, 0.0253, 0.0717, 0.0747,0.0207, 0.0010, 0.0... | ===========below chunk 0===========
# module: app.languageChecker.chisquared
class chiSquared:
def __init__(self):
# offset: 1
self.totalDoneThreshold = 10
self.standarddeviation = 0.00 # the standard deviation I use
self.oldstandarddeviation = 0.00
... |
app.mathsHelper/mathsHelper.stripPuncuation | Modified | Ciphey~Ciphey | 12f3c58abf0b119ba630066f80913ca4f37d4c5c | ok i fixed it | <1>:<add> return text.translate(str.maketrans('','',punctuation))
<del> return text.translate(None, punctuation)
| # module: app.mathsHelper
class mathsHelper:
def stripPuncuation(self, text):
<0> """Strips punctuation from a given string"""
<1> return text.translate(None, punctuation)
<2>
| ===========unchanged ref 0===========
at: string
punctuation = r"""!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~"""
|
app.languageChecker.LanguageChecker/languageChecker.__add__ | Modified | Ciphey~Ciphey | 12f3c58abf0b119ba630066f80913ca4f37d4c5c | ok i fixed it | <1>:<add> print("anyhting")
| # module: app.languageChecker.LanguageChecker
class languageChecker:
# todo check chi to see if its significant
# if it is, run this
# if percetageOfEnglish > 45:
# print("I'm pretty sure this is English")
def __... | ===========changed ref 0===========
+ # module: app.neuralNetwork.starter
+ mnist = tf.keras.datasets.mnist # 28x28 images of hand-written digits 0-9
+
===========changed ref 1===========
# module: app.mathsHelper
class mathsHelper:
def stripPuncuation(self, text):
"""Strips pun... |
app.mathsHelper/mathsHelper.percentage | Modified | Ciphey~Ciphey | 3296a79e762f70e6e896f0ae8ba3187882873dad | made dictionary changer work | <3>:<add> if part <= 0 or whole <= 0:
<del> if part or whole <= 0:
<5>:<del>
| # module: app.mathsHelper
class mathsHelper:
def percentage(self, part, whole):
<0> """Works with percentages"""
<1> # yeah uhm sometimes I'm a dummy dum dum and I think dividing by 0 is a good idea
<2> # this if statememt is to stop my stupidity
<3> ... | |
app.mathsHelper/mathsHelper.stripPuncuation | Modified | Ciphey~Ciphey | 3296a79e762f70e6e896f0ae8ba3187882873dad | made dictionary changer work | <1>:<add> text = text.translate(str.maketrans('','',punctuation))
<del> return text.translate(str.maketrans('','',punctuation))
<2>:<add> return text
| # module: app.mathsHelper
class mathsHelper:
def stripPuncuation(self, text):
<0> """Strips punctuation from a given string"""
<1> return text.translate(str.maketrans('','',punctuation))
<2>
| ===========unchanged ref 0===========
at: string
punctuation = r"""!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~"""
===========changed ref 0===========
# module: app.mathsHelper
class mathsHelper:
def percentage(self, part, whole):
"""Works with percentages"""
# y... |
app.languageChecker.dictionaryChecker/dictionaryChecker.checkDictionary | Modified | Ciphey~Ciphey | 3296a79e762f70e6e896f0ae8ba3187882873dad | made dictionary changer work | <7>:<del> text = text.sort()
<9>:<add> text.sort()
<11>:<add> file = open("languageChecker/{}".format(language), "r")
<del> f = open(language, "r")
<12>:<add> f = file.readlines()
<del> f = f.readlines()
<13>:<add> file.close()
<15>:<add>
... | # module: app.languageChecker.dictionaryChecker
class dictionaryChecker:
def checkDictionary(self, text, language):
<0> """Compares a word with
<1> The dictionary is sorted and the text is sorted"""
<2> # reads through most common words / passwords
<3> #... | ===========unchanged ref 0===========
at: app.languageChecker.dictionaryChecker.dictionaryChecker.__init__
self.mh = mathsHelper.mathsHelper()
self.languagePercentage = 0.0
self.languageWordsCounter = 0.0
at: io.BufferedRandom
readlines(self, hint: int=..., /) -> L... |
app.languageChecker.chisquared/chiSquared.chiSquared | Modified | Ciphey~Ciphey | efa56c6414b7dfc246195801f3df026972c2ac3b | daily update | <2>:<add>
<del>
| # module: app.languageChecker.chisquared
class chiSquared:
def chiSquared(self, text):
<0> """Creates letter frequency of text and compares that to the letter frequency of the language"""
<1>
<2>
<3> # if all items of the dictionary are the same, then it's a normal di... | ===========below chunk 0===========
# module: app.languageChecker.chisquared
class chiSquared:
def chiSquared(self, text):
# offset: 1
self.oldstandarddeviation = self.standarddeviation
self.standarddeviation = std(self.chisAsaList)
return(languagesChi)
... |
app.neuralNetwork.nn/neuralNetwork.useNetwork | Modified | Ciphey~Ciphey | 3e02f07520fea77ad7ad70cedf09788b2c49a64f | wrote more tests, squashed some bugs, drank soda, ran out of gum, now onto apples" | <0>:<add> """data is a list containing these 3 things (in this order)
<add> * length of text
<add> * how many letters it has (so, abc = 3. aab = 2)
<add> * the normalised chi square score (not relating to a specific language)"""
<add> new = []
<add>... | # module: app.neuralNetwork.nn
class neuralNetwork:
def useNetwork(self, data):
<0> pass
<1>
| ===========changed ref 0===========
+ # module: app.languageCheckerMod.chisquared
+
+
===========changed ref 1===========
+ # module: app.languageCheckerMod.LanguageChecker
+
+
===========changed ref 2===========
+ # module: app.languageCheckerMod.dictionaryChecker
+
+
===========changed ref... |
app.languageCheckerMod.dictionaryChecker/dictionaryChecker.__init__ | Modified | Ciphey~Ciphey | f753829586c2366df64e6b4b74e00a081b4d8fdf | wrote tests | <3>:<add> self.languageThreshold = 25
<del> self.languageThreshold = 45
| # module: app.languageCheckerMod.dictionaryChecker
class dictionaryChecker:
def __init__(self):
<0> self.mh = mathsHelper.mathsHelper()
<1> self.languagePercentage = 0.0
<2> self.languageWordsCounter = 0.0
<3> self.languageThreshold = 45
<4>
| ===========unchanged ref 0===========
at: app.languageCheckerMod.dictionaryChecker.dictionaryChecker.checkDictionary
self.languageWordsCounter = counter
self.languagePercentage = self.mh.percentage(float(self.languageWordsCounter), float(len(text)))
|
app.languageCheckerMod.LanguageChecker/languageChecker.checkLanguage | Modified | Ciphey~Ciphey | f753829586c2366df64e6b4b74e00a081b4d8fdf | wrote tests | <0>:<add> if text == "":
<add> return False
| # module: app.languageCheckerMod.LanguageChecker
class languageChecker:
def checkLanguage(self, text):
<0> result = self.chi.checkChi(text)
<1> if result:
<2> result2 = self.dictionary.confirmlanguage(text, "English")
<3> if result2:
<4>... | ===========unchanged ref 0===========
at: app.languageCheckerMod.LanguageChecker.languageChecker.__add__
self.chi = new
at: app.languageCheckerMod.LanguageChecker.languageChecker.__init__
self.dictionary = languageCheckerMod.dictionaryChecker.dictionaryChecker()
self.chi = lang... |
app.Tests.testintegration_languagechecker/TestLanguageChecker.test_chi_maxima_true | Modified | Ciphey~Ciphey | f753829586c2366df64e6b4b74e00a081b4d8fdf | wrote tests | <4>:<add> result = lc.checkLanguage("sa dew fea dxza dcsa da fsa d")
<add> result = lc.checkLanguage("df grtsf a sgrds fgserwqd")
<add> result = lc.checkLanguage("fd sa fe safsda srmad sadsa d")
<add> result = lc.checkLanguage(" oihn giuhh7hguygiuhuyguyuyg ig iug iugiu... | # module: app.Tests.testintegration_languagechecker
# python3 -m unittest Tests.testchi_squared
# python -m unittest discover -s tests
# python3 -m unittest discover -s Tests -p test*.py
class TestLanguageChecker(unittest.TestCase):
def test_chi_maxima_true(self):
<0> ... | ===========below chunk 0===========
# module: app.Tests.testintegration_languagechecker
# python3 -m unittest Tests.testchi_squared
# python -m unittest discover -s tests
# python3 -m unittest discover -s Tests -p test*.py
class TestLanguageChecker(unittest.TestCase):
def test_chi_maxima_... |
app.languageCheckerMod.chisquared/chiSquared.checkChi | Modified | Ciphey~Ciphey | f753829586c2366df64e6b4b74e00a081b4d8fdf | wrote tests | <19>:<add> if self.chisAsaList[-1] <= abs(self.average - (self.oldstandarddeviation * self.chiSquaredSignificaneThreshold)) or self.totalDone < self.totalDoneThreshold or self.totalEqual:
<del> if self.chisAsaList[-1] <= (self.average - (self.oldstandarddeviation * self.chiSquaredSignificaneThresh... | # module: app.languageCheckerMod.chisquared
class chiSquared:
def checkChi(self, text):
<0> """Checks to see if the Chi score is good
<1> if it is, it returns True
<2> Call this when you want to determine whether something is likely to be Chi or not
<3>
... | ===========unchanged ref 0===========
at: app.languageCheckerMod.chisquared.chiSquared
chiSquared(self, text)
chiSquared(text)
at: app.languageCheckerMod.chisquared.chiSquared.__init__
self.average = 0.0
self.totalDone = 0.0
self.totalEqual = False
... |
app.languageCheckerMod.chisquared/chiSquared.chiSquared | Modified | Ciphey~Ciphey | f753829586c2366df64e6b4b74e00a081b4d8fdf | wrote tests | # module: app.languageCheckerMod.chisquared
class chiSquared:
def chiSquared(self, text):
<0> """Creates letter frequency of text and compares that to the letter frequency of the language"""
<1>
<2>
<3> # if all items of the dictionary are the same, then it's... | ===========below chunk 0===========
# module: app.languageCheckerMod.chisquared
class chiSquared:
def chiSquared(self, text):
# offset: 1
self.oldstandarddeviation = self.standarddeviation
self.standarddeviation = std(self.chisAsaList)
return(languagesChi)
... | |
app.languageCheckerMod.chisquared/chiSquared.myChi | Modified | Ciphey~Ciphey | f753829586c2366df64e6b4b74e00a081b4d8fdf | wrote tests | <6>:<add> try:
<add> chiScore = chiScore + ((letter - distribution[counter])**2) / distribution[counter]
<del> chiScore = chiScore + ((letter - distribution[counter])**2) / distribution[counter]
<7>:<add> except IndexError as e:
<add> ... | # module: app.languageCheckerMod.chisquared
class chiSquared:
def myChi(self, text, distribution):
<0> """My own implementation of Chi squared using the two resources mention in the comments on this definition as guidance"""
<1> # chrome-extension://oemmndcbldboiebfnladdacbdfm... | ===========changed ref 0===========
# module: app.languageCheckerMod.chisquared
class chiSquared:
def checkChi(self, text):
"""Checks to see if the Chi score is good
if it is, it returns True
Call this when you want to determine whether something is likely to be Chi... |
app.main/Ciphey.__init__ | Modified | Ciphey~Ciphey | 087a2f8391e8f64cdd81338b44e5a898cbe6924c | created tests for neural networks | # module: app.main
class Ciphey:
def __init__(self):
<0> parser = argparse.ArgumentParser(description='Blog')
<1> parser.add_argument('-f','--file', help='File you want to decrypt', required=False)
<2> parser.add_argument('-l','--level', help='How many levels of dec... | ===========below chunk 0===========
# module: app.main
class Ciphey:
def __init__(self):
# offset: 1
βββ ββββββββββ ββββββββββββββ βββββ
ββββββββββββββ βββ βββββββββββ βββ """)
===========changed ref 0===========
+ # module: app.Tests.testneural_... | |
app.Tests.testintegration_languagechecker/TestLanguageChecker.test_integration_addition | Modified | Ciphey~Ciphey | 087a2f8391e8f64cdd81338b44e5a898cbe6924c | created tests for neural networks | <12>:<del> print(temp3)
<14>:<del> print(lc3.getChiScore())
| # module: app.Tests.testintegration_languagechecker
# python3 -m unittest Tests.testchi_squared
# python -m unittest discover -s tests
# python3 -m unittest discover -s Tests -p test*.py
class TestLanguageChecker(unittest.TestCase):
def test_integration_addition(self):
<0> ... | ===========unchanged ref 0===========
at: languageCheckerMod.LanguageChecker
languageChecker()
at: languageCheckerMod.LanguageChecker.languageChecker
checkLanguage(text)
getChiScore()
at: unittest.case.TestCase
failureException: Type[BaseException]
... |
app.neuralNetwork.nn/neuralNetwork.__init__ | Modified | Ciphey~Ciphey | 087a2f8391e8f64cdd81338b44e5a898cbe6924c | created tests for neural networks | <2>:<add> self.MODEL = load_model("neuralNetwork/NeuralNetworkModel.model")
<add> import mathsHelper
<add> self.mh = mathsHelper.mathsHelper()
<del> pass
| # module: app.neuralNetwork.nn
+
class neuralNetwork:
def __init__(self):
<0> self.CATEGORIES = ["sha1", "md5", "sha256", "sha512", "caeser", "plaintext"]
<1> self.CATEGORIES = [1, 2, 3, 4, 5, 6]
<2> pass
<3>
| ===========changed ref 0===========
+ # module: app.Tests.testneural_network
+
+
===========changed ref 1===========
+ # module: app.Tests.testneural_network
+ sys.path.append("..")
+
===========changed ref 2===========
+ # module: app.Tests.testneural_network
+ # python3 -m unittest Tests.testchi_s... |
app.neuralNetwork.nn/neuralNetwork.editData | Modified | Ciphey~Ciphey | 087a2f8391e8f64cdd81338b44e5a898cbe6924c | created tests for neural networks | <0>:<add> """
<add> Data has to be in format:
<add> * [length of text, how many unique letters it has, the normalised chi square score]
<add> """
<add> new = []
<add> new.append(self.formatData(data))
<add> return numpy.asarray... | # module: app.neuralNetwork.nn
+
class neuralNetwork:
def editData(self, data):
<0> pass
<1>
| ===========changed ref 0===========
# module: app.neuralNetwork.nn
+
class neuralNetwork:
def __init__(self):
self.CATEGORIES = ["sha1", "md5", "sha256", "sha512", "caeser", "plaintext"]
self.CATEGORIES = [1, 2, 3, 4, 5, 6]
+ self.MODEL = load_model("neuralN... |
app.main/Ciphey.__init__ | Modified | Ciphey~Ciphey | 46ded5bc9a88cb1d87eaa0d43d180c627a74c818 | got caesar to work yippeee | <0>:<add> # general purpose modules
<add> self.ai = NeuralNetwork()
<add> self.lc = LanguageChecker()
<add> self.mh = mathsHelper.mathsHelper()
<del> parser = argparse.ArgumentParser(description='Blog')
<1>:<del> parser.add_argument('-f','--fil... | # module: app.main
+
class Ciphey:
+ def __init__(self, text):
- def __init__(self):
<0> parser = argparse.ArgumentParser(description='Blog')
<1> parser.add_argument('-f','--file', help='File you want to decrypt', required=False)
<2> parser.add_argument(... | ===========below chunk 0===========
# module: app.main
+
class Ciphey:
+ def __init__(self, text):
- def __init__(self):
# offset: 1
βββ ββββββββββ ββββββββββββββ βββββ
ββββββββββββββ βββ βββββββββββ βββ """)
self.ai = nn()
===... |
app.Decryptor.basicEncryption.basic_parent/BasicParent.__init__ | Modified | Ciphey~Ciphey | 5117cf46b5d7bae5ad573457588588aff11a8154 | final day commit | <1>:<add> self.caesar = Caesar(self.lc)
<add> self.list_of_objects = [self.caesar]
| # module: app.Decryptor.basicEncryption.basic_parent
-
class BasicParent:
def __init__(self, lc):
<0> self.lc = lc
<1>
| |
app.Decryptor.basicEncryption.basic_parent/BasicParent.decrypt | Modified | Ciphey~Ciphey | 5117cf46b5d7bae5ad573457588588aff11a8154 | final day commit | <0>:<add> self.caesar = Caesar(selftext)
<del> self.caesar = Caesar(self.lc, text)
| # module: app.Decryptor.basicEncryption.basic_parent
-
class BasicParent:
def decrypt(self, text):
<0> self.caesar = Caesar(self.lc, text)
<1> result = self.caesar.bruteforce()
<2>
| ===========changed ref 0===========
# module: app.Decryptor.basicEncryption.basic_parent
-
class BasicParent:
def __init__(self, lc):
self.lc = lc
+ self.caesar = Caesar(self.lc)
+ self.list_of_objects = [self.caesar]
|
app.main/Ciphey.one_level_of_decryption | Modified | Ciphey~Ciphey | 5117cf46b5d7bae5ad573457588588aff11a8154 | final day commit | <0>:<add> for key, val in self.whatToChoose.items():
<add> if key == str:
<add> continue
<add> # https://stackoverflow.com/questions/4843173/how-to-check-if-type-of-a-variable-is-string
<add> if key != str:
<add> ... | # module: app.main
class Ciphey:
def one_level_of_decryption(self):
<0> BasicParent(self.lc, self.text)
<1>
| ===========unchanged ref 0===========
at: app.main.Ciphey.decrypt
self.whatToChoose = {"Hashing":
{
"sha1": self.probabilityDistribution[0],
"md5": self.probabilityDistribution[1],
"sha256": self.probabilityDistribution[2],... |
app.Decryptor.basicEncryption.basic_parent/BasicParent.decrypt | Modified | Ciphey~Ciphey | 71faf038330bcba5c6092c2b88cc18e85f8606a0 | final day | <0>:<add> for item in self.list_of_objects:
<add> item.decrypt(text)
<del> self.caesar = Caesar(selftext)
<1>:<add> result = self.caesar.bruteforce()
<del> result = self.caesar.bruteforce()
| # module: app.Decryptor.basicEncryption.basic_parent
class BasicParent:
def decrypt(self, text):
<0> self.caesar = Caesar(selftext)
<1> result = self.caesar.bruteforce()
<2>
| ===========unchanged ref 0===========
at: Decryptor.basicEncryption.caesar.Caesar
decrypt(message)
at: app.Decryptor.basicEncryption.basic_parent.BasicParent.__init__
self.list_of_objects = [self.caesar]
|
app.Decryptor.basicEncryption.basic_parent/BasicParent.setProbTable | Modified | Ciphey~Ciphey | 71faf038330bcba5c6092c2b88cc18e85f8606a0 | final day | <0>:<del> import pprint
<1>:<del> pprint.pprint(prob)
<2>:<add> self.probabilityDistribution = prob
<del> self.probabilityDistribution = prob
<11>:<add> pprint.pprint(self.list_of_objects)
| # module: app.Decryptor.basicEncryption.basic_parent
class BasicParent:
def setProbTable(self, prob):
<0> import pprint
<1> pprint.pprint(prob)
<2> self.probabilityDistribution = prob
<3> # we get a sorted list of objects :)
<4> counter = 0
... | ===========changed ref 0===========
# module: app.Decryptor.basicEncryption.basic_parent
class BasicParent:
def decrypt(self, text):
+ for item in self.list_of_objects:
+ item.decrypt(text)
- self.caesar = Caesar(selftext)
+ result = self.caesar.brutefo... |
app.languageCheckerMod.dictionaryChecker/dictionaryChecker.__init__ | Modified | Ciphey~Ciphey | 71faf038330bcba5c6092c2b88cc18e85f8606a0 | final day | <3>:<add> self.languageThreshold = 35
<del> self.languageThreshold = 25
| # module: app.languageCheckerMod.dictionaryChecker
class dictionaryChecker:
def __init__(self):
<0> self.mh = mathsHelper.mathsHelper()
<1> self.languagePercentage = 0.0
<2> self.languageWordsCounter = 0.0
<3> self.languageThreshold = 25
<4>
| ===========unchanged ref 0===========
at: app.languageCheckerMod.dictionaryChecker.dictionaryChecker.checkDictionary
self.languageWordsCounter = counter
self.languagePercentage = self.mh.percentage(float(self.languageWordsCounter), float(len(text)))
at: mathsHelper
mathsHelper(... |
app.main/Ciphey.one_level_of_decryption | Modified | Ciphey~Ciphey | 71faf038330bcba5c6092c2b88cc18e85f8606a0 | final day | <4>:<del> if key != str:
<5>:<del> print("****************************")
<6>:<del> print(key)
<7>:<del> print(type(key))
<8>:<del> print("****************************")
<9>:<del>
<10>:<add> if not isinstance(key, str):
... | # module: app.main
class Ciphey:
def one_level_of_decryption(self):
<0> for key, val in self.whatToChoose.items():
<1> if key == str:
<2> continue
<3> # https://stackoverflow.com/questions/4843173/how-to-check-if-type-of-a-... | ===========unchanged ref 0===========
at: Decryptor.basicEncryption.basic_parent.BasicParent
setProbTable(prob)
at: app.main.Ciphey.decrypt
self.whatToChoose = {"Hashing":
{
"sha1": self.probabilityDistribution[0],
"md5": self.... |
app.Tests.testintegration_languagechecker/TestLanguageChecker.test_basics | Modified | Ciphey~Ciphey | 71faf038330bcba5c6092c2b88cc18e85f8606a0 | final day | <0>:<add> lc = LanguageChecker()
<del> lc = LanguageChecker.languageChecker()
| # module: app.Tests.testintegration_languagechecker
# python3 -m unittest Tests.testchi_squared
# python -m unittest discover -s tests
# python3 -m unittest discover -s Tests -p test*.py
class TestLanguageChecker(unittest.TestCase):
def test_basics(self):
<0> lc = La... | ===========unchanged ref 0===========
at: unittest.case.TestCase
failureException: Type[BaseException]
longMessage: bool
maxDiff: Optional[int]
_testMethodName: str
_testMethodDoc: str
assertEqual(first: Any, second: Any, msg: Any=...) -> None... |
app.Tests.testintegration_languagechecker/TestLanguageChecker.test_basics_german | Modified | Ciphey~Ciphey | 71faf038330bcba5c6092c2b88cc18e85f8606a0 | final day | <0>:<add> lc = LanguageChecker()
<del> lc = LanguageChecker.languageChecker()
| # module: app.Tests.testintegration_languagechecker
# python3 -m unittest Tests.testchi_squared
# python -m unittest discover -s tests
# python3 -m unittest discover -s Tests -p test*.py
class TestLanguageChecker(unittest.TestCase):
def test_basics_german(self):
<0> ... | ===========unchanged ref 0===========
at: unittest.case.TestCase
assertEqual(first: Any, second: Any, msg: Any=...) -> None
===========changed ref 0===========
# module: app.Tests.testintegration_languagechecker
# python3 -m unittest Tests.testchi_squared
# python -m unittest discover... |
app.Tests.testintegration_languagechecker/TestLanguageChecker.test_basics_quickbrownfox | Modified | Ciphey~Ciphey | 71faf038330bcba5c6092c2b88cc18e85f8606a0 | final day | <3>:<add> lc = LanguageChecker()
<del> lc = LanguageChecker.languageChecker()
| # module: app.Tests.testintegration_languagechecker
# python3 -m unittest Tests.testchi_squared
# python -m unittest discover -s tests
# python3 -m unittest discover -s Tests -p test*.py
class TestLanguageChecker(unittest.TestCase):
def test_basics_quickbrownfox(self):
<0> ... | ===========unchanged ref 0===========
at: unittest.case.TestCase
assertEqual(first: Any, second: Any, msg: Any=...) -> None
===========changed ref 0===========
# module: app.Tests.testintegration_languagechecker
# python3 -m unittest Tests.testchi_squared
# python -m unittest discover... |
app.Tests.testintegration_languagechecker/TestLanguageChecker.test_chi_maxima | Modified | Ciphey~Ciphey | 71faf038330bcba5c6092c2b88cc18e85f8606a0 | final day | <0>:<add> lc = LanguageChecker()
<del> lc = LanguageChecker.languageChecker()
| # module: app.Tests.testintegration_languagechecker
# python3 -m unittest Tests.testchi_squared
# python -m unittest discover -s tests
# python3 -m unittest discover -s Tests -p test*.py
class TestLanguageChecker(unittest.TestCase):
def test_chi_maxima(self):
<0> lc ... | ===========below chunk 0===========
# module: app.Tests.testintegration_languagechecker
# python3 -m unittest Tests.testchi_squared
# python -m unittest discover -s tests
# python3 -m unittest discover -s Tests -p test*.py
class TestLanguageChecker(unittest.TestCase):
def test_chi_maxima(... |
app.Tests.testintegration_languagechecker/TestLanguageChecker.test_chi_maxima_false | Modified | Ciphey~Ciphey | 71faf038330bcba5c6092c2b88cc18e85f8606a0 | final day | <0>:<add> lc = LanguageChecker()
<del> lc = LanguageChecker.languageChecker()
| # module: app.Tests.testintegration_languagechecker
# python3 -m unittest Tests.testchi_squared
# python -m unittest discover -s tests
# python3 -m unittest discover -s Tests -p test*.py
class TestLanguageChecker(unittest.TestCase):
def test_chi_maxima_false(self):
<0> ... | ===========below chunk 0===========
# module: app.Tests.testintegration_languagechecker
# python3 -m unittest Tests.testchi_squared
# python -m unittest discover -s tests
# python3 -m unittest discover -s Tests -p test*.py
class TestLanguageChecker(unittest.TestCase):
def test_chi_maxima_... |
app.Tests.testintegration_languagechecker/TestLanguageChecker.test_chi_maxima_true | Modified | Ciphey~Ciphey | 71faf038330bcba5c6092c2b88cc18e85f8606a0 | final day | <3>:<add> lc = LanguageChecker()
<del> lc = LanguageChecker.languageChecker()
| # module: app.Tests.testintegration_languagechecker
# python3 -m unittest Tests.testchi_squared
# python -m unittest discover -s tests
# python3 -m unittest discover -s Tests -p test*.py
class TestLanguageChecker(unittest.TestCase):
def test_chi_maxima_true(self):
<0> ... | ===========below chunk 0===========
# module: app.Tests.testintegration_languagechecker
# python3 -m unittest Tests.testchi_squared
# python -m unittest discover -s tests
# python3 -m unittest discover -s Tests -p test*.py
class TestLanguageChecker(unittest.TestCase):
def test_chi_maxima_... |
app.Tests.testintegration_languagechecker/TestLanguageChecker.test_integration_unusual_one | Modified | Ciphey~Ciphey | 71faf038330bcba5c6092c2b88cc18e85f8606a0 | final day | <0>:<add> lc = LanguageChecker()
<del> lc = LanguageChecker.languageChecker()
| # module: app.Tests.testintegration_languagechecker
# python3 -m unittest Tests.testchi_squared
# python -m unittest discover -s tests
# python3 -m unittest discover -s Tests -p test*.py
class TestLanguageChecker(unittest.TestCase):
def test_integration_unusual_one(self):
<0>... | ===========unchanged ref 0===========
at: unittest.case.TestCase
assertEqual(first: Any, second: Any, msg: Any=...) -> None
===========changed ref 0===========
# module: app.Tests.testintegration_languagechecker
# python3 -m unittest Tests.testchi_squared
# python -m unittest discover... |
app.Tests.testintegration_languagechecker/TestLanguageChecker.test_integration_unusual_two | Modified | Ciphey~Ciphey | 71faf038330bcba5c6092c2b88cc18e85f8606a0 | final day | <0>:<add> lc = LanguageChecker()
<del> lc = LanguageChecker.languageChecker()
| # module: app.Tests.testintegration_languagechecker
# python3 -m unittest Tests.testchi_squared
# python -m unittest discover -s tests
# python3 -m unittest discover -s Tests -p test*.py
class TestLanguageChecker(unittest.TestCase):
def test_integration_unusual_two(self):
<0>... | ===========unchanged ref 0===========
at: unittest.case.TestCase
assertEqual(first: Any, second: Any, msg: Any=...) -> None
===========changed ref 0===========
# module: app.Tests.testintegration_languagechecker
# python3 -m unittest Tests.testchi_squared
# python -m unittest discover... |
app.Tests.testintegration_languagechecker/TestLanguageChecker.test_integration_unusual_three | Modified | Ciphey~Ciphey | 71faf038330bcba5c6092c2b88cc18e85f8606a0 | final day | <0>:<add> lc = LanguageChecker()
<del> lc = LanguageChecker.languageChecker()
| # module: app.Tests.testintegration_languagechecker
# python3 -m unittest Tests.testchi_squared
# python -m unittest discover -s tests
# python3 -m unittest discover -s Tests -p test*.py
class TestLanguageChecker(unittest.TestCase):
def test_integration_unusual_three(self):
<... | ===========unchanged ref 0===========
at: unittest.case.TestCase
assertEqual(first: Any, second: Any, msg: Any=...) -> None
===========changed ref 0===========
# module: app.Tests.testintegration_languagechecker
# python3 -m unittest Tests.testchi_squared
# python -m unittest discover... |
app.Tests.testintegration_languagechecker/TestLanguageChecker.test_integration_unusual_four | Modified | Ciphey~Ciphey | 71faf038330bcba5c6092c2b88cc18e85f8606a0 | final day | <0>:<add> lc = LanguageChecker()
<del> lc = LanguageChecker.languageChecker()
| # module: app.Tests.testintegration_languagechecker
# python3 -m unittest Tests.testchi_squared
# python -m unittest discover -s tests
# python3 -m unittest discover -s Tests -p test*.py
class TestLanguageChecker(unittest.TestCase):
def test_integration_unusual_four(self):
<0... | ===========unchanged ref 0===========
at: unittest.case.TestCase
assertEqual(first: Any, second: Any, msg: Any=...) -> None
===========changed ref 0===========
# module: app.Tests.testintegration_languagechecker
# python3 -m unittest Tests.testchi_squared
# python -m unittest discover... |
app.Tests.testintegration_languagechecker/TestLanguageChecker.test_integration_unusual_five | Modified | Ciphey~Ciphey | 71faf038330bcba5c6092c2b88cc18e85f8606a0 | final day | <0>:<add> lc = LanguageChecker()
<del> lc = LanguageChecker.languageChecker()
| # module: app.Tests.testintegration_languagechecker
# python3 -m unittest Tests.testchi_squared
# python -m unittest discover -s tests
# python3 -m unittest discover -s Tests -p test*.py
class TestLanguageChecker(unittest.TestCase):
def test_integration_unusual_five(self):
<0... | ===========unchanged ref 0===========
at: unittest.case.TestCase
assertEqual(first: Any, second: Any, msg: Any=...) -> None
===========changed ref 0===========
# module: app.Tests.testintegration_languagechecker
# python3 -m unittest Tests.testchi_squared
# python -m unittest discover... |
app.Tests.testintegration_languagechecker/TestLanguageChecker.test_integration_unusual_6 | Modified | Ciphey~Ciphey | 71faf038330bcba5c6092c2b88cc18e85f8606a0 | final day | <0>:<add> lc = LanguageChecker()
<del> lc = LanguageChecker.languageChecker()
| # module: app.Tests.testintegration_languagechecker
# python3 -m unittest Tests.testchi_squared
# python -m unittest discover -s tests
# python3 -m unittest discover -s Tests -p test*.py
class TestLanguageChecker(unittest.TestCase):
def test_integration_unusual_6(self):
<0> ... | ===========unchanged ref 0===========
at: unittest.case.TestCase
assertEqual(first: Any, second: Any, msg: Any=...) -> None
===========changed ref 0===========
# module: app.Tests.testintegration_languagechecker
# python3 -m unittest Tests.testchi_squared
# python -m unittest discover... |
app.Tests.testintegration_languagechecker/TestLanguageChecker.test_integration_unusual_7 | Modified | Ciphey~Ciphey | 71faf038330bcba5c6092c2b88cc18e85f8606a0 | final day | <0>:<add> lc = LanguageChecker()
<del> lc = LanguageChecker.languageChecker()
| # module: app.Tests.testintegration_languagechecker
# python3 -m unittest Tests.testchi_squared
# python -m unittest discover -s tests
# python3 -m unittest discover -s Tests -p test*.py
class TestLanguageChecker(unittest.TestCase):
def test_integration_unusual_7(self):
<0> ... | ===========unchanged ref 0===========
at: unittest.case.TestCase
assertEqual(first: Any, second: Any, msg: Any=...) -> None
===========changed ref 0===========
# module: app.Tests.testintegration_languagechecker
# python3 -m unittest Tests.testchi_squared
# python -m unittest discover... |
app.Tests.testintegration_languagechecker/TestLanguageChecker.test_integration_addition | Modified | Ciphey~Ciphey | 71faf038330bcba5c6092c2b88cc18e85f8606a0 | final day | <3>:<add> lc = LanguageChecker()
<del> lc = LanguageChecker.languageChecker()
<6>:<add> lc2 = LanguageChecker()
<del> lc2 = LanguageChecker.languageChecker()
| # module: app.Tests.testintegration_languagechecker
# python3 -m unittest Tests.testchi_squared
# python -m unittest discover -s tests
# python3 -m unittest discover -s Tests -p test*.py
class TestLanguageChecker(unittest.TestCase):
def test_integration_addition(self):
<0> ... | ===========unchanged ref 0===========
at: unittest.case.TestCase
assertAlmostEqual(first: float, second: float, places: Optional[int]=..., msg: Any=..., delta: Optional[float]=...) -> None
assertAlmostEqual(first: datetime.datetime, second: datetime.datetime, places: Optional[int]=..., msg: Any=...,... |
app.Tests.testneural_network/TestNN.test_english_yes | Modified | Ciphey~Ciphey | 71faf038330bcba5c6092c2b88cc18e85f8606a0 | final day | <1>:<add> model = NeuralNetwork()
<del> model = nn.neuralNetwork()
| # module: app.Tests.testneural_network
# python3 -m unittest Tests.testchi_squared
# python -m unittest discover -s tests
# python3 -m unittest discover -s Tests -p test*.py
# ["sha1", "md5", "sha256", "sha512", "caeser", "plaintext"]
class TestNN(unittest.TestCase):
... | ===========unchanged ref 0===========
at: neuralNetworkMod.nn
NeuralNetwork()
at: neuralNetworkMod.nn.NeuralNetwork
predictnn(text)
at: numpy.core.arrayprint
set_printoptions(precision: None | SupportsIndex=..., threshold: None | int=..., edgeitems: None | int=..., linewidt... |
app.Tests.testneural_network/TestNN.test_sha1_yes | Modified | Ciphey~Ciphey | 71faf038330bcba5c6092c2b88cc18e85f8606a0 | final day | <0>:<add> model = NeuralNetwork()
<del> model = nn.neuralNetwork()
| # module: app.Tests.testneural_network
# python3 -m unittest Tests.testchi_squared
# python -m unittest discover -s tests
# python3 -m unittest discover -s Tests -p test*.py
# ["sha1", "md5", "sha256", "sha512", "caeser", "plaintext"]
class TestNN(unittest.TestCase):
... | ===========unchanged ref 0===========
at: neuralNetworkMod.nn
NeuralNetwork()
at: neuralNetworkMod.nn.NeuralNetwork
predictnn(text)
at: numpy.core.arrayprint
set_printoptions(precision: None | SupportsIndex=..., threshold: None | int=..., edgeitems: None | int=..., linewidt... |
app.Tests.testneural_network/TestNN.test_md5_yes | Modified | Ciphey~Ciphey | 71faf038330bcba5c6092c2b88cc18e85f8606a0 | final day | <0>:<add> model = NeuralNetwork()
<del> model = nn.neuralNetwork()
| # module: app.Tests.testneural_network
# python3 -m unittest Tests.testchi_squared
# python -m unittest discover -s tests
# python3 -m unittest discover -s Tests -p test*.py
# ["sha1", "md5", "sha256", "sha512", "caeser", "plaintext"]
class TestNN(unittest.TestCase):
... | ===========unchanged ref 0===========
at: neuralNetworkMod.nn
NeuralNetwork()
at: neuralNetworkMod.nn.NeuralNetwork
predictnn(text)
at: numpy.core.arrayprint
set_printoptions(precision: None | SupportsIndex=..., threshold: None | int=..., edgeitems: None | int=..., linewidt... |
app.Tests.testneural_network/TestNN.test_sha512_yes | Modified | Ciphey~Ciphey | 71faf038330bcba5c6092c2b88cc18e85f8606a0 | final day | <0>:<add> model = NeuralNetwork()
<del> model = nn.neuralNetwork()
| # module: app.Tests.testneural_network
# python3 -m unittest Tests.testchi_squared
# python -m unittest discover -s tests
# python3 -m unittest discover -s Tests -p test*.py
# ["sha1", "md5", "sha256", "sha512", "caeser", "plaintext"]
class TestNN(unittest.TestCase):
... | ===========unchanged ref 0===========
at: neuralNetworkMod.nn
NeuralNetwork()
at: neuralNetworkMod.nn.NeuralNetwork
predictnn(text)
at: numpy.core.arrayprint
set_printoptions(precision: None | SupportsIndex=..., threshold: None | int=..., edgeitems: None | int=..., linewidt... |
app.Tests.testneural_network/TestNN.test_caesar_yes | Modified | Ciphey~Ciphey | 71faf038330bcba5c6092c2b88cc18e85f8606a0 | final day | <0>:<add> model = NeuralNetwork()
<del> model = nn.neuralNetwork()
| # module: app.Tests.testneural_network
# python3 -m unittest Tests.testchi_squared
# python -m unittest discover -s tests
# python3 -m unittest discover -s Tests -p test*.py
# ["sha1", "md5", "sha256", "sha512", "caeser", "plaintext"]
class TestNN(unittest.TestCase):
... | ===========unchanged ref 0===========
at: neuralNetworkMod.nn
NeuralNetwork()
at: neuralNetworkMod.nn.NeuralNetwork
predictnn(text)
at: numpy.core.arrayprint
set_printoptions(precision: None | SupportsIndex=..., threshold: None | int=..., edgeitems: None | int=..., linewidt... |
app.Decryptor.Hash.hashBuster/crack | Modified | Ciphey~Ciphey | b5df79a4cb8938bdd5c321e2463e5c2375264637 | lol | <2>:<del> if not file:
<3>:<del> print ('%s Hash function : MD5' % info)
<7>:<add> return {"lc": None, "IsPlaintext?": True, "Plaintext": r, "Cipher": "md5", "Extra Information": None}
<del> return r
<9>:<del> if not file:
<10>:<del> ... | # module: app.Decryptor.Hash.hashBuster
def crack(hashvalue):
<0> result = False
<1> if len(hashvalue) == 32:
<2> if not file:
<3> print ('%s Hash function : MD5' % info)
<4> for api in md5:
<5> r = api(hashvalue, 'md5')
<6> ... | ===========unchanged ref 0===========
at: app.Decryptor.Hash.hashBuster
file = args.file
alpha(hashvalue, hashtype)
beta(hashvalue, hashtype)
gamma(hashvalue, hashtype)
delta(hashvalue, hashtype)
theta(hashvalue, hashtype)
at: app.Dec... |
app.Decryptor.basicEncryption.basic_parent/BasicParent.__init__ | Modified | Ciphey~Ciphey | b5df79a4cb8938bdd5c321e2463e5c2375264637 | lol | <2>:<add> self.reverse = Reverse(self.lc)
<add>
<add> self.list_of_objects = [self.caesar, self.reverse]
<del> self.list_of_objects = [self.caesar]
| # module: app.Decryptor.basicEncryption.basic_parent
class BasicParent:
def __init__(self, lc):
<0> self.lc = lc
<1> self.caesar = Caesar(self.lc)
<2> self.list_of_objects = [self.caesar]
<3>
| ===========unchanged ref 0===========
at: Decryptor.basicEncryption.caesar
Caesar(lc)
at: app.Decryptor.basicEncryption.basic_parent
BasicParent(lc)
at: app.Decryptor.basicEncryption.basic_parent.BasicParent.decrypt
self.lc = self.lc + answer["lc"]
===========chan... |
app.Decryptor.basicEncryption.basic_parent/BasicParent.decrypt | Modified | Ciphey~Ciphey | b5df79a4cb8938bdd5c321e2463e5c2375264637 | lol | <0>:<add> answers = []
<1>:<add> result = item.decrypt(text)
<del> item.decrypt(text)
<2>:<add> answers.append(result)
<add> for answer in answers:
<add> # adds the LC objects together
<add> self.lc = self.lc + answ... | # module: app.Decryptor.basicEncryption.basic_parent
class BasicParent:
def decrypt(self, text):
<0> for item in self.list_of_objects:
<1> item.decrypt(text)
<2> result = self.caesar.bruteforce()
<3>
| ===========unchanged ref 0===========
at: Decryptor.basicEncryption.reverse
Reverse(lc)
at: app.Decryptor.basicEncryption.basic_parent.BasicParent.__init__
self.lc = lc
self.caesar = Caesar(self.lc)
at: app.Decryptor.basicEncryption.basic_parent.BasicParent.decrypt
... |
app.Decryptor.basicEncryption.basic_parent/BasicParent.setProbTable | Modified | Ciphey~Ciphey | b5df79a4cb8938bdd5c321e2463e5c2375264637 | lol | <9>:<del> pprint.pprint(self.list_of_objects)
| # module: app.Decryptor.basicEncryption.basic_parent
class BasicParent:
+
def setProbTable(self, prob):
<0> self.probabilityDistribution = prob
<1> # we get a sorted list of objects :)
<2> counter = 0
<3> for key, val in self.probability... | ===========unchanged ref 0===========
at: Decryptor.basicEncryption.caesar.Caesar
decrypt(message)
at: Decryptor.basicEncryption.reverse.Reverse
decrypt(message)
at: app.Decryptor.basicEncryption.basic_parent.BasicParent.__init__
self.list_of_objects = [self.caesar, self.re... |
app.Tests.testintegration_languagechecker/TestLanguageChecker.test_basics_german | Modified | Ciphey~Ciphey | b5df79a4cb8938bdd5c321e2463e5c2375264637 | lol | <2>:<add> self.assertEqual(result, True)
<del> self.assertEqual(result, False)
| # module: app.Tests.testintegration_languagechecker
# python3 -m unittest Tests.testchi_squared
# python -m unittest discover -s tests
# python3 -m unittest discover -s Tests -p test*.py
class TestLanguageChecker(unittest.TestCase):
def test_basics_german(self):
<0> ... | ===========unchanged ref 0===========
at: languageCheckerMod.LanguageChecker
LanguageChecker()
at: languageCheckerMod.LanguageChecker.LanguageChecker
checkLanguage(text)
at: unittest.case.TestCase
failureException: Type[BaseException]
longMessage: bool
... |
app.Decryptor.basicEncryption.caesar/Caesar.decrypt | Modified | Ciphey~Ciphey | b5df79a4cb8938bdd5c321e2463e5c2375264637 | lol | <10>:<add> for counter, key in enumerate(range(len(SYMBOLS))):
<del> for key in range(len(SYMBOLS)):
<32>:<del> return {"lc": self.lc, "IsPlaintext?": True, "Plaintext": translated}
<33>:<del> return True
<34>:<add> return {"lc": self.lc, "IsPlain... | # module: app.Decryptor.basicEncryption.caesar
+
class Caesar():
def decrypt(self, message):
<0> ''' Simple python program to bruteforce a caesar cipher'''
<1>
<2> ''' Simple python program for the caesar cipher'''
<3>
<4>
<5> # Example string
<6... | ===========changed ref 0===========
+ # module: app.Decryptor.basicEncryption.reverse
+
+
===========changed ref 1===========
+ # module: app.Decryptor.basicEncryption.reverse
+ class Reverse:
+ def __init__(self, lc):
+ self.lc = lc
+
===========changed ref 2===========
# module: ap... |
app.Tests.testcaesarcipher_basic/TestChi.test_caesar_yes | Modified | Ciphey~Ciphey | b5df79a4cb8938bdd5c321e2463e5c2375264637 | lol | <4>:<add> self.assertEqual(result['IsPlaintext?'], True)
<del> self.assertEqual(result, True)
| # module: app.Tests.testcaesarcipher_basic
# python3 -m unittest Tests.testchi_squared
# python -m unittest discover -s tests
# python3 -m unittest discover -s Tests -p test*.py
+ # {"lc": self.lc, "IsPlaintext?": True, "Plaintext": translated, "Cipher": "Caesar"}
+
c... | ===========unchanged ref 0===========
at: app.Decryptor.basicEncryption.caesar
Caesar(lc)
at: languageCheckerMod.LanguageChecker
LanguageChecker()
at: unittest.case
TestCase(methodName: str=...)
===========changed ref 0===========
+ # module: app.Decryptor.basic... |
app.Tests.testcaesarcipher_basic/TestChi.test_caesar_no | Modified | Ciphey~Ciphey | b5df79a4cb8938bdd5c321e2463e5c2375264637 | lol | <4>:<add> self.assertEqual(result['IsPlaintext?'], False)
<del> self.assertEqual(result, False)
| # module: app.Tests.testcaesarcipher_basic
# python3 -m unittest Tests.testchi_squared
# python -m unittest discover -s tests
# python3 -m unittest discover -s Tests -p test*.py
+ # {"lc": self.lc, "IsPlaintext?": True, "Plaintext": translated, "Cipher": "Caesar"}
+
c... | ===========unchanged ref 0===========
at: app.Decryptor.basicEncryption.caesar
Caesar(lc)
at: app.Decryptor.basicEncryption.caesar.Caesar
decrypt(message)
at: app.Tests.testcaesarcipher_basic.TestChi.test_caesar_yes
c = Caesar(lc)
at: languageCheckerMod.LanguageChe... |
app.Tests.testcaesarcipher_basic/TestChi.test_caesar_plaintext_yes | Modified | Ciphey~Ciphey | b5df79a4cb8938bdd5c321e2463e5c2375264637 | lol | <0>:<add> """Checks to see if it returns True (it should)
<del> """Checks to see if it returns True (it should)"""
<1>:<add> Ok so this returns false becaues caesar only does up to 25, not 26
<add> so plaintext returns false!"""
<4>:<add> self.assertEqual(result[... | <s> app.Tests.testcaesarcipher_basic
# python3 -m unittest Tests.testchi_squared
# python -m unittest discover -s tests
# python3 -m unittest discover -s Tests -p test*.py
+ # {"lc": self.lc, "IsPlaintext?": True, "Plaintext": translated, "Cipher": "Caesar"}
+
class T... | ===========unchanged ref 0===========
at: app.Decryptor.basicEncryption.caesar.Caesar
decrypt(message)
at: app.Tests.testcaesarcipher_basic.TestChi.test_caesar_no
c = Caesar(lc)
at: unittest.case.TestCase
assertEqual(first: Any, second: Any, msg: Any=...) -> None
... |
app.main/Ciphey.one_level_of_decryption | Modified | Ciphey~Ciphey | d807e1be36658d01ef3c6d41dfb92c7e14f69aa7 | added multiprocessing | <6>:<add> ret = key.decrypt(self.text)
<add> print(ret)
| # module: app.main
class Ciphey:
def one_level_of_decryption(self):
<0> for key, val in self.whatToChoose.items():
<1> if key == str:
<2> continue
<3> # https://stackoverflow.com/questions/4843173/how-to-check-if-type-of-a-... | ===========unchanged ref 0===========
at: Decryptor.basicEncryption.basic_parent.BasicParent
setProbTable(prob)
at: app.main.Ciphey.decrypt
self.whatToChoose = {"Hashing":
{
"sha1": self.probabilityDistribution[0],
"md5": self.... |
app.Decryptor.basicEncryption.basic_parent/BasicParent.__init__ | Modified | Ciphey~Ciphey | d807e1be36658d01ef3c6d41dfb92c7e14f69aa7 | added multiprocessing | <4>:<add> self.list_of_objects = [self.caesar]
<del> self.list_of_objects = [self.caesar, self.reverse]
| # module: app.Decryptor.basicEncryption.basic_parent
class BasicParent:
def __init__(self, lc):
<0> self.lc = lc
<1> self.caesar = Caesar(self.lc)
<2> self.reverse = Reverse(self.lc)
<3>
<4> self.list_of_objects = [self.caesar, self.reverse]
<5>
... | ===========unchanged ref 0===========
at: Decryptor.basicEncryption.caesar
Caesar(lc)
at: Decryptor.basicEncryption.reverse
Reverse(lc)
at: app.Decryptor.basicEncryption.basic_parent.BasicParent.decrypt
self.lc = self.lc + answer["lc"]
===========changed ref 0====... |
app.Decryptor.basicEncryption.basic_parent/BasicParent.decrypt | Modified | Ciphey~Ciphey | d807e1be36658d01ef3c6d41dfb92c7e14f69aa7 | added multiprocessing | <0>:<add> self.text = text
<add>
<add> from multiprocessing.dummy import Pool as ThreadPool
<add> pool = ThreadPool(4)
<add> answers = pool.map(self.callDecrypt, self.list_of_objects)
<add>
<del> answers = []
<1>:<add> """for ite... | # module: app.Decryptor.basicEncryption.basic_parent
class BasicParent:
def decrypt(self, text):
<0> answers = []
<1> for item in self.list_of_objects:
<2> result = item.decrypt(text)
<3> answers.append(result)
<4> for answer in answers... | ===========unchanged ref 0===========
at: app.Decryptor.basicEncryption.basic_parent.BasicParent
callDecrypt(obj)
at: app.Decryptor.basicEncryption.basic_parent.BasicParent.__init__
self.list_of_objects = [self.caesar]
at: multiprocessing.dummy
Pool(processes: Optional[int]... |
app.Decryptor.basicEncryption.basic_parent/BasicParent.__init__ | Modified | Ciphey~Ciphey | 2da1a04b07204e39b3ea5dd5706638019c35ec1f | added basic encoding and hashing functionality | <4>:<add> self.list_of_objects = [self.caesar, self.reverse]
<del> self.list_of_objects = [self.caesar]
| # module: app.Decryptor.basicEncryption.basic_parent
class BasicParent:
def __init__(self, lc):
<0> self.lc = lc
<1> self.caesar = Caesar(self.lc)
<2> self.reverse = Reverse(self.lc)
<3>
<4> self.list_of_objects = [self.caesar]
<5>
| ===========unchanged ref 0===========
at: Decryptor.basicEncryption.caesar
Caesar(lc)
at: Decryptor.basicEncryption.reverse
Reverse(lc)
at: app.Decryptor.basicEncryption.basic_parent.BasicParent.decrypt
self.lc = self.lc + answer["lc"]
===========changed ref 0====... |
app.main/Ciphey.__init__ | Modified | Ciphey~Ciphey | 2da1a04b07204e39b3ea5dd5706638019c35ec1f | added basic encoding and hashing functionality | <10>:<add> self.hash = HashParent()
| # module: app.main
class Ciphey:
def __init__(self, text):
<0> # general purpose modules
<1> self.ai = NeuralNetwork()
<2> self.lc = LanguageChecker()
<3> self.mh = mathsHelper.mathsHelper()
<4>
<5> # the one bit of text given to u... | ===========unchanged ref 0===========
at: Decryptor.basicEncryption.basic_parent
BasicParent(lc)
at: mathsHelper
mathsHelper()
at: neuralNetworkMod.nn
NeuralNetwork()
===========changed ref 0===========
+ # module: app.Decryptor.Encoding.base64
+
+
=======... |
app.main/Ciphey.one_level_of_decryption | Modified | Ciphey~Ciphey | 2da1a04b07204e39b3ea5dd5706638019c35ec1f | added basic encoding and hashing functionality | <1>:<del> if key == str:
<2>:<del> continue
<7>:<add> if ret['IsPlaintext?']:
<add> print(ret)
<del> print(ret)
| # module: app.main
class Ciphey:
def one_level_of_decryption(self):
<0> for key, val in self.whatToChoose.items():
<1> if key == str:
<2> continue
<3> # https://stackoverflow.com/questions/4843173/how-to-check-if-type-of-a-... | ===========unchanged ref 0===========
at: Decryptor.basicEncryption.basic_parent.BasicParent
decrypt(text)
setProbTable(prob)
at: app.main.Ciphey.__init__
self.text = text
at: app.main.Ciphey.decrypt
self.whatToChoose = {self.hash:
{
... |
app.Decryptor.Encoding.encodingParent/EncodingParent.binary | Modified | Ciphey~Ciphey | 5d87f81237e5ea249f2169f18b81299a66b10414 | final day | <2>:<del> def text_from_bits(bits, encoding='utf-8', errors='surrogatepass'):
<3>:<del> n = int(bits, 2)
<4>:<del> return int2bytes(n).decode(encoding, errors)
<5>:<del>
<6>:<del> def int2bytes(i):
<7>:<del> hex_string = '%x' % i
<8>:<del> ... | # module: app.Decryptor.Encoding.encodingParent
class EncodingParent:
+
def binary(self, text):
<0> import binascii
<1>
<2> def text_from_bits(bits, encoding='utf-8', errors='surrogatepass'):
<3> n = int(bits, 2)
<4> return int2bytes(n).... | ===========unchanged ref 0===========
at: app.Decryptor.Encoding.encodingParent.EncodingParent.__init__
self.lc = lc
at: app.Decryptor.Encoding.encodingParent.EncodingParent.binary
result = text_from_bits(text)
===========changed ref 0===========
# module: app.Decryptor.Encodi... |
app.main/Ciphey.__init__ | Modified | Ciphey~Ciphey | 7b1cc0bfac94db6e6242e41bde767f95eb8b49da | yadyada# | <11>:<add> self.encoding = EncodingParent(self.lc)
| # module: app.main
class Ciphey:
def __init__(self, text):
<0> # general purpose modules
<1> self.ai = NeuralNetwork()
<2> self.lc = LanguageChecker()
<3> self.mh = mathsHelper.mathsHelper()
<4>
<5> # the one bit of text given to u... | ===========unchanged ref 0===========
at: Decryptor.basicEncryption.basic_parent
BasicParent(lc)
at: mathsHelper
mathsHelper()
at: neuralNetworkMod.nn
NeuralNetwork()
|
app.Decryptor.Encoding.encodingParent/EncodingParent.__init__ | Modified | Ciphey~Ciphey | 7b1cc0bfac94db6e6242e41bde767f95eb8b49da | yadyada# | <1>:<add> self.base64 = Base64(self.lc)
<add> self.binary = Binary(self.lc)
| # module: app.Decryptor.Encoding.encodingParent
+
class EncodingParent:
def __init__(self, lc):
<0> self.lc = lc
<1>
| ===========unchanged ref 0===========
at: Decryptor.Encoding.binary
Binary(lc)
===========changed ref 0===========
# module: app.main
class Ciphey:
def __init__(self, text):
# general purpose modules
self.ai = NeuralNetwork()
self.lc = L... |
app.Decryptor.Encoding.encodingParent/EncodingParent.decrypt | Modified | Ciphey~Ciphey | 7b1cc0bfac94db6e6242e41bde767f95eb8b49da | yadyada# | <11>:<add> answers = pool.map(self.callDecrypt, torun)
<add>
<add> for answer in answers:
<add> # adds the LC objects together
<add> self.lc = self.lc + answer["lc"]
<add> if answer["IsPlaintext?"]:
<add> return an... | # module: app.Decryptor.Encoding.encodingParent
+
class EncodingParent:
def decrypt(self, text):
<0> self.text = text
<1> torun = [self.base64]
<2> """
<3> ok so I have an array of functions
<4> and I want to apply each function to some t... | ===========unchanged ref 0===========
at: Decryptor.Encoding.base64
Base64(lc)
at: Decryptor.Encoding.binary
Binary(lc)
at: app.Decryptor.Encoding.encodingParent.EncodingParent
callDecrypt(obj)
at: app.Decryptor.Encoding.encodingParent.EncodingParent.decrypt
... |
app.Decryptor.Encoding.base64/Base64.decrypt | Modified | Ciphey~Ciphey | 7b1cc0bfac94db6e6242e41bde767f95eb8b49da | yadyada# | <3>:<add> print("********************************", str(result))
| # module: app.Decryptor.Encoding.base64
class Base64:
def decrypt(self, text):
<0>
<1> try:
<2> result = base64.b64decode(text)
<3> except binascii.Error as e:
<4> return {"lc": self.lc, "IsPlaintext?": False, "Plaintext": None, "Ciphe... | ===========unchanged ref 0===========
at: app.Decryptor.Encoding.base64.Base64.__init__
self.lc = lc
at: base64
b64decode(s: _decodable, altchars: Optional[bytes]=..., validate: bool=...) -> bytes
===========changed ref 0===========
+ # module: app.Tests.testEncoding
+ sys.pat... |
app.Decryptor.Encoding.encodingParent/EncodingParent.__init__ | Modified | Ciphey~Ciphey | c933b7ac1b2f12796de549c31dbd6ec72ed0c503 | finished encoding i think | <3>:<add> self.hex = Hexadecimal(self.lc)
| # module: app.Decryptor.Encoding.encodingParent
class EncodingParent:
def __init__(self, lc):
<0> self.lc = lc
<1> self.base64 = Base64(self.lc)
<2> self.binary = Binary(self.lc)
<3>
| ===========unchanged ref 0===========
at: Decryptor.Encoding.base64
Base64(lc)
at: app.Decryptor.Encoding.encodingParent.EncodingParent.decrypt
self.lc = self.lc + answer["lc"]
===========changed ref 0===========
+ # module: app.Decryptor.Encoding.ascii
+
+
===========chan... |
app.Decryptor.Encoding.encodingParent/EncodingParent.decrypt | Modified | Ciphey~Ciphey | c933b7ac1b2f12796de549c31dbd6ec72ed0c503 | finished encoding i think | <1>:<add> torun = [self.base64, self.binary, self.hex]
<del> torun = [self.base64]
| # module: app.Decryptor.Encoding.encodingParent
class EncodingParent:
def decrypt(self, text):
<0> self.text = text
<1> torun = [self.base64]
<2> """
<3> ok so I have an array of functions
<4> and I want to apply each function to some t... | ===========unchanged ref 0===========
at: Decryptor.Encoding.binary
Binary(lc)
at: Decryptor.Encoding.hexadecimal
Hexadecimal(lc)
at: app.Decryptor.Encoding.encodingParent.EncodingParent
callDecrypt(obj)
at: app.Decryptor.Encoding.encodingParent.EncodingParent.__in... |
app.Tests.testEncoding/TestNN.test_english_yes | Modified | Ciphey~Ciphey | c933b7ac1b2f12796de549c31dbd6ec72ed0c503 | finished encoding i think | <2>:<add> result = ep.decrypt("eW91ciB0ZXh0")
<del> ep.decrypt("eW91ciB0ZXh0")
<3>:<add> self.assertEqual(result['IsPlaintext?'], True)
| # module: app.Tests.testEncoding
# python3 -m unittest Tests.testchi_squared
# python -m unittest discover -s tests
# python3 -m unittest discover -s Tests -p test*.py
# ["sha1", "md5", "sha256", "sha512", "caeser", "plaintext"]
class TestNN(unittest.TestCase):
... | ===========unchanged ref 0===========
at: app.Decryptor.Encoding.encodingParent
EncodingParent(lc)
at: app.Decryptor.Encoding.encodingParent.EncodingParent
decrypt(text)
===========changed ref 0===========
# module: app.Decryptor.Encoding.encodingParent
class Encodin... |
app.Decryptor.Encoding.base64/Base64.decrypt | Modified | Ciphey~Ciphey | c933b7ac1b2f12796de549c31dbd6ec72ed0c503 | finished encoding i think | <3>:<add> # yeet turning b strings into normal stringy bois
<add> result = result.decode("utf-8")
<add> except UnicodeDecodeError as e:
<add> return {"lc": self.lc, "IsPlaintext?": False, "Plaintext": None, "Cipher": None, "Extra Information": None}
... | # module: app.Decryptor.Encoding.base64
class Base64:
def decrypt(self, text):
<0>
<1> try:
<2> result = base64.b64decode(text)
<3> print("********************************", str(result))
<4> except binascii.Error as e:
<5> ... | ===========unchanged ref 0===========
at: base64
b64decode(s: _decodable, altchars: Optional[bytes]=..., validate: bool=...) -> bytes
===========changed ref 0===========
+ # module: app.Decryptor.Encoding.ascii
+
+
===========changed ref 1===========
+ # module: app.Decryptor.Encoding.as... |
app.Decryptor.Encoding.binary/Binary.decrypt | Modified | Ciphey~Ciphey | c933b7ac1b2f12796de549c31dbd6ec72ed0c503 | finished encoding i think | <1>:<add> result = self.decode(text)
<del> ret = text_to_bits(text)
<4>:<add> except TypeError as e:
<add> return {"lc": self.lc, "IsPlaintext?": False, "Plaintext": None, "Cipher": None, "Extra Information": None}
<add>
| # module: app.Decryptor.Encoding.binary
class Binary:
def decrypt(self, text):
<0> try:
<1> ret = text_to_bits(text)
<2> except ValueError as e:
<3> return {"lc": self.lc, "IsPlaintext?": False, "Plaintext": None, "Cipher": None, "Extra In... | ===========unchanged ref 0===========
at: app.Decryptor.Encoding.binary.Binary
decode(text)
at: app.Decryptor.Encoding.binary.Binary.__init__
self.lc = lc
===========changed ref 0===========
+ # module: app.Decryptor.Encoding.ascii
+
+
===========changed ref 1===========
... |
app.Decryptor.Encoding.encodingParent/EncodingParent.__init__ | Modified | Ciphey~Ciphey | 4eec54d8c5ccce2a8ab05ea453251c0c5de167f3 | viginere cipher | <4>:<add> self.ascii = Ascii(self.lc)
| # module: app.Decryptor.Encoding.encodingParent
class EncodingParent:
def __init__(self, lc):
<0> self.lc = lc
<1> self.base64 = Base64(self.lc)
<2> self.binary = Binary(self.lc)
<3> self.hex = Hexadecimal(self.lc)
<4>
| ===========unchanged ref 0===========
at: Decryptor.Encoding.base64
Base64(lc)
at: Decryptor.Encoding.binary
Binary(lc)
at: app.Decryptor.Encoding.encodingParent.EncodingParent.decrypt
self.lc = self.lc + answer["lc"]
===========changed ref 0===========
+ # modu... |
app.Decryptor.Encoding.encodingParent/EncodingParent.decrypt | Modified | Ciphey~Ciphey | 4eec54d8c5ccce2a8ab05ea453251c0c5de167f3 | viginere cipher | <1>:<add> torun = [self.base64, self.binary, self.hex, self.ascii]
<del> torun = [self.base64, self.binary, self.hex]
| # module: app.Decryptor.Encoding.encodingParent
class EncodingParent:
def decrypt(self, text):
<0> self.text = text
<1> torun = [self.base64, self.binary, self.hex]
<2> """
<3> ok so I have an array of functions
<4> and I want to apply ... | ===========unchanged ref 0===========
at: Decryptor.Encoding.ascii
Ascii(lc)
at: Decryptor.Encoding.hexadecimal
Hexadecimal(lc)
at: app.Decryptor.Encoding.encodingParent.EncodingParent
callDecrypt(obj)
at: app.Decryptor.Encoding.encodingParent.EncodingParent.__init... |
app.Decryptor.Encoding.ascii/Ascii.decrypt | Modified | Ciphey~Ciphey | 4eec54d8c5ccce2a8ab05ea453251c0c5de167f3 | viginere cipher | <0>:<add> try:
<add> result = self.deascii(text)
<add> except ValueError as e:
<add> return {"lc": self.lc, "IsPlaintext?": False, "Plaintext": None, "Cipher": None, "Extra Information": None}
<add> except TypeError as e:
<add> r... | # module: app.Decryptor.Encoding.ascii
class Ascii:
def decrypt(self, text):
<0> pass
<1>
| ===========changed ref 0===========
+ # module: app.Decryptor.basicEncryption.viginere
+
+
===========changed ref 1===========
+ # module: app.Decryptor.basicEncryption.vigenereHacker
+
+
+ def getItemAtIndexOne(items):
+ return items[1]
+
===========changed ref 2===========
+ # module: ... |
app.mathsHelper/mathsHelper.__init__ | Modified | Ciphey~Ciphey | 326e932fa8e472d9a69c8d47a6f9694dcfab6fdd | fixed serious bug with language checker | <0>:<add> self.ETAOIN = 'ETAOINSHRDLCUMWFGYPBVKJXQZ'
<add> self.LETTERS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
<del> None
| # module: app.mathsHelper
class mathsHelper:
def __init__(self):
<0> None
<1>
| ===========changed ref 0===========
+ # module: app.Decryptor.basicEncryption.CrackingCodesFiles.addNumbers
+ def addNumbers(a, b):
+ return a + b
+
===========changed ref 1===========
+ # module: app.Decryptor.basicEncryption.CrackingCodesFiles.passingReference
+ def eggs(someParameter):
+ somePa... |
app.Decryptor.basicEncryption.basic_parent/BasicParent.__init__ | Modified | Ciphey~Ciphey | 326e932fa8e472d9a69c8d47a6f9694dcfab6fdd | fixed serious bug with language checker | <3>:<add> self.viginere = Viginere(self.lc)
<4>:<add> self.list_of_objects = [self.caesar, self.reverse, self.viginere]
<del> self.list_of_objects = [self.caesar, self.reverse]
| # module: app.Decryptor.basicEncryption.basic_parent
class BasicParent:
def __init__(self, lc):
<0> self.lc = lc
<1> self.caesar = Caesar(self.lc)
<2> self.reverse = Reverse(self.lc)
<3>
<4> self.list_of_objects = [self.caesar, self.reverse]
<5>
... | ===========unchanged ref 0===========
at: Decryptor.basicEncryption.caesar
Caesar(lc)
at: Decryptor.basicEncryption.reverse
Reverse(lc)
at: Decryptor.basicEncryption.viginere
Viginere(lc)
at: app.Decryptor.basicEncryption.basic_parent.BasicParent.decrypt
se... |
app.Decryptor.basicEncryption.basic_parent/BasicParent.decrypt | Modified | Ciphey~Ciphey | 326e932fa8e472d9a69c8d47a6f9694dcfab6fdd | fixed serious bug with language checker | <13>:<add> print(answer)
| # module: app.Decryptor.basicEncryption.basic_parent
class BasicParent:
def decrypt(self, text):
<0> self.text = text
<1>
<2> from multiprocessing.dummy import Pool as ThreadPool
<3> pool = ThreadPool(4)
<4> answers = pool.map(self.callDecrypt, self... | ===========unchanged ref 0===========
at: app.Decryptor.basicEncryption.basic_parent.BasicParent
callDecrypt(obj)
at: app.Decryptor.basicEncryption.basic_parent.BasicParent.__init__
self.lc = lc
self.caesar = Caesar(self.lc)
self.reverse = Reverse(self.lc)
... |
app.languageCheckerMod.dictionaryChecker/dictionaryChecker.checkDictionary | Modified | Ciphey~Ciphey | 326e932fa8e472d9a69c8d47a6f9694dcfab6fdd | fixed serious bug with language checker | <14>:<add> f = [x.strip().lower() for x in f]
<del> counter = 0.00
<33>:<add>
<add> for dictLengthCounter, word in enumerate(f):
<add> # if there is more words counted than there is text
<add> # it is 100%, sometimes it goes over
<add> ... | # module: app.languageCheckerMod.dictionaryChecker
class dictionaryChecker:
def checkDictionary(self, text, language):
<0> """Compares a word with
<1> The dictionary is sorted and the text is sorted"""
<2> # reads through most common words / passwords
<3> ... | ===========below chunk 0===========
# module: app.languageCheckerMod.dictionaryChecker
class dictionaryChecker:
def checkDictionary(self, text, language):
# offset: 1
return(counter)
===========unchanged ref 0===========
at: app.languageCheckerMod.dictionaryChecker.diction... |
app.Decryptor.basicEncryption.viginere/Viginere.__init__ | Modified | Ciphey~Ciphey | 326e932fa8e472d9a69c8d47a6f9694dcfab6fdd | fixed serious bug with language checker | <0>:<add> self.LETTERS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
<add> self.SILENT_MODE = True # If set to True, program doesn't print anything.
<add> self.NUM_MOST_FREQ_LETTERS = 4 # Attempt this many letters per subkey.
<add> self.MAX_KEY_LENGTH = 16 # Will not attempt keys lon... | # module: app.Decryptor.basicEncryption.viginere
class Viginere:
def __init__(self, lc):
<0> self.lc = lc
<1> self.MAX_KEY_LENGTH = 16
<2> self.self.NONself.LETTERS_PATTERN = re.compile('[^A-Z]')
<3> self.LETTERS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
<4> ... | ===========changed ref 0===========
+ # module: app.Decryptor.basicEncryption.CrackingCodesFiles.primeNum
+
+
===========changed ref 1===========
+ # module: app.Decryptor.basicEncryption.CrackingCodesFiles.detectEnglish
+
+
===========changed ref 2===========
+ # module: app.Decryptor.basicEncryption... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.