changeset 41:37f231f85a67

add tabs to some c++ files and fix win95kg.cpp
author Paper <mrpapersonic@gmail.com>
date Wed, 30 Jun 2021 02:38:59 -0400
parents 2aa9614cb39a
children 1c81c5106b59
files garf.cpp getlist.py intro.py mmltonsf.bat win95kg.cpp
diffstat 5 files changed, 50 insertions(+), 68 deletions(-) [+]
line wrap: on
line diff
--- a/garf.cpp	Mon Jun 21 15:16:15 2021 -0400
+++ b/garf.cpp	Wed Jun 30 02:38:59 2021 -0400
@@ -3,14 +3,15 @@
 #include <stdio.h>
 #include <string.h>
 
-int main(){
-char answer[100];
-std::cout << "would you like to monetize 1123.best?: ";
-gets(answer);
-if(answer=="yes"){
-std::cout << "it's a yes!";
-}else{
-std::cout << "it's a yes!";
+int main() {
+    char answer[255];
+    std::cout << "would you like to monetize 1123.best?: ";
+    fgets(answer, sizeof(answer), stdin);
+    if(answer == "yes") {
+        std::cout << "it's a yes!";
+    }
+    else {
+        std::cout << "it's a yes!";
+    }
+    return 0;
 }
-return 0;
-}
\ No newline at end of file
--- a/getlist.py	Mon Jun 21 15:16:15 2021 -0400
+++ b/getlist.py	Wed Jun 30 02:38:59 2021 -0400
@@ -43,8 +43,7 @@
     f.close()
     count = 1
     for i in range(amount):  # this may count as spamming the api but i don't care lol
-        with urllib.request.urlopen(
-            f'https://api.themoviedb.org/3/tv/{str(id)}/season/{season}/episode/{count}?api_key={key}') as url:
+        with urllib.request.urlopen(f'https://api.themoviedb.org/3/tv/{str(id)}/season/{season}/episode/{count}?api_key={key}') as url:
             data = json.loads(url.read().decode())
             f = open("list.txt", "a", encoding="utf-8")
             f.write(data["name"].replace("?", "?").replace(
--- a/intro.py	Mon Jun 21 15:16:15 2021 -0400
+++ b/intro.py	Wed Jun 30 02:38:59 2021 -0400
@@ -7,6 +7,5 @@
         ext = os.path.splitext(file)[-1].lower()
         if ext == ".mkv":
             stream = ffmpeg.input(file)
-            os.system(
-                f'ffmpeg -i "{file}" -t 30 -pix_fmt yuv420p "Clips\intro_{amt}.mp4')
+            os.system(f'ffmpeg -i "{file}" -t 30 -pix_fmt yuv420p "Clips\\intro_{amt}.mp4"')
             amt += 1
--- a/mmltonsf.bat	Mon Jun 21 15:16:15 2021 -0400
+++ b/mmltonsf.bat	Wed Jun 30 02:38:59 2021 -0400
@@ -1,30 +1,31 @@
 @echo off
 
+REM - Usage
 if "%1" == "" (
-echo usage: compile.bat ^<input^>
-exit /b
+    echo usage: compile.bat ^<input^>
+    exit /b
 )
 
 REM - Compile MML
 del /f effect.h
 ppmckc.exe -i "%1"
 if not exist "effect.h" (
-echo ppmckc ERROR
-exit /b
+    echo ppmckc ERROR
+    exit /b
 )
 
 REM - Assemble
 del /f ppmck.nes
 nesasm -s -raw ppmck.asm
 if not exist "ppmck.nes" (
-echo nesasm ERROR
-del /f "%~n1" effect.h define.inc
-exit /b
+    echo nesasm ERROR
+    del /f "%~n1" effect.h define.inc
+    exit /b
 )
 
-REM - Move files and such
+REM - Move files
 move /y ppmck.nes "%~n1.nsf"
 echo %~n1.nsf written
 
 REM - Cleanup
-del /f "%~n1".h effect.h define.inc
\ No newline at end of file
+del /f "%~n1".h effect.h define.inc
--- a/win95kg.cpp	Mon Jun 21 15:16:15 2021 -0400
+++ b/win95kg.cpp	Wed Jun 30 02:38:59 2021 -0400
@@ -1,6 +1,9 @@
 /* Windows 95 Keygen - 11/24/20
    By Paper
    not sure if this will work fully, but from what i've seen it works well enough
+
+   going back on this a few months later, wew this code sucks ass
+   managed to fix the OEM key generation, apparently the medium article i read was wrong
 */
 #include <ctime>
 #include <cstdlib>
@@ -18,10 +21,9 @@
             startpoint = c();
             sadsong = 4;
         } else if (strcmp(argv[1], "--oem") == 0) {
-            int first = d(), third = e();
-            std::cout << std::setw(5) << std::setfill('0') << first;
+            std::cout << std::setw(5) << std::setfill('0') << d();
             std::cout << "-OEM-";
-            std::cout << std::setw(7) << std::setfill('0') << third << "-";
+            std::cout << std::setw(7) << std::setfill('0') << e() << "-";
             std::cout << std::setw(5) << std::setfill('0') << (rand() % 100000);
             return 0;
         } else if (strcmp(argv[1], "--normal") == 0) {
@@ -40,10 +42,10 @@
     std::cout << std::setw(7) << std::setfill('0') << endpoint;
     return 0;
 }
+
 int a() {
-    int num;
-    num = rand() % 1000;
-    while ((num == 333) and(num == 444) and(num == 555) and(num == 666) and(num == 777) and(num == 888) and(num == 999)) {
+    int num = rand() % 1000;
+    while ((num == 333) || (num == 444) || (num == 555) || (num == 666) || (num == 777) || (num == 888) || (num == 999)) {
         num = rand() % 1000;
     }
     while ((num % 3) != 0) {
@@ -51,26 +53,18 @@
     }
     return num;
 }
+
 int b() {
-    int first_digits = rand() % 10000000;
-    int last_digit = rand() % 10;
-    while ((last_digit == 0) || (last_digit >= 8)) {
-        last_digit = rand() % 10;
-    }
-    std::string thisis = std::to_string(first_digits);
-    std::string veryfrustrating = std::to_string(last_digit);
-    std::string second_segment_p1 = (std::string(thisis) + std::string(veryfrustrating));
-    int second_segment = std::stoi(second_segment_p1);
+    int first_digits;
+    int last_digit;
+    int second_segment = 5;
     while (second_segment % 7 != 0) {
-        first_digits = rand() % 10000000;
+        first_digits = rand() % 1000000;
         last_digit = rand() % 10;
         while ((last_digit == 0) || (last_digit >= 8)) {
             last_digit = rand() % 10;
         }
-        std::string thisis = std::to_string(first_digits);
-        std::string veryfrustrating = std::to_string(last_digit);
-        std::string second_segment_p1 = (std::string(thisis) + std::string(veryfrustrating));
-        second_segment = std::stoi(second_segment_p1);
+        second_segment = std::stoi(std::to_string(first_digits) + std::to_string(last_digit));
     }
     return second_segment;
 }
@@ -81,15 +75,10 @@
     while (ez_pwned >= 10) {
         ez_pwned = ez_pwned - 10;
     }
-    std::string thisisstill = std::to_string(new_site);
-    std::string prettyfrustrating = std::to_string(ez_pwned);
-    std::string iamsocool = (std::string(thisisstill) + std::string(prettyfrustrating));
-    int mysinusesareclogged = std::stoi(iamsocool);
-    return mysinusesareclogged;
+    return std::stoi(std::to_string(new_site) + std::to_string(ez_pwned));
 }
 
 int d() {
-    int day = (rand() % 366) + 1;
     const char * years[] = {
         "95",
         "96",
@@ -103,33 +92,26 @@
     };
     int index = (rand() % 9);
     const char * year = years[index];
-    std::string iamsotired = std::to_string(day);
-    std::string ofdoingthis = year;
-    std::string pleasehelp = (std::string(iamsotired) + std::string(ofdoingthis));
-    int ohmygod = std::stoi(pleasehelp);
-    return ohmygod;
+    return std::stoi(std::to_string((rand() % 366) + 1) + year);
 }
 
 int e() {
-    int first_digits = rand() % 1000000;
-    int last_digit = rand() % 10;
-    while ((last_digit == 0) || (last_digit >= 8)) {
-        last_digit = rand() % 10;
-    }
-    std::string thisis = std::to_string(first_digits);
-    std::string veryfrustrating = std::to_string(last_digit);
-    std::string second_segment_p1 = (std::string(thisis) + std::string(veryfrustrating));
-    int second_segment = std::stoi(second_segment_p1);
-    while (second_segment % 7 != 0) {
-        first_digits = rand() % 10000000;
+    int first_digits;
+    int last_digit;
+    int second_segment = 5;
+    int sum = 1;
+    while (sum % 7 != 0) {
+        sum = 0;
+        first_digits = rand() % 10000;
         last_digit = rand() % 10;
         while ((last_digit == 0) || (last_digit >= 8)) {
             last_digit = rand() % 10;
         }
-        std::string thisis = std::to_string(first_digits);
-        std::string veryfrustrating = std::to_string(last_digit);
-        std::string second_segment_p1 = (std::string(thisis) + std::string(veryfrustrating));
+        std::string second_segment_p1 = (std::to_string(first_digits) + std::to_string(last_digit));
         second_segment = std::stoi(second_segment_p1);
+        for(char &c :second_segment_p1) {
+            sum += c - '0';
+        }
     }
     return second_segment;
 }