Posts

Showing posts from August, 2019

Railfence Encryption

Question: Railfence Encryption. Input: rajesh Output: rjsaeh     program: def enc(plain):     c1=''     c2=''     for i in range(0,len(plain),2):         c1+=plain[i]     for i in range(1,len(plain),2):         c2+=plain[i]     cipher=c1+c2     return(cipher) plain=str(input("Enter Plain Text:")) print(enc(plain))  

Ceaser Cipher Encryption

Question: Ceaser cipher Encrytion. Input: Plaintext : rajesh key : 3 Output: udmhvk    program: def ceaser(a,b):     z=[]     c=[]     for i in a:         if(i=='z' or i=='Z'):             x=ord(i)+b-26         else:             x=ord(i)+b         z.append(x)         d=chr(x)         c.append(d)     cipher=""     for i in c:            cipher+=i     return(cipher) a=str(input("Enter plain text:")) b=int(input("Enter key:")) print('Ceaser cipher:'+ceaser(a,b))

Employee data storing

Question:   Employee data storing using python and view data using ID, and ID is generated on runtime. Input Data: First Name, Last Name, DOB. this program stores the data on runtime only using list to store the data.  Program: x=0 ll=[] while x==0:     print("1.ADD\n2.VIEW\n3.EXIT")     n=int(input("Enter Choice:"))     e=[]     if n==1:         f=input("First Name:")         e.append(f)         l=input("Last Name:")         e.append(l)         d=input("DD-MM-YYYY:")         e.append(d)         i=f+l[0]+d[6:]         e.append(i)         ll.append(e)     elif n==2:         eid=input("Enter Employee ID:")         for j in range(0,len(ll)):                 if(ll[j][3] == eid):                     print("First Name:"+ll[j][0] +"\nLast Name:"+ll[j][1]+ "\nDOB:"+ll[j][2]+ "\nid:"+ll[j][3])     elif n==3:         x=1           this program stores the data in the text file .

Opennebula Configuration

Image
Opennebula Configuration: Opennebula configuration for Ubuntu 16.04, open Terminal (Ctrl+alt+T) and run the below command one by one, Commands: sudo wget -q -O- http://downloads.opennebula.org/repo/Ubuntu/repo.key | apt-key - sudo chmod 777 /etc/apt/sources.list.d/ sudo echo "deb http://downloads.opennebula.org/repo/Ubuntu/14.04 stable opennebula" \ > >/etc/apt/sources.list.d/opennebula.list sudo apt-get update sudo apt-get install opennebula opennebula-sunstone nfs-kernel-server sudo gedit /etc/one/sunstone-server.conf ##replace the ":host:127.0.0.1" as below line in the file sunstone-server.conf### ############### :host: 0.0.0.0 ############### sudo /etc/init.d/opennebula-sunstone restart sudo su - oneadmin cp ~/.ssh/id_rsa.pub ~/.ssh/authorized_keys cat << EOT > ~/.ssh/config > Host > * > StrictHostKeyChecking no > UserKnownHostsFile /dev/null > EOT chmod 600 ~/.ssh/config su - root1 #replace root1 as your username# echo

String Sorting

This is the problem, I have solved Today, this question is asked in  the   Infosys   INFYQT Certification exam. Question: Arrange the string based on the number in the string Input: bc43,fg23hg,gh22,hjjk44 Output: gh22,fg23hg,hjjk43,hjjk43 Program: python3 s=input("").split(',') print(s) l=[] d={} r=[] for i in s:     a=' '     for j in i:         if(not ord(j)>=ord('a') and ord(j)<=ord('z') or ord(j)>=ord('A') and ord(j)<=ord('Z')):             a=str(a)+str(j)     l.append(int(a)) #print(l) for i in range(len(l)):     d[l[i]]=s[i] #print(d) l.sort() #print(l) for i in l:     r.append(d[i])     #print(r) b='' for i in r:     b=str(b)+i+',' print(b)      

vigneshkannan

Image
Hi, I am Vignesh.K pursuing Final Year BE.Computer Science Engineering in Mailam Engineering college at Villupuram, today date is 17 Aug 2019, it's a rainy morning , it's a day I am started writing blog. I want say about my knowledge, I am an average student in studies but I want to learn things practically that's why go with self learning, I am interested in the Topics, Computer Networks, Penetration Testing, Linux, Operating System . I have practiced some of the things under penetration testing like nmap, metasploit, Burpsuit, shodan. nmap is tool, used scan the vulnerability of the website and extract some information about the website like what are the protocols are active and open the server operating system and so on, the tool is open source we can download in the github, nmap . metasploit is a hacking frame work, we can use metasploit to hack most of the device, I am a beginner in the metasploit, I have practiced some things in the metasploit they are ha