Questions tagged [security]

Computer security is security applied to computing devices such as computers and smartphones, as well as to both private and public computer networks, including the whole Internet.

Filter by
Sorted by
Tagged with
2 votes
1 answer
50 views

Implementation of aes-cbc-hmac combined with xchacha20-poly1305

I’m using two ciphers in this code that are in this order- encrypt plain text with xchacha20-poly1305 then encrypt the resulting ciphertext with aes-cbc-blake2b hmac. I was told elsewhere rather than ...
bismofunyuns's user avatar
0 votes
1 answer
80 views

Is this string-comparison function safe against timing attacks?

Here's a JavaScript function that check the equality of input and secret strings, trying to do that without leaking information ...
Azerum's user avatar
  • 13
4 votes
3 answers
167 views

Generating registration codes

I'm looking for a best practices and security analysis of some code I've written to generate registration codes and avoid duplicates. The class assigns numeric values to the letters A-Z and 0-9 and ...
John Aldrich's user avatar
4 votes
4 answers
3k views

Banking System console app in C++

I built a banking system in C++ (still a lot of features to do but (I decided to post it here to see what can I change so I wont make those mistakes in the future). User header and c++ files Header <...
Ellie's user avatar
  • 347
3 votes
1 answer
97 views

Python command line password generator

After giving a couple of well-received answers to similar questions, I thought I'd try to come up with my own solution. I believe that a good password generator can and should be quite simple without ...
gazoh's user avatar
  • 3,004
0 votes
1 answer
116 views

Password keeper / generator application in Python

I've written this password-keeper application to keep my passwords safe in one place. From something over few lines it grew to almost 200 lines of code. I would greatly appreciate it if someone could ...
Paichiwo's user avatar
  • 121
3 votes
1 answer
66 views

Basic node authentication system

I built a basic authentication system for a node application and I have some security concerns. The username and password the user enters when they log in are stored as plaintext using express-...
HDawG's user avatar
  • 33
0 votes
0 answers
77 views

Modified PoC for BlogEngine.NET CMS (CVE-2019-6714)

This is a modified exploit proof of concept targeting the BlogEngine.NET content management system (CVE-2019-6714) for the .NET framework. I modified it (from Cobb 2019) to execute payloads via ...
Aleksey's user avatar
  • 153
-1 votes
1 answer
72 views

Securely store password in database and then show it on demand? [closed]

I have written a small password manager script for my own purposes. It is hosted locally and cannot be accessed outside my local network. You can see the code on GutHub I know it is better to encrypt ...
milenmk's user avatar
  • 137
1 vote
1 answer
174 views

All-JavaScript WhatsApp button

The following code creates a WhatsApp button. How would you improve this code? ...
pointy's user avatar
  • 11
0 votes
0 answers
1k views

Pay with PayPal through cURL and verify

As All PayPal PHP SDK deprecated, I wrote a simple PHP class to make payment with PayPal through cURL and verifying it. Note : I didn't add shipment details for payment because didn't need that. For ...
Kranchi's user avatar
6 votes
3 answers
513 views

Brute force search for pdf password in python

I forgot the password to my pdf. I remembered a few characters, so I made a simple password-cracker program in Python. Is the document lost now given the number of combinations? Out of curiosity, how ...
gabriel's user avatar
  • 61
2 votes
0 answers
50 views

Serving Laravel public/ contents when all Laravel files are in the same server directory

I have a Laravel 8 project hosted at xxx/laravel/ on an Apache server, where xxx is the domain. I want to serve the contents of <...
Ichi's user avatar
  • 73
3 votes
0 answers
2k views

Reactive JWT authentication using Spring webflux

Greeting to all senior devs here. I'm trying to create a project for my small business. There are not many tutorial on how to create Reactive JWT authentication with Spring webflux. So I'm a bit ...
Patrick's user avatar
  • 321
2 votes
2 answers
827 views

Saving form data to a text file on server

I want to save simple string data as a simple text file (.txt) on the server (together with the IP), but I cannot find any clear guideline on how to do this correctly/efficiently/safely. (Maybe I'm ...
gaspar's user avatar
  • 153
3 votes
0 answers
113 views

Securely generate Token for authentication

In my experience i had the need that some application (both desktop and web) can excange data to authenticate users (even if the data for authenticating users are not reacheable form desktop ...
Skary's user avatar
  • 228
0 votes
1 answer
708 views

ASP.NET Core Authorization handler that allows request from private IP ranges

In a docker compose solution, there are multiple ASP.NET Core projects. Each of them provide a service. Some of them can be accessed from internet (with REST APIs), some of them are for local docker ...
Parsa99's user avatar
  • 123
-1 votes
1 answer
135 views

Password policy with regex and zxcvbn

This code snippet shows an implementation of a password policy check. - The method composition uses regex to verify that the password meets composition criteria (at least one number, one special ...
questıoner's user avatar
1 vote
1 answer
334 views

Password hashing for safe storage with Argon

This code snippet implements password hashing for safe storage. It uses Argon2 as hashing algorithm. The method hash_password() is used to hash and salt a password. ...
questıoner's user avatar
2 votes
0 answers
157 views

Simple websocket chat app

I'm coding a simple websocket chat app. I was wondering if my code is secure and efficient. I also have a question about the way how I'm sending objects and then checking the type, is there anything ...
Jiry_XD's user avatar
  • 21
4 votes
1 answer
818 views

Rijndael Cipher in C++ (128bit AES)

I am a hobbyist and do not work in the industry, but I do have an interest in programming an cryptography. I decided to have a go at writing a 128bit implementation of AES in C++. This is my first ...
WireInTheGhost's user avatar
3 votes
1 answer
113 views

Weighted Union-Find class

For a final project I used a weighted union-find and decided to implement it in Python. I wrote it to be as general as possible so it's very portable. I do plan on looking into path compression to ...
Gabe Ron's user avatar
  • 133
4 votes
2 answers
757 views

Bash-based Port scanner (/dev/tcp)

This question is ideal in my case: Ludisposed's python-scapy-tcp-port-scan-of-subnet - At codereview stackexchange But this is not Scapy; nor Python(it might get used in the future though but that is ...
William Martens's user avatar
1 vote
1 answer
149 views

Is this session manager secure?

I'm looking for best practices for writing secure session managers. I'm making a table for the authorization token (UUID OR GUIDv4) with autoincrement, user_id, token, status (enum) then update status ...
Taa Lee's user avatar
  • 37
0 votes
1 answer
79 views

Python: token request, SQL user fetch and API calls

I have the files as below. What I'm looking for is some feedback with regards to security, reliability, maintenance, scaling and performance. What is going on? Make a request to get a token to access ...
pee2pee's user avatar
  • 360
0 votes
2 answers
82 views

Security of my upload script #2

I recently asked this question and got a response. I made improvements, it now checks if the file is an image and/or used UUID to store the images, and now I want to see if it's good or not. How ...
user13477176's user avatar
1 vote
1 answer
440 views

Boolean expression evaluation for user input using evil eval

The following code is a module that evaluates boolean expressions, which are entered through an unauthorized web API. The exposed function of the library being used is ...
Richard Neumann's user avatar
0 votes
1 answer
416 views

How do I make my program that creates RSA keys and encrypts and decrypts a file more secure

...
The Masked Rebel's user avatar
3 votes
2 answers
175 views

Serve rescaled jpg images on demand with myphoto!500.jpg syntax (here 500px-width rescaled)

On web pages, obviously we cannot serve large photos (e.g. 4000x4000px) and just let CSS do the resizing: it would be too slow for end users and too bandwidth-consuming for the server. So it's ...
Basj's user avatar
  • 244
1 vote
1 answer
520 views

Protect Routes/Page with NextJS [closed]

I have a simple project that I built that protects the routes/pages of the website by using the if and else statement and putting each page with a function ...
Mohammad Khan's user avatar
4 votes
0 answers
402 views

Bash script for pull-mode backups via restic's rest-server

I wrote the following Bash scripts to make pull-mode backups with restic, a backup solution written in Golang, similar to Borg Backup. The main use case for this script is pulling backups into a ...
andrew-e's user avatar
  • 333
1 vote
1 answer
138 views

Prevent Column Name Collision

I have been working on a series of posts about a library to connect to databases but most of the scenarios I have to resort to some "JOIN" the problem arose when two or more tables had some ...
user avatar
0 votes
1 answer
821 views

script to recover browser passwords

basically i am new to python lookin for any bad practices done down there in my script, any ways to shrink the code and increase efficiency ...
LyZeN77's user avatar
  • 137
0 votes
1 answer
70 views

Simple web page to enhance browsing of IMSLP music collections

I'm building a simple webpage that allow users to find the intersection of different category lists on a wiki (imslp.org) since the site itself does not offer this functionality. I have a simple HTML ...
amount's user avatar
  • 53
2 votes
1 answer
117 views

A simple C# script that exploits PHP command injections

Back in 2016, I wrote a simple C# script that exploits a generic command injection vulnerability on PHP webapps, just for the sake of demonstrating that exploits can be written in .NET languages (due ...
Aleksey's user avatar
  • 153
3 votes
1 answer
2k views

.Net 5.0 Get User Email From Claims

From searching online I have identified two ways to get the user email, but I don't know if either has pro's/con's beyond Option.1 being a larger number of lines of code? Option.1 I have a dedicated <...
DMur's user avatar
  • 133
4 votes
1 answer
137 views

Storing and confirming user input

I am a beginner, and I'm trying to secure a sign-login system on my website. Is my code good/enough to prevent SQL injection? THIS IS THE SIGN FILES This is the index.php that takes user input: ...
irtexas19's user avatar
  • 163
3 votes
1 answer
79 views

Security of the login code on the website

I wrote the code to log in php to the admin panel. Everything works as it should. But I am not sure if it is well written code and if it is safe. I care about security. I have read a lot about it but ...
test's user avatar
  • 31
0 votes
1 answer
56 views

Please check out my code incrementer

I recently developed code that can run as a function parameter but I'm not quite sure how vulnerable it is to hacks and/or cheats. Also, is there anything I could improve? ...
Ethan Belcher's user avatar
4 votes
2 answers
957 views

Securing my password wallet

I am currently learning C++, so I made this basic password wallet for Ubuntu. Its source code is in the /opt directory and it has a symlink so i can launch it from ...
Anass Youness's user avatar
5 votes
1 answer
135 views

Security of CS50 Calculator code (eval)

This is my first question on Code Review, so please let me know if I botched anything. After working for quite a while on my CS50 calculator, it has finally reached the point where I am completely ...
M-Chen-3's user avatar
  • 143
2 votes
1 answer
60 views

Client-server application for logging running processes

My first client-server application. It's a simple Python script that gets a list of running processes from Server_1 and writes it to a datetime-named file on ...
Bn.F76's user avatar
  • 123
8 votes
3 answers
251 views

Is my website's PHP registration system secure?

I would like to know if my registration system is secure. I'm not sure if it is secure, as I'm new in development, and I'm afraid that the system is flawed Also, I'm not experienced in object oriented ...
Warlock's user avatar
  • 193
5 votes
3 answers
287 views

Class showing a format similar to var_dump RC5 Version

Some methods of this library require some improvements (see this description): In the constructor I am trying to create the possibility that the user modifies the ...
user avatar
2 votes
2 answers
168 views

Encrypting/decrypting messages in java

I am trying to implement message encryption/decryption with password in java. Here is the code I'm using: ...
user avatar
6 votes
2 answers
371 views

Password reset system in PHP

What I try to achieve I need to create a secure forgot password reset system. I am especially worrying about the security of this code and how to further improve it. Here's my code: ...
Easwar Chinraj's user avatar
0 votes
1 answer
543 views

Recieving an XSS Injection: <script>alert('xssvuln');</script>

I would very much appreciate it if someone could review the php script below for any security risks. I have a live website using shared hosting. There's a page that accepts text submissions from users....
user avatar
2 votes
2 answers
86 views

RSA wrapper python

...
Vorac's user avatar
  • 454
4 votes
1 answer
7k views

Rate Limiter implementation in Java

I have been working on implementing rate limiter in Java. Following is my approach. I have used 'sliding window with counters' technique to implement this rate limiter. What I do is instead of rate ...
uncommon_breed's user avatar
6 votes
1 answer
118 views

Basic login system with 2 factor authentication

What I try to achieve I need to create a administration-panel for a website. Therefore, I need a possibility to protect the content of the panel via a password. The functionality doesn't have to be ...
user avatar

1
2 3 4 5
16