theand-fork / bwapp-code

clone of http://sourceforge.net/projects/bwapp/
22 stars 26 forks source link

Fatal error on D:\xampp\htdocs\bWAPP\connect.php on line 23 #2

Closed Ri1a closed 6 years ago

Ri1a commented 6 years ago

So, I've recently installed bWAPP. The first bugs worked fine, but when I want to start an SQL-injection attack it throws me this error:

Fatal error: Uncaught Error: Call to undefined function mysql_connect() in D:\xampp\htdocs\bWAPP\connect.php:23 Stack trace: #0 D:\xampp\htdocs\bWAPP\sqli_1.php(23): include() #1 {main} thrown in D:\xampp\htdocs\bWAPP\connect.php on line 23

This is the line in the connect.php that throws an error:

// Connects to the server
$link = mysql_connect($server, $username, $password);

I run bWAPP locally, why should it connect to a server? Any ideas?

Ri1a commented 6 years ago

Tried it again on linux and it worked fine now.

w3bd3m0n1337 commented 4 years ago

Its not working on windows 10 same issue.

lazyboyy commented 1 year ago

this code will help to bypass that error, just paste below code in connect.php file. ask chatgpt for more errors. Happy Hacking :)


<?php

/*

bWAPP, or a buggy web application, is a free and open source deliberately insecure web application.
It helps security enthusiasts, developers, and students to discover and prevent web vulnerabilities.
bWAPP covers all major known web vulnerabilities, including all risks from the OWASP Top 10 project!
It is for security-testing and educational purposes only.

Enjoy!

Malik Mesellem
Twitter: @MME_IT

bWAPP is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License (http://creativecommons.org/licenses/by-nc-nd/4.0/). Copyright © 2014 MME BVBA. All rights reserved.

*/

// Connection settings
include("config.inc.php");

// Connects to the server
$conn = mysqli_connect($server, $username, $password, $database);

// Checks the connection
if (!$conn) {
    die("Could not connect to the server: " . mysqli_connect_error());
}

// No need to select the database separately in mysqli

// Commenting out mysql_close as it's not necessary in mysqli
// mysqli_close($conn);

?>
Ankanpaulj123 commented 1 month ago

i have new error

C:\xampp\htdocs\bWAPP\sqli_13.php