Hi, can anyone suggest me the code or script which will work as a self replicating application. I want to do this for the prior knowledge. Can anyone help me in this case. It can be work as any virus or malware, so that one will be fooled.
Hi, can anyone suggest me the code or script which will work as a self replicating application. I want to do this for the prior knowledge. Can anyone help me in this case. It can be work as any virus or malware, so that one will be fooled.
Hi, I don't think that this would be possible with the help of simple program. If you want to make self replicating program then it needs a quiet big program. I don't have that much knowledge. So, It is not possible to me to do it. But I will definitely search on the internet or give you some or the other reference book name from which you can do this. I will give you reply as soon as possible, as I am also now curious about this. So, just wait and watch this forum.
Hi, to make a self replicating program is very simple. You can refer to the following code and make use of it to do it.
Code:class S { public static void main(String[]a) { char a=34; String s="class S{public static void main(String[]a){char c=34; Strings=;" + "System.out.println(s.substring(0,62)+c+s+c+s.substring(62));}}"; System.out.println(s.substring(0,62)+c+s+c+s.substring(62)); } }
Hi, I don't know how to create Self Replicating Program, but one of my friend given me the source which can do this for you, if you want. I don't know whether it will work or not, but you can try for it. Just make use of and if you get success reply me. Below is the example:
Code:class replicate { public static void main(String x[]){String []s={"class a{2}public static void main(String x[]){2}String"+"[]s={2}{1}{0}{1};new String(new char[]{2}34}),new String"+"(new char[]2}123}); System.out.println(java.text.MessageFormat"+".format(s[0],s));}}",new String(new char[]{34}),new String(new char[]{123})}; System.out.println(java.text.MessageFormat.format(s[0],s)); } }
Hi, I have one code in c, which I have downloaded from internet. I have not used it as self replicating program, but think that it will help you. Just copy-past it and use for your purpose.
Code:#include <stdio.h> int main (void) { char *p1="#include <stdio.h>%c%cint%cmain (void)%c{%c"; char *p2=" char *s%c=%c%s%c;%c char *s%c=%c%s%c;%c"; char *p3=" char n='%cn', q='%c', b='%c%c';%c"; char *pp=" printf("; char *p4="%sp1,n,n,n,n,n);%c"; char *p5="%sp2,'1',q,p1,q,n,'2',q,p2,q,n);%sp2,'3',q,p3,q,n,'p',q,pp,q,n);%c"; char *p6="%sp2,'4',q,p4,q,n,'5',q,p5,q,n);%sp2,'6',q,p6,q,n,'7',q,p7,q,n);%c"; char *p7="%sp2,'8',q,p8,q,n,'9',q,p9,q,n);%sp2,'0',q,p0,q,n,'x',q,px,q,n);%c"; char *p8="%sp3,b,q,b,b,n);%sp4,pp,n);%sp5,pp,pp,n);%c"; char *p9="%sp6,pp,pp,n);%sp7,pp,pp,n);%sp8,pp,pp,pp,n);%c"; char *p0="%sp9,pp,pp,pp,n);%sp0,pp,pp,n,n,n);%c return 0;%c}%c"; char *px="--- This is an intron. ---"; char n='\n', q='"', b='\\'; printf(p1,n,n,n,n,n); printf(p2,'1',q,p1,q,n,'2',q,p2,q,n); printf(p2,'3',q,p3,q,n,'p',q,pp,q,n); printf(p2,'4',q,p4,q,n,'5',q,p5,q,n); printf(p2,'6',q,p6,q,n,'7',q,p7,q,n); printf(p2,'8',q,p8,q,n,'9',q,p9,q,n); printf(p2,'0',q,p0,q,n,'x',q,px,q,n); printf(p3,b,q,b,b,n); printf(p4,pp,n); printf(p5,pp,pp,n); printf(p6,pp,pp,n); printf(p7,pp,pp,n); printf(p8,pp,pp,pp,n); printf(p9,pp,pp,pp,n); printf(p0,pp,pp,n,n,n); return 0; }
Hi, you can create self replicating program in java with the help of following code. Just make use of it. And get what you want.
Code:enum one { a("enum one { a(%c%s%c); one(String time) { System.out.printf(time,23,time,23); System.exit(0); } } ");one(String time) { System.out.printf(time,23,time,23);System.exit(0); } }
Bookmarks