Decrypt The Link To Get The Answer

The link below is encrypted with Shift Cypher of unknown shift::

qcifgsg.srl.cfu/qcifgsg/VofjofrL/QG50l/2014_H1/wbtc

This link will take you to a CS course offered by edx starting 1st Jan, 2014.

The answer to this problem lies in the link below. But this link too is encrypted with the shift used to encrypt the above link. Go to the original link which is encrypted below and you will find your answer there.

uwgh.uwhvip.qca/obcbmacig/8207770

Request and Clarification:

For example, if 'abc123' were to be encypted with Shift Cypher , it will be 'def123' and the shift used to encypt this text is 3 because each letter is shifted by 3 places in aphabetical order.

Hint


The answer is 123.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

8 solutions

Discussions for this problem are now closed

Trevor B.
Jan 10, 2014

The three letters before the slash are usually "com," "org," etc. Notice that the second letter in "qca" is two letters earlier in the alphabet than the third letter, like in "com." Using this, we find the Caesar cipher is +12, meaning A=M, B=N, C=O, etc. Using this on the rest of the code, the full URL is https://gist.github.com/anonymous/8207770 . The first line on that link says the answer is 123 . \boxed{123}.

The fourth line will tell you that you are awesome. (Though I think it would have been really funny if "Secret Message" was coded as well.)

Thaddeus Abiy
Jan 5, 2014

A Shift Cipher is the same thing as a Caesar's cipher. Caesar's cipher is a rather vulnerable cipher and can easily be brute-forced as there are only 26 possible passwords or 'shifts'.The python code below prints all of the 27 possibilities,clearly the one with 12 shifts only makes sense.

def caesar(plainText, shift): 
    plainText = plainText.lower()
    for ch in plainText:
        if not ch.isalpha():return plainText
        if ch.isalpha():
            stayInAlphabet = ord(ch) + shift 
            if stayInAlphabet > ord('z'):
                stayInAlphabet -= 26
            finalLetter = chr(stayInAlphabet)
        cipherText = ""
        cipherText += finalLetter        
    return cipherText
def sc(p,s):
    return reduce(lambda x,y:x+y,[caesar(i,s) for i in p])
for i in range(1,27):
    print i,sc('qcifgsg.srl.cfu/qcifgsg/VofjofrL/QG50l/2014_H1/wbtc',i),'\n'

Is there a way in another language to check if a website exists, based off of the same logic in this code? It could tell that http://www.google.com/#q=brilliant exists but not iuuq://xxx.hpphmf.dpn/#r=csjmmjbou doesn't.

Trevor B. - 7 years, 5 months ago

This code actually doesn't determine if the URL is valid or not , it just prints all the 26 possibilities. It is possible to make such a program though,all you would have to do was use the urllib library in python. Practically go through the possible URLs and send a request to the site and check it if returns an error

Thaddeus Abiy - 7 years, 5 months ago
Prome Nabid
Jan 21, 2014

The shift for this shift cipher is 14. The link "uwgh.uwhvip.qca/obcbmacig/8207770" contains "qca". It can be "com"/"edu"/"org"/.. . "com" matches with "qca" by 14 shifts. Thus we get "gist.github.com/anonymous/8207770". A B C D E F G H I J K L M N O P Q R S T U V W X Y Z O P Q R S T U V W X Y Z A B C D E F G H I J K L M N

Mayssara Moëtez
Apr 22, 2014

C Code

main()

{ int i,j,x=0, a,b,k,n; char s[]="qcifgsg.srl.cfu/qcifgsg/VofjofrL/QG50l/2014_H1/wbtc", c,s2[]="uwgh.uwhvip.qca/obcbmacig/8207770"; a=strlen (s); b=strlen (s2); for(j=1; j<26; j++) { for(i=0; i<a; i++)

   { 
       if( isalpha( s[i] ) )
       {

         c=s[i]+j; 
         if(isupper(s[i]) && (s[i]+j>'Z'))
         c=c-26;

         else if(islower(s[i]) && (s[i]+j>'z'))
         c=c-26;

       }
       else 
       c=s[i];
       if(c=='e' && x==0)
           x++;
       else if(c=='d' && x==1)
           x++;   
       else if(c=='x' && x==2)
           x++;
       else x=0;

        if(x==3)
         n=j; 
   }
              }for(k=0; k<b; k++)

   { 
       if( isalpha( s2[k] ) )
       {

         c=s2[k]+n; 
         if(isupper(s2[k]) && (s2[k]+n>'Z'))
         c=c-26;

         else if(islower(s2[k]) && (s2[k]+n>'z'))
         c=c-26;

       }
       else 
       c=s2[k];
 printf("%c", c);

} }

Cameron Bernhardt
Apr 13, 2014

The shift in this case is 14 because first link must be 'edx' and instead it is 'srl'. In the English alphabet, 'e' is 14 letters away from 's', so all of the other letters in the first link are 14 letters away from the decrypted phrase. Because the second link has the same shift, all of the letters are shifted by 14. So,

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
shift = int(raw_input("Enter shift: ")) #14

alpha = "abcdefghijklmnopqrstuvwxyz" #English alphabet

encr = raw_input("Enter encrypted phrase: ").lower() #uwgh.uwhvip.qca/obcbmacig/8207770

decr = ""

for x in encr:
  if x in alpha:
    decr += alpha[alpha.index(x) - shift] #adds decrypted letters to a new string

print decr #gistgithubcomanonymous, the root, which is all we need: http://gist.github.com/anonymous/8207770

Sandeep Thakur
Mar 1, 2014

Using Javascript by sandy and aman

Ivan Dimitrov
Jan 18, 2014

Solution Python

#    inputLink = "uwgh.uwhvip.qca/obcbmacig/8207770"
#    outputLink = ""
#
#    for s in inputLink.lower():
#        if s in l:
#            outputLink += l[l.index(s) - 14]
#        else:
#            outputLink += s
#
#    print outputLink

#    Edited 
#    import string
#    l = list(string.ascii_lowercase)
#    inputLink = "uwgh.uwhvip.qca/obcbmacig/8207770"
#    outputLink = ""
#
#    for s in inputLink.lower():
#        if s in l:
#            outputLink += l[l.index(s) - 14]
#        else:
#            outputLink += s
#
#    print outputLink

Ivan Dimitrov - 7 years, 4 months ago
DreamRunner Moshi
Jan 12, 2014

At first I checked domains of * q c i f g s g . s r l . c f u / q c i f g s g / V o f j o f r L / Q G 50 l / 201 4 H 1 / w b t c qcifgsg.srl.cfu/qcifgsg/VofjofrL/QG50l/2014_H1/wbtc * because we know all the domains . Here domains are .srl and .cfu. And I can match .srl to .edu with 14 backward shift and .cfu becomes .org. And this is my code:

import sys

alpha =['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z']

encriptedURL= "uwgh.uwhvip.qca/obcbmacig/8207770"
for e in encriptedURL:
    if e>='a' and e<='z':
        index =(alpha.index(e)-14)%26
        if (index)<0:
            index = index*-1
        sys.stdout.write(alpha[index])
    else:
        sys.stdout.write(e)

After running this code I have Answer .

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...