This forum is in archive mode. You will not be able to post new content.

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Pyromaniac

Pages: [1] 2
1
I had some good experience with Intel XDK (it's a tool to build app with html5) before  ;D. Looks like the site just contains html and js so you should be able to use the source directly to build the app.

2
High Quality Tutorials / Re: Road to a Programming Life
« on: October 18, 2015, 12:08:25 AM »
I went from C, C++, Java, C#, VB, to Python. Picking up new language is really easy for me. Was told that I need to learn assembly if I am serious about programming. So I am going to learn that next. Out of all the languages I enjoyed learning java and python the most. So far I only work on small little git projects because I get really scare that ppl might complain about the coding style and such. You actually persuaded me today. If I want to be a programmer I guess I will have to learn adept and accept the criticism  ;D

3
General discussion / Re: Best os for someone new to Linux?
« on: October 17, 2015, 07:22:21 AM »
I started off with mint just because a lot of people recommended it, since I was coming from windows. The just messed around with other distros on virtualbox + vagrant. Just created the base box and keep the template since I tend to mess up a lot while I was learning  ::)

4
Scripting Languages / Re: [Python] Custom Ping with Range (1-254)
« on: October 17, 2015, 06:00:52 AM »
Thanks bro and +a cookie. netifaces looks simple enough and is very suitable for this app. I will give it a try  :)

5
Lol they do have scripts though. Here is the Draven one.

6
Tutorials / Re: Improved CD lamp
« on: October 16, 2015, 09:32:46 PM »
I only got 200 ish cds. Say good bye to my porn collections to reach 680 ;D

7
General discussion / Re: Plz review "Learn C the hard way"
« on: October 16, 2015, 09:12:44 PM »
I started reading this book too and am half way through it. It's very nice approach. The author also want you to learn other tools that will help with making your life easier (Make, Valgrind). Also at the end of every chapters, he will ask you to break the program then ask why that was the case. Also pushes you toward learning how to read the man page. Later chapters, he stopped explaining what the program do. He expect you to research it from man pages. Give it a try, you will like it. If you have some back ground in programming you can probably go through this book real quick.   

8
Scripting Languages / Re: TeamViewer ID and Pass Manager
« on: October 16, 2015, 08:48:34 PM »
One thing tho:
subprocess.call("C:/Program Files (x86)/TeamViewer/TeamViewer.exe -i "
Don't EVER hardcode system paths, use environmental variables instead. Also the path you coded only exists on x64 windows, on x86 there's only "Program Files". You might wanna fix it :)
You are right  :'( I forgot to handle that properly and updated the code. I updated the code.

9
Scripting Languages / Re: [Python] Custom Ping with Range (1-254)
« on: October 16, 2015, 08:01:19 PM »
How about asking interface from user as commandline argument(Use argparser or something ) and then work "base ip" from there. Much nicer than asking that base ip imo.
That's a great idea but I will be bound to unix. Well the reason why I created this was because I work for a company with very old network. All the sys admins who have more authority than me are all "windows experts". They also aren't familiar with tools like nmap lol. I created this to prove a point that they need to learn scripting to make their life easier since half the staff who knows what they are doing are gone :( I am a trainee admin, but I doubt that they can show me anything useful ahahahah.

I can probably connect to google dns and retrieve the ip automatically tough to avoid picking up the lo. The downfall is that in the future if I need to ping all devices from a nic that doesn't connect to internet than I am kind of screw. I will figure a way out and update it later. Just picked up black hat python. Very very interesting book.

Code: (python) [Select]
import subprocess
import threading
import time
import socket

def ping_it_boy(ip_addr):
    p = subprocess.Popen(["ping","-n","1",ip_addr], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)

    for line in p.stdout.read().split("\n"):
        if line.strip().startswith("Reply from "):
            l = line.strip().split()
            m = line.replace(l[0]+" "+l[1]+" "+l[2], "")
            if m.strip() != "Destination host unreachable.":
                 print(l[2][:-1] + " >>> " + m)

def get_ip_addr():
    s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
    s.connect(("8.8.8.8",80))
    ip = s.getsockname()[0]
    base_ip = ip.split(".")[0] + "." + ip.split(".")[1] + "." + ip.split(".")[2] + "."
    return base_ip


if __name__ == "__main__":
    # ip = raw_input("Enter the base IP. Example: 192.168.1 \n>>> ")
    # ip = ip.strip() + "."
    ip = get_ip_addr()
    print("Starting multiply threads for "+ ip + "0/24")
    t_thread = []
    t_sleep_on = 20
    for i in range(1, 255):
        t = threading.Thread(target=ping_it_boy, args=(ip + str(i),))
        t_thread.append(t)
        t.start()
        if i == t_sleep_on:
            # print("Threading sleeping: " + str(i))
            for i in t_thread:
                i.join()
                t_thread.remove(i)
            # print("Wakey Wakey")
            t_sleep_on += 20



10
Scripting Languages / Re: [Python] Custom Ping with Range (1-254)
« on: October 16, 2015, 06:11:20 AM »
Haven't changed much except add one function.
Thanks! I forgot to mention that I was on python 2.7 because I was using the pyinstaller to freeze the app here and there. Thanks for making it work on python3.

I would advise you extend this for mask or IP block and you won't need a user to give you a base IP.
I was thinking about that but didn't know how to deal with multiple nic pc yet. I will look into it and extend this further.

11
Tutorials / Re: Smashthestack walkthroughs
« on: October 16, 2015, 05:34:35 AM »
I was actually doing the BLACKBOX challenge but I had to stop because I didn't know how to reverse the binary yet. I just read the post up to objdump because I wanted to try the rest after learning lol. Thanks for the walk through!!!

Staff note: next time, please use the thank-you button, since this post contributes nothing to the thread. Greets, TheWormKill

12
Tutorials / Re: An informal talk about monads
« on: October 16, 2015, 05:20:41 AM »
Wow. I am surprise that this log is easier to read than most tuts lol cuz the questions that I was about to ask were asked already by acaan, lenoch, polyphony ;D Now I am curious to try it out.

13
Found it on the Webs / Re: Guacamole: A clientless RDP gateway
« on: October 16, 2015, 03:28:58 AM »
You are right. it's pretty awesome lol. Who needs team viewer when u can go guac and vnc  ;) I will try it in a vm tomorrow. The tut u posted is for 0.9.0 and latest is 0.9.8. Try using this instead.

14
Found it on the Webs / Re: Microsoft Rolls Its Own Linux Distro
« on: October 16, 2015, 03:20:48 AM »
Ohh btw for those of us who uses automation tools like ansible should definitly use Microsoft DSC instead  ::). Microsoft thinks they will take over the world lel.

15
Scripting Languages / Re: TeamViewer ID and Pass Manager
« on: October 15, 2015, 10:58:18 PM »
Oh this is cool! do you have it on github or somewhere with all dependencies?
Thanks for the edit! Didn't know about that. I dont have it on github becuase it was only a few line of code. The only thing that this depend on is wxpython3 for gui and teamviewer program installed on the system. Sorry forgot to mention that above. Tested on both window and linux. (Should work on mac too but I don't own one so can't test lol). If people are interested then I can put it on github and extend features.

Pages: [1] 2


Want to be here? Contact Ande, Factionwars or Kulverstukas on the forum or at IRC.