Monday, July 7, 2014
Sunday, April 20, 2014
DECRYPTION IN UNIX C
DECRYPTION
[ragava@localhost ~]$ cat dc.c
#include<stdio.h>
main(int argc, char *argv[])
{
int i;
char a[2000],b;
FILE *fp;
if(argc!=2)
{
printf("Usage error");
return;
}
fp=fopen(argv[1],"r");
if(fp==NULL)
{
printf("ERROR IN OPENING A FILE");
return;
}
for(i=0,a[i]=getc(fp);feof(fp)!=0;a[++i]=getc(fp))
;
a[i]='\0';
fclose(fp);
remove(argv[1]);
fp=fopen(argv[1],"w");
for(i=0;a[i]!='\0';i++)
{
b=a[i]-2;
putc(b,fp);
}
fclose(fp);
}
[ragava@localhost ~]$
[ragava@localhost ~]$ cat dc.c
#include<stdio.h>
main(int argc, char *argv[])
{
int i;
char a[2000],b;
FILE *fp;
if(argc!=2)
{
printf("Usage error");
return;
}
fp=fopen(argv[1],"r");
if(fp==NULL)
{
printf("ERROR IN OPENING A FILE");
return;
}
for(i=0,a[i]=getc(fp);feof(fp)!=0;a[++i]=getc(fp))
;
a[i]='\0';
fclose(fp);
remove(argv[1]);
fp=fopen(argv[1],"w");
for(i=0;a[i]!='\0';i++)
{
b=a[i]-2;
putc(b,fp);
}
fclose(fp);
}
[ragava@localhost ~]$
ENCRYPTION IN UNIX C
ENCRYPTION
[ragava@localhost ~]$ cat ec.c
#include<stdio.h>
main(int argc, char *argv[])
{
int i;
char a[2000],b;
FILE *fp;
if(argc!=2)
{
printf("Usage error");
return;
}
fp=fopen(argv[1],"r");
if(fp==NULL)
{
printf("ERROR IN OPENING A FILE");
return;
}
for(i=0,a[i]=getc(fp);feof(fp)!=0;a[++i]=getc(fp))
;
a[i]='\0';
fclose(fp);
remove(argv[1]);
fp=fopen(argv[1],"w");
for(i=0;a[i]!='\0';i++)
{
b=a[i]+2;
putc(b,fp);
}
fclose(fp);
}
SENDING MAIL THROUGH C#
SMTP MAIL IN C SHARP
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Net;
using System.Net.Mail;
namespace mailing
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
MailMessage message = new MailMessage();
message.To.Add("ragava08@ymail.com");
message.Subject = "SUBJECT";
message.From = new MailAddress("ragava08@gmail.com");
message.Body = "BODY PART";
SmtpClient SmtpServer = new SmtpClient("smtp.gmail.com");
SmtpServer.Port = 587;
SmtpServer.Credentials = new System.Net.NetworkCredential("ragava08@gmail.com", "password");
SmtpServer.EnableSsl = true;
SmtpServer.Send(message);
MessageBox.Show("Message successfully sent");
}
}
}
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Net;
using System.Net.Mail;
namespace mailing
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
MailMessage message = new MailMessage();
message.To.Add("ragava08@ymail.com");
message.Subject = "SUBJECT";
message.From = new MailAddress("ragava08@gmail.com");
message.Body = "BODY PART";
SmtpClient SmtpServer = new SmtpClient("smtp.gmail.com");
SmtpServer.Port = 587;
SmtpServer.Credentials = new System.Net.NetworkCredential("ragava08@gmail.com", "password");
SmtpServer.EnableSsl = true;
SmtpServer.Send(message);
MessageBox.Show("Message successfully sent");
}
}
}
Tuesday, March 11, 2014
Thursday, January 30, 2014
HTML
SIMPLE HOMEPAGE FOR EASY NAVIGATION TO FREQUENTLY VISITING WEBSITE:
<html>
<head>
<title> Home page </title>
</head>
<body>
<h1>WELCOME TO HOME PAGE</h1>
<body bgcolor="blue" text="black">
<a href="http//www.google.com"><input type="button" value="Google"></a></br>
<a href="http//www.googlemaps.com"><input type="button" value="Google Map"></a></br>
<a href="http//www.wikipedia.com"><input type="button" value="WIKIPEDIA"></a></br>
<a href="http//www.ragava08.blogspot.com"><input type="button" value="ragava08"></a></br>
</body>
</html>
------
NOTE: <a href="http//www.google.com"> //In above code,Change the URL specified in these tags for customized usage.
Saturday, September 21, 2013
Subscribe to:
Posts (Atom)