Making Money with Python

I made a few beginner's attempts at making a few python scripts that could make a few bucks at least per run. My codes don't look pretty, some of my variables and prompts are profane, and you pros out there might go roflwtf, but I hope to be able to fix all of that and code like a pro soon enough.

You need a local python environment if you don't have it already. There is IDLE, and theres PyCharm CE that you can install after installing IDLE. I like TextEdit on Ubuntu and the shell for execution. Suit yourself.

I have also put up this thread where fellow members tell me what they need and I code it up for them. I am making this thread to post those working scripts that everyone can use. Thought I'd start off first by posting what I have done so far, which would start from my 2nd post.

Before we get to the moneymakers, I'd like to show off a few scripts that I felt so proud of.

Here is a password generator to start with
Python:
import random
letters = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z']
numbers = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9']
symbols = ['!', '#', '$', '%', '&', '(', ')', '*', '+']
ln=5
nn=4
sn=3
password=[]
for i in range(0,ln):
    password+=letters[random.randint(0,len(letters)-1)]
for i in range(0, nn):
    password+=numbers[random.randint(0,len(numbers)-1)]
for i in range(0, sn):
    password+=symbols[random.randint(0,len(symbols)-1)]
random.shuffle(password)
pw=''
for char in password:
    pw+=char
print(f'Password: {pw}')

The Lucas Lehmer method of finding Mersenne Prime, without which the SSLs don't work. Got the method from this video

Python:
import time



i = 4
l = 1
start_time = time.time()
n=int(input('n = '))
pn = (2 ** n) - 1

if pn % 2 == 0:
    print(f'{pn} is a fucking even number')
else:
    print(f"the number you're solving for is {pn}\nCalculating...")
    while i < pn:
        i = (i ** 2) - 2
        l += 1
    print(l, 'loop 1 ')
    i = i % pn
    while l < n - 1:
        i = (i ** 2) - 2
        i = i % pn
        l += 1
    print(l, 'loop2 ')
    if (i % (pn)) == 0:
        print(f'2^{n} - 1 is a prime')
        print("--- %s seconds ---" % (time.time() - start_time))
    else:
        print(f'2^{n} - 1 isnt a prime')
        print("--- %s seconds ---" % (time.time() - start_time))
Wasn't able to post code here, so now trying with an image.
1658414216090.png

You've got pretty cool code there. I like it, so I played around with it for a few minutes and made it so you don't have to type out all those letters and characters manually.
 
Wasn't able to post code here, so now trying with an image.
View attachment 218677

You've got pretty cool code there. I like it, so I played around with it for a few minutes and made it so you don't have to type out all those letters and characters manually.
good work, but this is all you need for pw generation with strings and secrets

Python:
import string, secrets

password=''.join(secrets.choice(string.ascii_letters + string.digits + '!@#$%^&*()_+=-`~;:"|?><,./') for i in range(16)),

print(password)
 
  • Like
Reactions: Toz
good work, but this is all you need for pw generation with strings and secrets

Python:
import string, secrets

password=''.join(secrets.choice(string.ascii_letters + string.digits + '!@#$%^&*()_+=-`~;:"|?><,./') for i in range(16)),

print(password)
This is indeed even better!
 
don't know, been depressed for a few months and this has been my suicide prevention strategy so far. The moment I run out of project ideas the suicidal thoughts kick in so I HAVE to look for new things to do to stay alive. Its a mater of survival.
I would recommend setting a bigger goal, not something you can realistically reach. For example 'get healthier' , 'read more books', 'socialize more', ' learn more about tech' etc. etc.
So you would know that you ARE getting better and better EACH day.
I know from a personal experience how hard it is to change old and get new habits, but think of it as a game, or a 'streak' (yeah like in snapchat) , if you did 50 pushups every day straight for the following month it would be VERY hard psychologically to break this great new streak.

Good luck with your journey and life, WAGMI.
 
if you did 50 pushups every day straight for the following month it would be VERY hard psychologically to break this great new streak
Absolutely agree. It takes 3-4 weeks to adapt a new behaviour until it becomes permanent.
 
Can you write a code to scrap SERP. Like I enter a keyword, it search SERP and post it on Wordpress?
 
Can you write a code to scrap SERP. Like I enter a keyword, it search SERP and post it on Wordpress?
hate scrapers, and after 12 years on bhw I honestly don't know what SERP is, so don't know what I should be scraping
 
thanks for sharing and help the community
 
hate scrapers, and after 12 years on bhw I honestly don't know what SERP is, so don't know what I should be scraping
Ok finally figured out what SERP is

Here you go

Python:
import requests
from bs4 import BeautifulSoup

result = requests.get(f'http://www.google.com/search?q={input("whats the search term? : ")}&num=100')
soup = BeautifulSoup(result.text, 'lxml')

for link in soup.find_all('a', href = True):
    if link.get('href').strip('/url?q=').startswith('http') and 'google.' not in link.get('href').strip('/url?q='):
        print(link.get('href').strip('/url?q='))

Pulls only 100 results from the first page.
 
Last edited:
Ok finally figured out what SERP is

Here you go

Python:
import requests
from bs4 import BeautifulSoup
print('search term = gratis gravida kvinnor hardcore sex')
result = requests.get(f'http://www.google.com/search?q={input('whats the search term? : ')})
soup = BeautifulSoup(result.text, 'lxml')

for link in soup.find_all('a', href = True):
    print(link.get('href').strip('/url?q='))

Pulls only 10 results from the first page.
Excellent post @Paranoid Android Just a small correction buddy

Code:
result = requests.get(f'http://www.google.com/search?q={input("whats the search term? : ")}')
 
How to solve the problem of short texts? I set "maxTokens = 1000".
Example: "Tell me about guitar strings in 500 words".
It receives a text for several sentences.
 
How to solve the problem of short texts? I set "maxTokens = 1000".
Example: "Tell me about guitar strings in 500 words".
It receives a text for several sentences.
Maybe it doesn't have stuff for 500 words, try 200 or 300 words. But if you say 500 words it should give you the max it can. Did you do a work count on the sentences it returned?
 
Maybe it doesn't have stuff for 500 words, try 200 or 300 words. But if you say 500 words it should give you the max it can. Did you do a work count on the sentences it returned?
Each article is generated for a maximum of 250 words. Thanks for the answer.
 
@Paranoid Android bro can you please suggest me how to do automation like this https://t.me/Vmodders telegram.

I am not sure how to search for bot like this they are using api and auto poster bot's for automation.

They are just sending file and it uploaded that file to remote server and create short link and share that short link with template.

Anybody can contribute your idea's i am open for your ideas
 
I think your password generator can be shorten to 2 line :D

Code:
alphabet = string.ascii_letters + string.digits
password = ''.join(secrets.choice(alphabet) for i in range(16))
 
@Paranoid Android bro can you please suggest me how to do automation like this https://t.me/Vmodders telegram.

I am not sure how to search for bot like this they are using api and auto poster bot's for automation.

They are just sending file and it uploaded that file to remote server and create short link and share that short link with template.

Anybody can contribute your idea's i am open for your ideas
Which part is confusing to you, the telegram poster? )
Looks like a cpa setup )
 
Back
Top