Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions DotnetApp/Program.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using System.IO;
using System.Linq;
using Microsoft.Extensions.FileProviders;
using DotnetApp.Services;
using DotnetApp.Models;

Expand Down
Empty file removed python/point.py
Empty file.
10 changes: 5 additions & 5 deletions python/sql.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,22 @@
def search_user(username):
conn = mysql.connector.connect(user='root', password='password', host='localhost', database='users')
cursor = conn.cursor()
query = "SELECT * FROM users WHERE username = '" + username + "'"
query = "SELECT * FROM users WHERE username = %s"

# Execute the query and process the results
cursor.execute(query)
cursor.execute(query, (username,))
result = cursor.fetchall()
cursor.close()
conn.close()
return result

def add_user(username, password):
conn = mysql.connector.connect
conn = mysql.connector.connect(user='root', password='password', host='localhost', database='users')

Check failure on line 16 in python/sql.py

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Revoke and change this password, as it is compromised.

See more on https://sonarcloud.io/project/issues?id=mpchenette_copilot&issues=AZq8oEMFb8lFwZ2awLel&open=AZq8oEMFb8lFwZ2awLel&pullRequest=12
cursor = conn.cursor()
query = "INSERT INTO users (username, password) VALUES ('" + username + "', '" + password + "')"
query = "INSERT INTO users (username, password) VALUES (%s, %s)"

# Execute the query
cursor.execute(query)
cursor.execute(query, (username, password))
conn.commit()
cursor.close()
conn.close()
Expand Down
Empty file removed python/tests/test_calculator.py
Empty file.
21 changes: 21 additions & 0 deletions rust/tcp.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
use std::io::{Read, Write};
use std::net::TcpStream;

pub fn handle_tcp_stream(mut stream: TcpStream) {
let mut buffer = [0; 1024];

match stream.read(&mut buffer) {
Ok(size) => {
if size > 0 {
println!("LOG (TCP): Received {} bytes", size);
let response = b"HTTP/1.1 200 OK\r\nContent-Length: 2\r\n\r\nOK";
if let Err(e) = stream.write_all(response) {
println!("ERROR (TCP): Failed to send response: {}", e);
}
}
}
Err(e) => {
println!("ERROR (TCP): Failed to read from stream: {}", e);
}
}
}
4 changes: 1 addition & 3 deletions scripts/report_bofa_emu_versions.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
#!/usr/bin/env python3
import argparse
import csv
import os
import re
import sys
from collections import Counter, defaultdict
from collections import Counter
from pathlib import Path


Expand Down
Empty file removed terraform/iac.tf
Empty file.