This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
#Minecraft server wrapper | |
#sends stdout via socket to DESTINATION_IP DESTINATION_PORT | |
#by luc99 | |
#Configuration | |
#Put here the server path | |
SERVER_PATH = "/home/maurizio/Scrivania/.wrapper/craftbukkit.jar" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#This Python script computed the k table | |
import math | |
import sys | |
final_list = [] | |
for i in range(0, 64): | |
final_list.append(math.floor(math.fabs(math.sin(i + 1)) * math.pow(2, 32))) | |
c = 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def get_multiples(l, n): | |
result = [] | |
for i in l: | |
if i % n == 0: | |
result.append(i) | |
return result | |
def union(l, m): | |
for i in l: | |
if i not in m: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def fib(n): | |
sequence = [1, 1] | |
next_number = 2 | |
while next_number <= n: | |
sequence.append(next_number) | |
next_number = sequence[len(sequence) - 1] + sequence[len(sequence) - 2] | |
return sequence | |
def get_evens(l): | |
ret = [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;shellcode | |
;\x31\xc0\x50\x68\x6e\x2f\x73\x68\x68\x2f\x2f\x62\x69\x89\xe3\x50\x89\xe2\x53\x89\xe1\x83\xc0\x0b\xcd\x80\x83\xe8\x0a\x31\xdb\x43\xcd\x80 | |
xor eax, eax | |
push eax | |
push 0x68732f6e | |
push 0x69622f2f | |
mov ebx, esp | |
push eax | |
mov edx, esp | |
push ebx |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Bubblesort algorithm | |
#code by luc99a | |
def bubblesort(list): | |
swap_count = -1 | |
while not swap_count == 0: | |
swap_count = 0 | |
for i in range(0, len(list) - 1): | |
if list[i] > list[i + 1]: | |
temp = list[i + 1] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Hi this class spawns a single subprocess /bin/bash and pass commands to it's stdin, this means that you can also | |
#execute cd commands here is an example that prints the /etc/passwd file and then echoes "Done" | |
#the class is only a proof of concept and has to be improoved | |
#for example the get_beffered_output() could not give the entire output of the command we executed depending on how much time the | |
#command uses to end | |
import subprocess | |
import threading | |
import time |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def pascal(col, row): | |
if col == 0 or col == row: | |
return 1 | |
return pascal(col - 1, row - 1) + pascal(col, row - 1) | |
col = 0 | |
row = 0 | |
line = [] | |
totallines = 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Explaination of https://github.com/luc99a/Assembly-Codes/blob/master/fibonacci.asm | |
#In Python | |
#by luc99a | |
high = 1 #Store the high number (actually it's not the high number I will swap low and high) | |
low = 1 #Store the low number (actually it's not the low number I will swap low and high) | |
#Repeat 20 times | |
for i in range(0, 20): | |
temp = low #Store in temp the value of low |