• Breaking News

    Friday, March 29, 2019

    How do I get started in CyberSecurity? Ask Programming

    How do I get started in CyberSecurity? Ask Programming


    How do I get started in CyberSecurity?

    Posted: 29 Mar 2019 11:14 AM PDT

    Hello. I know how to reverse engineer and understand somewhat the underlying structure of applications and such.

    Of course I know how to code (C, Java, Python, Obj-C). I am wondering how do I start doing this kind of thing?

    I have no idea how to approach a binary (I'm talking about BIG binaries, hundreds of MBs if not GBs) and absolutely no idea on what to look for when searching for vulns.

    I am very interested in iOS and I'd like to start there. For example, I got the latest kernelcache loaded in IDA, but there are so many functions that I have no idea where to start.

    An amazing resource would be a video (or recorded live) where the author picks a random binary and finds some kind of vulnerable piece of code.

    Apart from this, I still have no idea if the assembly I'm looking at contains vulnerabilites (how do I test such a thing? Especially if it's a kernel that runs on a device where I have no control whatsoever), and no idea how to exploit them (though there are a lot of resources about this last piece, I could probably borrow some code to start).

    Thanks.

    submitted by /u/cckcamel
    [link] [comments]

    SDL2 window shrinks randomly

    Posted: 29 Mar 2019 03:49 PM PDT

    Hello, I am making a NES emulator using SDL2. I've just switched over from using GLUT and I've noticed that after about a minute the window shrinks by 10 pixels in both dimensions. The only way to resize the window right now is by manually stretching it. Any ideas on what's going on?

    main.cpp

    Any other tips are also very appreciated

    Edit: I have been experiencing random screen flashes on my laptop lately. This might be related

    submitted by /u/Ericakester
    [link] [comments]

    Ideas for a bored coder?

    Posted: 29 Mar 2019 03:04 PM PDT

    Anyone have some cool idea/project for someone who is moderate in front end / back end web development?

    submitted by /u/Tannman726
    [link] [comments]

    What is considered a long file in React?

    Posted: 29 Mar 2019 06:36 PM PDT

    I've been using some JS libraries as of recent that allow me to make some cool animations in React (not jQuery), but, because of the way they integrate with React, my files end up becoming kind of long, mainly due to the instance variables I have to create. I need to do this because I need to set the instance variables to null at first and then give them a value after the component mounts. That isn't really relevant to the question here, specifically, but I just wanted to provide some context.

    With all of that said, what is considered to be a React component that has too many lines? 50? 100? 150?

    submitted by /u/tactilecode
    [link] [comments]

    Why the hate on CentOS 7's gcc compiler?

    Posted: 29 Mar 2019 04:44 PM PDT

    Some of the (very vocal) programmers at my work absolutely trash CentOS 7's standard gcc compiler in favor of Ubuntu 18.04. They've gone from calling it a 10 year old compiler to now 30 years old, and a few would prefer our environment didn't run CentOS at all. Why is there so much hate? Does the --std flag not work as well as I'm assuming it does?

    submitted by /u/GrizzlyWhosSteve
    [link] [comments]

    Seeking advice on backend for StackOverflow-like webapp.

    Posted: 29 Mar 2019 09:54 AM PDT

    Project description:

    I'm building a basic version of something very similar to Stack Overflow and Reddit: user generated content, ordered lists, voting, reputation, and community moderation.

    Scale:

    A reasonable best case scenario would make it about as popular as Reddit - Stack Overflow in time.

    Current dev-power:

    Modest: Just me, a single intermediate developer with little backend experience.

    Frontend:

    Vue via Nuxt. (The MVP views are done as well as some of the store / vuex).

    Priorities:

    • Simple, fast, easy development. Minimal total dev-time from zero to production deployment including auth management and so on. Minimal moving parts both now and at scale.
    • Scalable: No need to prepare for tens of millions of users at this stage (curb your enthusiasm) but some path from the MVP to a top 100 website without major migration or major code rewriting would be a great plus.
    • Cheap: The site is similar to Reddit in that it would have a high engagement to revenue ratio, so it needs to be cheap to run at all levels of popularity.
    • Long term reliability and independence, preferably with no vendor lockdown: I started using Firebase but sudden cost hikes and the risk of the service being radically changed or discontinued, together with its limited querying capabilities, I'm not confident it's the best choice. If needed, migrating away from it could turn out to be a nightmare. It may still be the best option. I don't know.

    Aim:

    Minimising the total number and quality (minimal frustration please) of dev-hours including learning, configuring, implementing, debugging, maintaining, etc., both from now to a fully functioning MVP, as well as from now to a top 100 website years down the road.

    Open to all options, as well as things I may be overlooking.

    submitted by /u/DiluvialHippo
    [link] [comments]

    How can I build a website that auctions small pieces of a person's time, such as 3 minutes or an hour, with minimal setup?

    Posted: 29 Mar 2019 05:49 PM PDT

    If the minimum bid is free then it should be easy to get people bidding on free services, then maybe demand would rise to 10 cents for 10 minutes, and so on, whatever the service happens to be worth the free market would adjust, guaranteeing the person is never unemployed but only the money per time varies. So reducing the setup for new people is very important.

    submitted by /u/BenRayfield
    [link] [comments]

    Linked lists and Data abstraction in C++

    Posted: 29 Mar 2019 04:48 PM PDT

    I have an assignment where I need to incorporate a linked list where I previously used a dynamic array. One of the problems I'm running into is that my linkedlist->next is actually pointing to the previous and I'm not entirely sure on how to fix it. Here is the constructor for the class I'm dealing with.

     poly::poly() { // Pre: None. // Post: A basic "zero" polynomial object is created // with zero terms. terms = new Node; terms->data.coeff = 0; terms->data.exp = 0; terms->link = NULL; }; 

    Is there anything shown there that would make it so my linked list is backwards?

    If needed I can post more of the code.

    EDIT:

    Copy function

    void poly::copy (const poly & p) { // Pre: p is a valid polynomial. // Post: p is copied into the implicit parameter. int nterms = list_length(p.terms->link); Node *currentptr = p.terms; Node *temp = new Node; for (int i = 0; i < nterms; i++) { temp->data.coeff = currentptr->data.coeff; temp->data.exp = currentptr->data.exp; temp->data.var = currentptr->data.var; currentptr = currentptr->link; temp->link = currentptr; } this->terms = temp; }; 

    insert term function:

    void poly::InsertTerm (term t) { // Pre: Implicit parameter is a valid polynomial NOT // containing any term with the same exponent as t. // Post: The new term t is inserted into the implicit // parameter polynomial, making sure the terms are in // decreasing order of exponents. In the process, the // polynomial is "expanded" if necessary. int i = list_length(terms); unsigned int e = t.exp; if (i == 0) { list_head_insert(terms, t); } else { list_insert(terms, t); } }; 

    read function:

    void poly::read () { // Pre: None. // Post: A new value is read into the implicit paramter polynomial, // per instructions as given out first. The terms are stored in // decreasing order of exponents. If necessary, the old value is destroyed. poly temp; Node *TempNode = new Node; char variable; int coefficient; int exponent; cout << "Input a polynomial by first specifying the variable and then the terms in any order." << endl << "Each term is specified by an integer coefficient and" << endl << "a non-negative integer exponent." << endl << "Indicate END by specifying a dummy term with" << endl << "a zero coefficient and/or a negative exponent." << endl; cin >> variable; do { cin >> coefficient; if (coefficient) { cin >> exponent; if (exponent >= 0) { temp.InsertTerm(term(variable, coefficient, exponent)); } } else while (cin && (cin.peek() != '\n')) cin. ignore(); } while (coefficient && (exponent >= 0)); *this = temp; // The assignment operator is being called here! }; 

    It will prompt me to insert a polynomial so I will enter x 3 2 2 1 1 0 (which should be 3x^2 + 2x + 1) and it will print 2x + 3x^2. My Group partner created a plus function for a different part of this project and it reversed the polynomial after adding (so if we add 2x+3x^2 and 2x+3x^2 we would get 6x^2+4x) but beforehand the polynomials are backwards.

    EDIT 2:

    Just occured to me that the write function may be needed

    write function:

    void poly::write() const//do { // Pre: The implicit parameter is a valid polynomial. // Post: The polynomial represented by the implicit parameter is // printed out on the standard output. The variable is used as stored. int y = list_length(terms); Node *currentptr = this->terms; for(int x = 0; x < y; x++) { if (x == 0) { cout << currentptr->data.coeff << currentptr->data.var << currentptr->data.exp << ""; } else if (currentptr->data.exp == 0 && currentptr->data.coeff > 0) { cout << currentptr->data.sign() << currentptr->data.coeff << ""; } else if (currentptr->data.exp > 0 && currentptr->data.coeff < 0) { cout << currentptr->data.coeff << currentptr->data.var << currentptr->data.exp << ""; } else if (currentptr->data.exp == 1 && currentptr->data.coeff > 0) { cout << currentptr->data.sign() << currentptr->data.coeff << currentptr->data.var << ""; } else if (currentptr->data.exp > 0 && currentptr->data.coeff > 0) { cout << currentptr->data.sign() << currentptr->data.coeff << currentptr->data.var << currentptr->data.exp << ""; } else if (currentptr->data.exp == 1 && currentptr->data.coeff > 0) { cout << currentptr->data.coeff << currentptr->data.var << ""; } else { cout << currentptr->data.coeff << currentptr->data.var << ""; } currentptr = currentptr->link; } cout << endl; }; 

    submitted by /u/Amxela
    [link] [comments]

    Google Play has removed my app, but I can't find the offending lines in the Manifest?

    Posted: 29 Mar 2019 04:44 PM PDT

    Sorry if this isn't the right place to post this, I don't find myself in this part of the internet very often haha.

    So awhile back Google sent out those emails regarding apps being taken down if they use certain permissions relating to calls and SMS usage. I may have ignored said emails for a bit too long, and well, here we are.

    The problem is, I'm not by any means a good programmer, especially with JS. Long story short, the only places I can find the offending lines is in the manifest class file, which of course I can't change. I don't see them in the xml file.

    Is there a different place I should be looking, generally speaking? The code is a bit hacky and most of it was already written when I got ahold of it, which is why I'm hoping someone can kind of just point me in the right direction if nothing else.

    In the email I received, the specific permissions were READ_CALL_LOG and WRITE_CALL_LOG. The only thing that would be remotely related (that I can find) is read_contacts.

    Responses are appreciated!

    submitted by /u/davidvanbeveren
    [link] [comments]

    Need info on databases

    Posted: 29 Mar 2019 12:58 PM PDT

    Hi /r/AskProgramming!

    I am a visual artist and just a recent beginner when it comes to programming.

    I'm trying to create a portfolio website that eventually will display a lot of different works that I want to function as movable widgets. I want to do this by making use of a database that I can send requests to. I have a few questions about this:

    • What does using a working MySQL-database cost?
    • What is the best PHP framework to use with that?
    • What should I pay attention to?

    Thanks a lot!

    submitted by /u/ditdatzusjemoeder
    [link] [comments]

    Does GDB preserve the history of variables as you step through a program?

    Posted: 29 Mar 2019 04:30 PM PDT

    Title is question.

    submitted by /u/Hoopsplayer21
    [link] [comments]

    MissingMethod:DefineDynamicAssembly

    Posted: 29 Mar 2019 04:21 PM PDT

    I've been trying to implement and ORM library and finally, after hunting for dlls it is dependent on (of course undocumented or provided) I have hit a wall that google has yet to provide an answer for.

    System.MissingMethodException: 'Method not found: 'System.Reflection.Emit.AssemblyBuilder System.AppDomain.DefineDynamicAssembly(System.Reflection.AssemblyName, System.Reflection.Emit.AssemblyBuilderAccess, System.String)'.' 

    From documentation it should be in NETCore, which I have and is as up to date as I can get it (2.0.0). Can I get some ideas on how to resolve this?

    submitted by /u/AresimasDrakkson
    [link] [comments]

    What books would I need to approximately get the KPSI of a rug? Knots per square inch for a rug. Android application

    Posted: 29 Mar 2019 07:34 PM PDT

    [HowTo][Bash][Terminal] I want an alias for `:q`

    Posted: 29 Mar 2019 02:58 PM PDT

    I am constantly typing in `:q` into the terminal as an `exit` or when I am done reading some large amount of output to `stdout`.

    For the amount of times that I do `:q` a day (bash_history has me at 5 times today), I would like to have a better alias than what I currently have in place. Right now, my `.bashrc` reads:

    alias :q="echo \"THIS IS NOT vim, DUMMY\"" 

    Should I switch it to `exit` instead? Or is there something else that I could do to add to the quality of my life? Maybe email my wife that I love her?

    submitted by /u/but_how_do_i_go_fast
    [link] [comments]

    I search texts or links about structuring database for a dashboard

    Posted: 29 Mar 2019 02:15 PM PDT

    I have a database with a table called Logs. Inside I have every actions done on the database.

    We created a dashboard who query the database in real time to see how much of X actions they do today to track their performance. But after 20 millions rows, I think it's not the best practice to use that table to get how much actions they have done today, this week, this month.

    It's really query specific and dashboard specific but does anyone have examples, documentations, courses about structuring a database for fast data quering on a dashboard.

    Example:

    • Is doing a row named [NbComments] in the database for a blog post is a bad practice since you can always do (SELECT COUNT(*) from comments) or it's used a lot when you have 1 000 000k comments in your app?
    • Is doing a table CREATE TABLE ActionX (DATETIME date, INT Counter) and increment it everyday is a good practice to log the actions of every day?
    submitted by /u/42-1337
    [link] [comments]

    How does Vodafone securenet work?

    Posted: 29 Mar 2019 12:44 PM PDT

    It seems to add an icon on any web page, even if that page is https encrypted. How are they injecting the code into the page to do this?

    submitted by /u/DeadeyeDuncan
    [link] [comments]

    Job offer from start up - have some concerns

    Posted: 29 Mar 2019 01:16 AM PDT

    Product: trading platform

    Pros: higher pay, good domain experience, interesting work, has decent backlog of clients

    Cons: longer commute, small/bare office, outdated tech being used, potential lack of mentoring, only 4 people

    My main concern I think is the outdated tech being used. Think Angular 1.x, Xamarin - the current application/website visually looks pretty bad in my opinion. However from talking to friends in the finance industry apparently it's pretty common for applications that they use to look pretty awful. But I'm worried that if they're already behind the curve in terms of the tech they're using, it might speak volumes about their technological intuitiveness.

    I'm also fairly junior still, and would want some kind of mentorship in terms of best practices etc. Is that something I can expect from a start up?

    What are your thoughts?

    submitted by /u/iwelcomejudgement
    [link] [comments]

    Wait for Animation to finish before starting AI in JavaFX?

    Posted: 29 Mar 2019 03:06 AM PDT

    I have this animation that animates a falling circle through a gridpane.

     private void animateFall(int col) { SequentialTransition st = new SequentialTransition(); Color color; if (game.getCurrentPlayer().equalsIgnoreCase("x")) color = Color.DARKCYAN; else color = Color.YELLOW; int row = 7 - game.getLastRow(); for (int i = 1; i < row; i++) { FadeTransition ft = new FadeTransition(Duration.millis(150), crcPieces[col][i]); FillTransition ft2 = new FillTransition(Duration.millis(150), crcPieces[col][i], color.LIGHTGRAY, color); ft.setToValue(1); ft.setAutoReverse(true); ft.setCycleCount(2); ft2.setAutoReverse(true); ft2.setCycleCount(2); st.getChildren().add(ft); st.getChildren().add(ft2); } FadeTransition ft = new FadeTransition(Duration.millis(150), crcPieces[col][row]); FillTransition ft2 = new FillTransition(Duration.millis(150), crcPieces[col][row], Color.LIGHTGRAY, color); ft.setToValue(1.0); st.getChildren().add(ft); st.getChildren().add(ft2); st.play(); } 

     private void fxGameLoop(int col) { // Player Move if (!game.update(Integer.toString(col+1))) { System.out.println("Error, try again.\nPlayer" + game.getCurrentPlayer() + " your turn, choose column 1-7"); } animateFall(col); checkWin(); // I need to wait until the animation completes before running this runAI(col); } 

    I can't use setOnFinished for runAI, cause it'll go in an infinite loop. I just need to wait 2 seconds (or wait until st.play() is done) before calling runAI as runAI calls animateFall which use the same grid. Which can result in weird errors. I can't do thread.sleep cause it locks the UI up. I'm new to JavaFX and don't know how you would go about doing this.

    I'm sure it's something simple, but I've only been using JavaFX for about 2 hours.

    submitted by /u/bazgrim_dev
    [link] [comments]

    Can anyone help me with simple Kotlin Bluetooth example to send data to another Bluetooth device?

    Posted: 29 Mar 2019 06:24 AM PDT

    I have tried everything... copied multiple Java examples, Youtube videos, android bluetooth example

    Hell, I even went to my school library but only found few old Bluetooth guides to Java but nothing useful. I keep getting errors (socket closed) or app freezes and nothing happens https://i.imgur.com/8cxEb0X.png

    I am seriously getting desperate I can't get anything to work. Simple example is all I need, doesn't need to be inside thread, doesn't have to send anything back

    submitted by /u/Someone9339
    [link] [comments]

    How to process/parse PDF documents with similar structure

    Posted: 29 Mar 2019 05:11 AM PDT

    Hello, first time on this subreddit.

    I've been tasked to research whether or not a set of PDF documents (which i cannot post openly here) can be parsed in such a way that i could fill a database with the structured data and display the contents in a smartphone app.

    The issue i found was that each of those ~30 PDFs is similar but not identical in structure, making simple parsing not an option.

    Next i checked what PDF libraries there are and checked their capabilities. I was hoping that because the title for each subsection was linked i could use those links as orientation. This is still in progress.

    Lastly i checked out natural language processing but figured that this would be quite overkill, as NLP seemed to be for interpretation of raw language, not document structure (I could be wrong here).

    Has someone here had a similar problem and found a good way to solve it or is there an obvious way that I'm just not seeing?

    submitted by /u/freddy14
    [link] [comments]

    No comments:

    Post a Comment