Jump to content

theereal

Member
  • Posts

    3,755
  • Joined

  • Last visited

Posts posted by theereal

  1. On 3/8/2024 at 10:09 PM, wanderingfool2 said:

    As others have expressed is there any reason why you aren't doing so just with malwarebytes itself?

     

    Actually there really isn't much need for a script to do it; just takes needless cycles.

     

    Easiest just to use Windows Task Scheduler to run the command directly once a day.

    True, for just running a simple scan. But using a python script it can be expanded to be more flexible with additional error handling and/or automatically handling certain conditions that may be met dynamically.

  2. On 3/2/2024 at 9:55 PM, tanjackson said:

     

    How to write a Script to automatically run Malwarebytes and run scan daily?

    Do you have any programming experience?

     

    A python script like this would probably work allthough i havent tested it myself.

    import subprocess
    import schedule
    import time
    
    mbts_executable = "C:\\Path\\To\\MBTSLauncher.exe"
    
    def run_malware_scan():
        print("Running Malwarebytes malware scan...")
        subprocess.run([mbts_executable, "/scan:malware"], check=True)
    
    schedule.every().day.at("15:00").do(run_malware_scan)
    
    try:
        while True:
            schedule.run_pending()
            time.sleep(60)
    except KeyboardInterrupt:
        print("Scan scheduler stopped.")
    

    If you want the script to run uninterrupted without having to manually execute the script on reboot you could use something like Windows Task Scheduler to run the script. Theres an entire page full of commands to run through the CLI here: 

    Malwarebytes Toolset command-line options – Malwarebytes Support

     

    Let me know if youve got any questions.

  3. So ive got an 14" inch M2 Pro that i use for software developement but i used the last bit of my budget to upgrade to 32GB of ram, so im stuck with a 512GB SSD. More and more projects are starting to clog up my drive, and i was looking into getting some external drive to store my projects on, note that i want to run the projects off this drive aswell and not have to transfer them to the internal drive every time im going to boot them up. Im always on the go and so i was hoping to make this external drive as small as possible, even a flash drive if at all possible. But the fastest flash drives i could find was 1000MB/s read/write sustained. I was wondering, would this be fast enough to run projects directly off the drive in programs like XCode or Android Studio? Or should i spring for an external SSD instead? What speeds should i be looking at then and are there any super small offerings? The tinier the better.

     

    Thanks so much in advance 🙂

  4. So, im looking to buy a Macbook, im primarily going to be using it for programming, ill be doing Unity in C#, aswell as running emulators with XCode. I was wondering if there are any considerations i should make with respects to CPU and Ram, could i get by with an Air? or do i need a 8/10core Pro? Would i be okay with 16gb or should i spring for 24/Air or 32/Pro?

     

  5. So, ive got a custom hook that looks like this:

     

    export default function useFetch(path) {
    
           
        const [array, setArray] = useState([]);
     
                useEffect(() => {
            axios.get(`${path}`)
                .then(res => {
                    setArray(res.data)
                })
                .catch(err => {
                    console.log(err)
                })
        },[])
     
        return array
     
    }

     

    I get the array in the main component by calling it like so:
    <const gamesArr = useFetch(gameControllerUrl)>

     

     
    However, theres also a delete function in the main component, and when someone deletes something id like to update state, i tried doing it like so:
    useEffect(() => {
                useFetch(gameControllerUrl)
            },[deleteGameFlag])
     
     
    However, im not allowed to use a custom hook inside a callback. Is there any way around this? To fetch the data using this custom hook and also updating state using the dependency array?
  6. Difference between for and while loop:

     

    The for loop reads like this

    for as long as (number is equal to number; number is less than number; add to number) {do stuff}

    for (int i = 0; i < 5; i++) {do stuff}

     

    while loop reads as this:

     

    while(number is less than number) {do stuff}

    while(i < 5) {do stuff}

     

    The main difference of concern to you at this stage, is that the "while" loop doesent add to the "i" integer inside the loop declaration, rather you actually have to do this (look at line inside loop) (You also need to declare the variable BEFORE the loop like so (int x = 0)) otherwise it wont know what "x" is

     

    int x = 0

     

    while(x < 5) {

    //WRITE CODE IN HERE

    x++

    }

     

    That "x++" line adds 1 to the variable x each time the loop runs, if you dont add this line, youll get stuck in an infinite loop.

     

    Id write the code for you, but im being vague on purpose, the reason is that you need to be willing to butt your head against the wall for a little bit before giving up, to improve your problem solving abilities which will be essential later on. If you ABSOLUTELY cannot get it to work, dm me back and ill help.

  7. Theres a hierarchy of styling within CSS and it goes like this:

     

    1: (Id) Top priority is taken by id styling, ie styling that is applied to an element by refrencing its id will take priority over all other styling.

     

    2: (Class) Secondary priority is given to class, any styling applied by referencing the class of an element will take secondary priority.

     

    3: (Parent > Child) This selector is often done to more easily and quickly style child elements of an element, it has however the least priority and if any of the elements that are styled this way are given any other contradictory styling using class or id, those will take priority.

  8. 7 minutes ago, Wolly9102 said:

    Usually there is an reason your blacklisted. Mass mailing can be seen as spam and you don't have an DKIM record. (Altrough I am no expert at this). I suggest you follow this guide on how to get whitelisted.

     

    https://kb.leaseweb.com/compliance-and-security/procedure-to-remove-blacklist 

     

    Ok, thank you so much for the help ❤️ I will try this 🙂 Based on my post above, which of the IP adresses should i ask to be delisted?

  9. 16 minutes ago, Wolly9102 said:

    First remove all sensitive information from your post. Would not be wise to leave it there. And then check if your domain is on a blacklist.

     

    https://mxtoolbox.com/NetworkTools.aspx?tab=Email

    Thanks for the reply ❤️ Haha, and yes good idea. Im slow, so i assume you meant enter the host IP adresses from here into the box that says "blacklist"? As far as i could tell neither is blacklisted when i put them in there.

  10. So, our customer recieve their invoices every month through mail with an attached PDF. However, recently some of our customers have not recieved their email. This month only 2 out of 31 emails were sent successfully and i recieved an error from the Mail Delivery System for the remaining 29 emails. The error code is 550 5.7.1 and contains the following error message:

     
    "A message that you sent could not be delivered to one or more of its
    recipients. This is a permanent error. The following address(es) failed:"
     
     example@gmail.com
        host gmail-smtp-in.l.google.com [**.***.***.**]
        SMTP error from remote mail server after end of data:
        550-5.7.1 [***.***.***.***] Messages missing a valid messageId header are not
        550 5.7.1 accepted. b40-20020a2ebc28000000b0025e52e7071fsi51343ljf.183 - gsmtp
     
     
    This is what the original email looked like:
    ---------- Forwarded message ----------
    From: "example@gmail.com" <example@gmail.com>
    To: example@hotmail.com
    Cc: example@hotmail.com
    Bcc: 
    Date: Sun, 31 Jul 2022 21:16:48 +0200
    Subject: Faktura fra Nygårdsgaten Maling og Jernvare
    Hei.

    Vennligst se vedlagte faktura fra oss.

    NB: Husk å bruk kidnummer 6 tall.

    Med vennlig hilsen

    Nygårdsgaten Maling og Jernvare AS
    ...
     
    We are using a system called Athena to manage sending out our invoices every month. As far as i could tell there was no difference in the Athena system between the customers that did recieve the email and the ones that did not.
     
    Any help would be greatly appriciated. ❤️
  11. On 11/30/2021 at 6:41 PM, Notwilliam717_ said:

    For thermals I have done stress tests on 3d mark and my cpu thermals never really go higher than 30-50c and my gpu goes to 65c and I was thinking about my computer not getting enough power 

    Your CPU is hitting 30 degrees on a stress test? Theres something wrong already there. Its not even close to normal. Have you checked the load of the CPU during stress scenarios?

  12. 12 minutes ago, IdanHero said:

    That what I was worried about, a fresh install after a few months is "rough".

    Question is: You are pretty positive that in a few months windows 11 will be good to install?

    If so, isn't it also a good idea to install it now and just wait for the updates to fix things up? or is it in such a bad state that you wouldn't even recommend that?

    Ive got a desktop with Windows 10 and a laptop with Windows 11. Obiously gaming performance differs, even though the ROG Flow x13 is a beast of a thin and light laptop, it still cannot compete with a desktop PC. But when it comes to gaming it performs as i would expect it to. Ive had no stability issues or crashes, no software that wont run or runs wonky or anything like that. I like adopting new OS's early however. I personally havent run into any bugs yet, and Windows 11 feels like a reskinned Windows 10. Im doing a bachelors degree in programming atm so i use alot of wonky non-regular-user software, lots of it thats old and only says its compatible with either 7/8.1/10 but theyve all been working exactly as expected on Windows 11. Im no expert on the matter, but i dont really see any reason to upgrade to Windows 11 other than you wanting to try a new and shiny OS. If youre worried about stability issues, id stick with 10. But i also wouldnt be too worried about going straight for the latest one.

  13. 19 minutes ago, mariushm said:
    POST /tk1104/oppgave3d.php HTTP/1.1
    Host: www.eastwillsecurity.com
    Origin: http://www.eastwillsecurity.com
    Referer: http://www.eastwillsecurity.com/tk1104/oppgave3d.php
    Accept: text/html,application/xhtml+xml
    User-Agent: PuTTY
    EksamenTK1104: 1234
    Content-Type: text/plain
    Content-Length: 8
    
    OPPGAVE3

    Something like this. 

    Standard port for http is 80 and can be omitted, it's implicit. 

    replace 1234 with your actual id. 

    Content-Type : text/plain because you're just sending some text to the server/script, not form data. 

    Origin and Referer are optional.

     

    Not 100% sure of this final part, it should be correct but maybe check it, make tests, ask someone else 

     

    You can write your own php script to test this stuff  (install apache and php on your windows machine, it's super easy) and read the "request body" from php://input and dump it to a file (ex see file_put_contents function)  and compare with what you send.

     

    this outputs directly.

    <?php
    $body = '';
    $fh   = @fopen('php://input', 'r');
    if ($fh) {
      while (!feof($fh)) {
        $s = fread($fh, 1024);
        if (is_string($s)) { $body .= $s; }
      }
      fclose($fh);
    }
    
    echo "Body: $body";
    ?>

     

     

    Thank you so much! ❤️ It really helped have a comparison to understand the different stuff. I really appriciate you taking your time to do this 🙂

  14. 43 minutes ago, mariushm said:
    POST /your-script.php HTTP/1.1
    Host: www.your-domain-name.com
    Origin: http://www.your-domain-name.com
    Referer: http://www.your-domain-name.com/your-script.php
    Accept: text/html,application/xhtml+xml
    Content-Type: application/x-www-form-urlencoded
    Content-Length: 27
    
    field1=value1&field2=value2

    /your-script.php = what resource is the data submitted to 

    HTTP/1.1  - protocol used  (note that some web servers default to HTTP 2.0 and may refuse unencrypted connections)

    Host:  = required,  servers can host multiple domains  on same IP address, as well as subdomains, so the web server needs to know what domain the resource is on 

    Accept:  = (optional) , tells the server that you can only support receiving html , it should not answer with binary data (ex a picture)

    Content-Type:  required, you tell the server that some parameters from a form were encoded and now are sent to the server

     

    Origin and Referer = optional, some servers will have anti hacking protections and will not accept connections that say the data was submitted from another domain. 

     

    Content-Length = the length in bytes of the data you're gonna submit 

    after this, you leave one line empty then send the actual content and an empty line and close connection.. 

     

    .. btw you have the developer tools in any browser.

    load a page with a basic form, then Press F12 , move to the network tab, then in back in page with form post something  (ex type a text in a basic form and and hit submit button)  , You'll see the post request in developer tools, click on it and you see there the request and the response.

     

    See also https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/POST

     

    Thank you so much for your detailed answer ❤️

    Im still struggling abit, ive got the basic syntax thanks to you, but would you mind giving me an example if i were to give you the task im given? 🙂 Its practice for my exam which is on December 12th.

     

    The task is the following:

    You are to connect to HTTP on the standard port (Raw connection type), on host www.eastwillsecurity.com

    You are to send an HTTP POST to PATH tk1104/oppgave3d.php.

    You should include common request headers according to the standard and you are to put a header EksamenTK1104 which will be set to your candidate number on this exam.

    You must also set the User-Agent header to PuTTY.

    In the request BODY you are to put the following text "OPPGAVE3"

     

    Its from the exam of the previous year in this subject.

  15. Not sure if this is in the correct section, if posted in the wrong subcategory i apologize in advance 😛

     

    So, ive been given a task to use PuTTY to send a POST request to a server.

    Its telling me to use Raw connection type and since its HTTP i assume i must use Port 80.

    Its telling me to POST to a specific PATH which i dont understand. 

    Its telling me to also include common request headers which i have no idea what are.

    Its also telling me to put something in the body.

     

    Is this making sense to someone smarter than me? haha

     

  16. On 11/13/2021 at 8:24 AM, levitate999 said:

    @theereal @Arika S ah okay thanks for the input, I guess I just panicked for a bit since on my old setup I never reached 80 before, I guess It's fine since the CPU is more powerful after all

    Understandable. I mean modern CPUs can run quite hot and it wont break because of it. Note that stock coolers arent that great at keeping the CPU cool. If you can do it in the future, id buy a cheap 212 just to give it that extra oomph in terms of cooling :)

  17. 1 minute ago, Arika S said:

    get a cheap android tablet and Superdisplay it is by far the best second screen app i have found on android, there is very little latency and things are smooth, not a jittery mess like most other apps i've tried. Works as a touchscreen and tablet (if it has pen support). and either wireless or through USB (with USB debugging mode)

    Thank you! I guess i wouldnt use the USB mode as a cable is what im attempting to avoid. How does the wireless function work? Do you connect both to the same wifi? Like your phones hotspot or something?

  18. So, im looking to get an extra display to connect to my laptop whenever im at school. Im looking for something in the range of an ipad in size, however not nearly as expensive haha. My laptop is a Flow x13. I was wondering if someone has any recommendations on any lightweight, albeit sturdy products that fit the description? I also dont relish the idea of carrying around an HDMI cable everywhere to connect my laptop to the extra display, so i was wondering if there are any wireless HDMI like options out there? Ive seen some products on Amazon but they seem quite large and i might aswell simply carry around an entire cable. Im wondering if theres something out there that can connect them where i can simply have it plugged into my laptop and the other dongle in the screen at all times and have it barely be noticable, like a wireless USB mouse where the dongles are extremely small these days. Any advice would be greatly appriciated.

     

    If i posted this in the wrong subforum i apologize in advance.

  19. On 8/1/2021 at 11:03 PM, igormp said:

    Well, I tried to think really hard in a case where you'd really need a x86 laptop during your graduation, and the only thing that comes to mind is any computer architecture class or any other class where you'll need to deal with FPGA tools (which only support x86 windows and linux), so if you could check out your syllabus and see if there's anything like that it'd be helpful.

    Another thing that I can think of is some class requiring you to use Visual Studio (the full blown IDE, not VSCode), but I don't think I've ever seen anything like that.

     

    Other than that, you should be able to do everything on a M1, I'd say that there's no need for 2 machines.

    So most Windows software can be emulated on the Mac? Will i be able to use all Windows software including saving files and whatnot if i use parallels? Sorry for the dumb and repetitive questions haha 😛

     

    Ive listed the different courses, their names are in Norwegian but ill attempt to translate their names as accurately as possible to give you an idea of what were going to be doing 🙂

     

    First Semester:

    -Databases

    -Digital Technology

    -Introduction to Programming

    -Creative Project

     

    Second Semeseter:

    -Computer Security (Cyber Security)

    -Object Oriented Programming

    -Visual Analytics

     

    Third Semester:

    -Android Programming

    -Interaction Design 1

    -Web Developement

     

    Fourth Semester:

    -Agile Project

    -Free choice of subjects or exchange semester

     

    Fifth Semester:

    -IOS Programming

    -Cross Platform

    -Agile Project

    -Research Methods

     

    Sixth Semester:

    -Bachelor Project

×